Lines Matching refs:channel_ctx
84 struct mhu2_channel_ctx *channel_ctx = (struct mhu2_channel_ctx *)ctx_param; in mhu2_isr() local
88 fwk_assert(channel_ctx != NULL); in mhu2_isr()
90 while (channel_ctx->recv_channel->STAT != 0) { in mhu2_isr()
91 slot = __builtin_ctz(channel_ctx->recv_channel->STAT); in mhu2_isr()
96 if (channel_ctx->bound_slots & (1 << slot)) { in mhu2_isr()
97 bound_channel = &channel_ctx->bound_channels_table[slot]; in mhu2_isr()
102 channel_ctx->recv_channel->STAT_CLEAR = 1 << slot; in mhu2_isr()
113 struct mhu2_channel_ctx *channel_ctx; in raise_interrupt() local
116 channel_ctx = &ctx.channel_ctx_table[fwk_id_get_element_idx(slot_id)]; in raise_interrupt()
118 send = channel_ctx->send; in raise_interrupt()
125 channel_ctx->send_channel->STAT_SET |= (1 << slot); in raise_interrupt()
141 struct mhu2_channel_ctx *channel_ctx; in mhu2_send_message() local
149 channel_ctx = &ctx.channel_ctx_table[fwk_id_get_element_idx(slot_id)]; in mhu2_send_message()
152 send = channel_ctx->send; in mhu2_send_message()
183 db_ch = channel_ctx->config->channel; in mhu2_send_message()
222 struct mhu2_channel_ctx *channel_ctx; in mhu2_get_message() local
228 channel_ctx = &ctx.channel_ctx_table[fwk_id_get_element_idx(slot_id)]; in mhu2_get_message()
231 db_ch = channel_ctx->config->channel; in mhu2_get_message()
237 recv = (struct mhu2_recv_reg *)channel_ctx->config->recv; in mhu2_get_message()
310 struct mhu2_channel_ctx *channel_ctx; in mhu2_channel_init() local
318 channel_ctx = &ctx.channel_ctx_table[fwk_id_get_element_idx(channel_id)]; in mhu2_channel_init()
319 channel_ctx->send = (struct mhu2_send_reg *)config->send; in mhu2_channel_init()
321 if (config->channel >= channel_ctx->send->MSG_NO_CAP) { in mhu2_channel_init()
326 channel_ctx->config = config; in mhu2_channel_init()
327 channel_ctx->slot_count = slot_count; in mhu2_channel_init()
328 channel_ctx->send_channel = &channel_ctx->send->channel[config->channel]; in mhu2_channel_init()
350 channel_ctx->recv_channel = &recv_reg->channel[config->channel]; in mhu2_channel_init()
352 channel_ctx->bound_channels_table = in mhu2_channel_init()
353 fwk_mm_calloc(slot_count, sizeof(channel_ctx->bound_channels_table[0])); in mhu2_channel_init()
361 struct mhu2_channel_ctx *channel_ctx; in mhu2_bind() local
365 channel_ctx = &ctx.channel_ctx_table[fwk_id_get_element_idx(id)]; in mhu2_bind()
369 if (!(channel_ctx->bound_slots & (UINT32_C(1) << slot))) in mhu2_bind()
372 bound_channel = &channel_ctx->bound_channels_table[slot]; in mhu2_bind()
397 struct mhu2_channel_ctx *channel_ctx; in mhu2_process_bind_request() local
411 channel_ctx = &ctx.channel_ctx_table[fwk_id_get_element_idx(target_id)]; in mhu2_process_bind_request()
413 if (channel_ctx->bound_slots & (1 << slot)) { in mhu2_process_bind_request()
419 channel_ctx->bound_channels_table[slot].id = source_id; in mhu2_process_bind_request()
420 channel_ctx->bound_slots |= 1 << slot; in mhu2_process_bind_request()
436 struct mhu2_channel_ctx *channel_ctx; in mhu2_start() local
441 channel_ctx = &ctx.channel_ctx_table[fwk_id_get_element_idx(id)]; in mhu2_start()
443 if (channel_ctx->bound_slots != 0) { in mhu2_start()
444 status = fwk_interrupt_set_isr_param(channel_ctx->config->irq, in mhu2_start()
446 (uintptr_t)channel_ctx); in mhu2_start()
452 status = fwk_interrupt_enable(channel_ctx->config->irq); in mhu2_start()