| /linux/include/linux/ |
| H A D | mailbox_controller.h | 13 struct mbox_chan; 55 int (*send_data)(struct mbox_chan *chan, void *data); 56 int (*flush)(struct mbox_chan *chan, unsigned long timeout); 57 int (*startup)(struct mbox_chan *chan); 58 void (*shutdown)(struct mbox_chan *chan); 59 bool (*last_tx_done)(struct mbox_chan *chan); 60 bool (*peek_data)(struct mbox_chan *chan); 87 struct mbox_chan *chans; 92 struct mbox_chan *(*fw_xlate)(struct mbox_controller *mbox, 94 struct mbox_chan *(*of_xlate)(struct mbox_controller *mbox, [all …]
|
| H A D | mailbox_client.h | 13 struct mbox_chan; 40 int mbox_bind_client(struct mbox_chan *chan, struct mbox_client *cl); 41 struct mbox_chan *mbox_request_channel_byname(struct mbox_client *cl, 43 struct mbox_chan *mbox_request_channel(struct mbox_client *cl, int index); 44 int mbox_send_message(struct mbox_chan *chan, void *mssg); 45 int mbox_flush(struct mbox_chan *chan, unsigned long timeout); 46 void mbox_client_txdone(struct mbox_chan *chan, int r); /* atomic */ 47 bool mbox_client_peek_data(struct mbox_chan *chan); /* atomic */ 48 unsigned int mbox_chan_tx_slots_available(struct mbox_chan *chan); /* atomic */ 49 void mbox_free_channel(struct mbox_chan *chan); /* may sleep */
|
| /linux/drivers/mailbox/ |
| H A D | mailbox-altera.c | 49 struct mbox_chan *chan; 52 static struct altera_mbox *mbox_chan_to_altera_mbox(struct mbox_chan *chan) in mbox_chan_to_altera_mbox() 117 static void altera_mbox_rx_data(struct mbox_chan *chan) in altera_mbox_rx_data() 143 struct mbox_chan *chan = (struct mbox_chan *)p; in altera_mbox_tx_interrupt() 154 struct mbox_chan *chan = (struct mbox_chan *)p; in altera_mbox_rx_interrupt() 160 static int altera_mbox_startup_sender(struct mbox_chan *chan) in altera_mbox_startup_sender() 179 static int altera_mbox_startup_receiver(struct mbox_chan *chan) in altera_mbox_startup_receiver() 206 static int altera_mbox_send_data(struct mbox_chan *chan, void *data) in altera_mbox_send_data() 233 static bool altera_mbox_last_tx_done(struct mbox_chan *chan) in altera_mbox_last_tx_done() 241 static bool altera_mbox_peek_data(struct mbox_chan *chan) in altera_mbox_peek_data() [all …]
|
| H A D | mailbox.c | 24 static int add_to_rbuf(struct mbox_chan *chan, void *mssg) in add_to_rbuf() 46 static void msg_submit(struct mbox_chan *chan) in msg_submit() 82 static void tx_tick(struct mbox_chan *chan, int r) in tx_tick() 113 struct mbox_chan *chan = &mbox->chans[i]; in txdone_hrtimer() 145 void mbox_chan_received_data(struct mbox_chan *chan, void *mssg) in mbox_chan_received_data() 163 void mbox_chan_txdone(struct mbox_chan *chan, int r) in mbox_chan_txdone() 184 void mbox_client_txdone(struct mbox_chan *chan, int r) in mbox_client_txdone() 210 bool mbox_client_peek_data(struct mbox_chan *chan) in mbox_client_peek_data() 231 unsigned int mbox_chan_tx_slots_available(struct mbox_chan *chan) in mbox_chan_tx_slots_available() 266 int mbox_send_message(struct mbox_chan *chan, void *mssg) in mbox_send_message() [all …]
|
| H A D | mailbox-sti.c | 84 static inline bool sti_mbox_channel_is_enabled(struct mbox_chan *chan) in sti_mbox_channel_is_enabled() 95 struct mbox_chan *sti_mbox_to_channel(struct mbox_controller *mbox, in sti_mbox_to_channel() 117 static void sti_mbox_enable_channel(struct mbox_chan *chan) in sti_mbox_enable_channel() 132 static void sti_mbox_disable_channel(struct mbox_chan *chan) in sti_mbox_disable_channel() 147 static void sti_mbox_clear_irq(struct mbox_chan *chan) in sti_mbox_clear_irq() 158 static struct mbox_chan *sti_mbox_irq_to_channel(struct sti_mbox_device *mdev, in sti_mbox_irq_to_channel() 162 struct mbox_chan *chan = NULL; in sti_mbox_irq_to_channel() 193 struct mbox_chan *chan; in sti_mbox_thread_handler() 216 struct mbox_chan *chan; in sti_mbox_irq_handler() 249 static bool sti_mbox_tx_is_ready(struct mbox_chan *chan) in sti_mbox_tx_is_ready() [all …]
|
| H A D | sun6i-msgbox.c | 53 static bool sun6i_msgbox_last_tx_done(struct mbox_chan *chan); 54 static bool sun6i_msgbox_peek_data(struct mbox_chan *chan); 56 static inline int channel_number(struct mbox_chan *chan) in channel_number() 61 static inline struct sun6i_msgbox *to_sun6i_msgbox(struct mbox_chan *chan) in to_sun6i_msgbox() 80 struct mbox_chan *chan = &mbox->controller.chans[n]; in sun6i_msgbox_irq() 99 static int sun6i_msgbox_send_data(struct mbox_chan *chan, void *data) in sun6i_msgbox_send_data() 115 static int sun6i_msgbox_startup(struct mbox_chan *chan) in sun6i_msgbox_startup() 139 static void sun6i_msgbox_shutdown(struct mbox_chan *chan) in sun6i_msgbox_shutdown() 162 static bool sun6i_msgbox_last_tx_done(struct mbox_chan *chan) in sun6i_msgbox_last_tx_done() 179 static bool sun6i_msgbox_peek_data(struct mbox_chan *chan) in sun6i_msgbox_peek_data() [all …]
|
| H A D | mtk-adsp-mailbox.c | 38 struct mbox_chan *chan = data; in mtk_adsp_mbox_irq() 49 struct mbox_chan *chan = data; in mtk_adsp_mbox_isr() 56 static struct mbox_chan *mtk_adsp_mbox_xlate(struct mbox_controller *mbox, in mtk_adsp_mbox_xlate() 62 static int mtk_adsp_mbox_startup(struct mbox_chan *chan) in mtk_adsp_mbox_startup() 73 static void mtk_adsp_mbox_shutdown(struct mbox_chan *chan) in mtk_adsp_mbox_shutdown() 82 static int mtk_adsp_mbox_send_data(struct mbox_chan *chan, void *data) in mtk_adsp_mbox_send_data() 92 static bool mtk_adsp_mbox_last_tx_done(struct mbox_chan *chan) in mtk_adsp_mbox_last_tx_done()
|
| H A D | bcm2835-mailbox.c | 61 static struct bcm2835_mbox *bcm2835_link_mbox(struct mbox_chan *link) in bcm2835_link_mbox() 70 struct mbox_chan *link = &mbox->controller.chans[0]; in bcm2835_mbox_irq() 80 static int bcm2835_send_data(struct mbox_chan *link, void *data) in bcm2835_send_data() 92 static int bcm2835_startup(struct mbox_chan *link) in bcm2835_startup() 102 static void bcm2835_shutdown(struct mbox_chan *link) in bcm2835_shutdown() 109 static bool bcm2835_last_tx_done(struct mbox_chan *link) in bcm2835_last_tx_done() 127 static struct mbox_chan *bcm2835_mbox_index_xlate(struct mbox_controller *mbox, in bcm2835_mbox_index_xlate()
|
| H A D | hi3660-mailbox.c | 73 struct mbox_chan chan[MBOX_CHAN_MAX]; 83 static int hi3660_mbox_check_state(struct mbox_chan *chan) in hi3660_mbox_check_state() 110 static int hi3660_mbox_unlock(struct mbox_chan *chan) in hi3660_mbox_unlock() 131 static int hi3660_mbox_acquire_channel(struct mbox_chan *chan) in hi3660_mbox_acquire_channel() 157 static int hi3660_mbox_startup(struct mbox_chan *chan) in hi3660_mbox_startup() 172 static int hi3660_mbox_send_data(struct mbox_chan *chan, void *msg) in hi3660_mbox_send_data() 209 static struct mbox_chan *hi3660_mbox_xlate(struct mbox_controller *controller, in hi3660_mbox_xlate() 239 struct mbox_chan *chan; in hi3660_mbox_probe()
|
| H A D | cix-mailbox.c | 85 struct mbox_chan *chan; 95 struct mbox_chan mbox_chans[CIX_MBOX_CHANS]; 131 static bool mbox_fifo_empty(struct mbox_chan *chan) in mbox_fifo_empty() 150 static int cix_mbox_send_data_db(struct mbox_chan *chan, void *data) in cix_mbox_send_data_db() 160 static int cix_mbox_send_data_reg(struct mbox_chan *chan, void *data) in cix_mbox_send_data_reg() 179 static int cix_mbox_send_data_fifo(struct mbox_chan *chan, void *data) in cix_mbox_send_data_fifo() 201 static int cix_mbox_send_data_fast(struct mbox_chan *chan, void *data) in cix_mbox_send_data_fast() 221 static int cix_mbox_send_data(struct mbox_chan *chan, void *data) in cix_mbox_send_data() 251 static void cix_mbox_isr_db(struct mbox_chan *chan) in cix_mbox_isr_db() 275 static void cix_mbox_isr_reg(struct mbox_chan *chan) in cix_mbox_isr_reg() [all …]
|
| H A D | platform_mhu.c | 43 struct mbox_chan chan[MHU_CHANS]; 49 struct mbox_chan *chan = p; in platform_mhu_rx_interrupt() 64 static bool platform_mhu_last_tx_done(struct mbox_chan *chan) in platform_mhu_last_tx_done() 72 static int platform_mhu_send_data(struct mbox_chan *chan, void *data) in platform_mhu_send_data() 82 static int platform_mhu_startup(struct mbox_chan *chan) in platform_mhu_startup() 102 static void platform_mhu_shutdown(struct mbox_chan *chan) in platform_mhu_shutdown()
|
| H A D | qcom-cpucp-mbox.c | 37 struct mbox_chan chans[APSS_CPUCP_IPC_CHAN_SUPPORTED]; 43 static inline int channel_number(struct mbox_chan *chan) in channel_number() 58 struct mbox_chan *chan = &cpucp->chans[i]; in qcom_cpucp_mbox_irq_fn() 72 static int qcom_cpucp_mbox_startup(struct mbox_chan *chan) in qcom_cpucp_mbox_startup() 85 static void qcom_cpucp_mbox_shutdown(struct mbox_chan *chan) in qcom_cpucp_mbox_shutdown() 96 static int qcom_cpucp_mbox_send_data(struct mbox_chan *chan, void *data) in qcom_cpucp_mbox_send_data()
|
| H A D | armada-37xx-rwtm-mailbox.c | 43 static void a37xx_mbox_receive(struct mbox_chan *chan) in a37xx_mbox_receive() 58 struct mbox_chan *chan = data; in a37xx_mbox_irq_handler() 77 static int a37xx_mbox_send_data(struct mbox_chan *chan, void *data) in a37xx_mbox_send_data() 103 static int a37xx_mbox_startup(struct mbox_chan *chan) in a37xx_mbox_startup() 124 static void a37xx_mbox_shutdown(struct mbox_chan *chan) in a37xx_mbox_shutdown() 146 struct mbox_chan *chans; in armada_37xx_mbox_probe()
|
| H A D | ti-msgmgr.c | 116 struct mbox_chan *chan; 144 struct mbox_chan *chans; 196 static int ti_msgmgr_queue_rx_data(struct mbox_chan *chan, struct ti_queue_inst *qinst, in ti_msgmgr_queue_rx_data() 243 static int ti_msgmgr_queue_rx_poll_timeout(struct mbox_chan *chan, int timeout_us) in ti_msgmgr_queue_rx_poll_timeout() 274 struct mbox_chan *chan = p; in ti_msgmgr_queue_rx_interrupt() 318 static bool ti_msgmgr_queue_peek_data(struct mbox_chan *chan) in ti_msgmgr_queue_peek_data() 345 static bool ti_msgmgr_last_tx_done(struct mbox_chan *chan) in ti_msgmgr_last_tx_done() 372 static bool ti_msgmgr_chan_has_polled_queue_rx(struct mbox_chan *chan) in ti_msgmgr_chan_has_polled_queue_rx() 390 static int ti_msgmgr_send_data(struct mbox_chan *chan, void *data) in ti_msgmgr_send_data() 466 struct mbox_chan *chan) in ti_msgmgr_queue_rx_irq_req() [all …]
|
| H A D | hi6220-mailbox.c | 83 struct mbox_chan *chan; 110 static bool hi6220_mbox_last_tx_done(struct mbox_chan *chan) in hi6220_mbox_last_tx_done() 123 static int hi6220_mbox_send_data(struct mbox_chan *chan, void *msg) in hi6220_mbox_send_data() 153 struct mbox_chan *chan; in hi6220_mbox_interrupt() 194 static int hi6220_mbox_startup(struct mbox_chan *chan) in hi6220_mbox_startup() 206 static void hi6220_mbox_shutdown(struct mbox_chan *chan) in hi6220_mbox_shutdown() 223 static struct mbox_chan *hi6220_mbox_xlate(struct mbox_controller *controller, in hi6220_mbox_xlate() 228 struct mbox_chan *chan; in hi6220_mbox_xlate()
|
| H A D | bcm74110-mailbox.c | 111 struct bcm74110_mbox_chan *mbox_chan; member 159 struct mbox_chan *chan; in bcm74110_rx_process_msg() 469 static int bcm74110_mbox_send_data(struct mbox_chan *chan, void *data) in bcm74110_mbox_send_data() 488 static int bcm74110_mbox_chan_startup(struct mbox_chan *chan) in bcm74110_mbox_chan_startup() 497 static void bcm74110_mbox_chan_shutdown(struct mbox_chan *chan) in bcm74110_mbox_chan_shutdown() 532 static struct mbox_chan *bcm74110_mbox_of_xlate(struct mbox_controller *cntrl, in bcm74110_mbox_of_xlate() 616 mbox->mbox_chan = devm_kcalloc(dev, BCM_MSG_SVC_MAX, in bcm74110_mbox_probe() 617 sizeof(*mbox->mbox_chan), in bcm74110_mbox_probe() 619 if (!mbox->mbox_chan) in bcm74110_mbox_probe() 623 mbox->mbox_chan[i].mbox = mbox; in bcm74110_mbox_probe() [all …]
|
| H A D | ast2700-mailbox.c | 37 static inline int ch_num(struct mbox_chan *chan) in ch_num() 64 struct mbox_chan *chan = &mb->mbox.chans[n]; in ast2700_mbox_irq() 84 static int ast2700_mbox_send_data(struct mbox_chan *chan, void *data) in ast2700_mbox_send_data() 113 static int ast2700_mbox_startup(struct mbox_chan *chan) in ast2700_mbox_startup() 127 static void ast2700_mbox_shutdown(struct mbox_chan *chan) in ast2700_mbox_shutdown() 139 static bool ast2700_mbox_last_tx_done(struct mbox_chan *chan) in ast2700_mbox_last_tx_done()
|
| H A D | mailbox-xgene-slimpro.c | 45 struct mbox_chan *chan; 65 struct mbox_chan chans[MBOX_CNT]; 118 static int slimpro_mbox_send_data(struct mbox_chan *chan, void *msg) in slimpro_mbox_send_data() 126 static int slimpro_mbox_startup(struct mbox_chan *chan) in slimpro_mbox_startup() 151 static void slimpro_mbox_shutdown(struct mbox_chan *chan) in slimpro_mbox_shutdown()
|
| /linux/drivers/remoteproc/ |
| H A D | st_remoteproc.c | 50 struct mbox_chan *mbox_chan[ST_RPROC_MAX_VRING * MBOX_MAX]; member 85 ret = mbox_send_message(ddata->mbox_chan[vqid * MBOX_MAX + MBOX_TX], in st_rproc_kick() 334 struct mbox_chan *chan; in st_rproc_probe() 390 ddata->mbox_chan[ST_RPROC_VQ0 * MBOX_MAX + MBOX_RX] = chan; in st_rproc_probe() 398 ddata->mbox_chan[ST_RPROC_VQ0 * MBOX_MAX + MBOX_TX] = chan; in st_rproc_probe() 406 ddata->mbox_chan[ST_RPROC_VQ1 * MBOX_MAX + MBOX_RX] = chan; in st_rproc_probe() 414 ddata->mbox_chan[ST_RPROC_VQ1 * MBOX_MAX + MBOX_TX] = chan; in st_rproc_probe() 425 mbox_free_channel(ddata->mbox_chan[i]); in st_rproc_probe() 443 mbox_free_channel(ddata->mbox_chan[i]); in st_rproc_remove()
|
| /linux/drivers/rpmsg/ |
| H A D | qcom_glink_smem.c | 45 struct mbox_chan *mbox_chan; member 200 mbox_send_message(smem->mbox_chan, NULL); in glink_smem_tx_kick() 201 mbox_client_txdone(smem->mbox_chan, 0); in glink_smem_tx_kick() 318 smem->mbox_chan = mbox_request_channel(&smem->mbox_client, 0); in qcom_glink_smem_register() 319 if (IS_ERR(smem->mbox_chan)) { in qcom_glink_smem_register() 320 ret = dev_err_probe(&smem->dev, PTR_ERR(smem->mbox_chan), in qcom_glink_smem_register() 354 mbox_free_channel(smem->mbox_chan); in qcom_glink_smem_register() 371 mbox_free_channel(smem->mbox_chan); in qcom_glink_smem_unregister()
|
| H A D | qcom_glink_rpm.c | 63 struct mbox_chan *mbox_chan; member 200 mbox_send_message(rpm->mbox_chan, NULL); in glink_rpm_tx_kick() 201 mbox_client_txdone(rpm->mbox_chan, 0); in glink_rpm_tx_kick() 330 rpm->mbox_chan = mbox_request_channel(&rpm->mbox_client, 0); in glink_rpm_probe() 331 if (IS_ERR(rpm->mbox_chan)) in glink_rpm_probe() 332 return dev_err_probe(dev, PTR_ERR(rpm->mbox_chan), "failed to acquire IPC channel\n"); in glink_rpm_probe() 351 mbox_free_channel(rpm->mbox_chan); in glink_rpm_probe() 373 mbox_free_channel(rpm->mbox_chan); in glink_rpm_remove()
|
| /linux/drivers/soc/qcom/ |
| H A D | smsm.c | 134 struct mbox_chan *mbox_chan; member 185 if (hostp->mbox_chan) { in smsm_update_bits() 186 mbox_send_message(hostp->mbox_chan, NULL); in smsm_update_bits() 187 mbox_client_txdone(hostp->mbox_chan, 0); in smsm_update_bits() 381 host->mbox_chan = mbox_request_channel(&smsm->mbox_client, host_id); in smsm_parse_mbox() 382 if (IS_ERR(host->mbox_chan)) { in smsm_parse_mbox() 383 ret = PTR_ERR(host->mbox_chan); in smsm_parse_mbox() 384 host->mbox_chan = NULL; in smsm_parse_mbox() 656 mbox_free_channel(smsm->hosts[id].mbox_chan); in qcom_smsm_probe() 672 mbox_free_channel(smsm->hosts[id].mbox_chan); in qcom_smsm_remove()
|
| /linux/drivers/i2c/busses/ |
| H A D | i2c-xgene-slimpro.c | 97 struct mbox_chan *mbox_chan; member 220 rc = mbox_send_message(ctx->mbox_chan, msg); in slimpro_i2c_send_msg() 228 mbox_chan_txdone(ctx->mbox_chan, 0); in slimpro_i2c_send_msg() 459 ctx->mbox_chan = mbox_request_channel(cl, MAILBOX_I2C_INDEX); in xgene_slimpro_i2c_probe() 460 if (IS_ERR(ctx->mbox_chan)) in xgene_slimpro_i2c_probe() 461 return dev_err_probe(&pdev->dev, PTR_ERR(ctx->mbox_chan), in xgene_slimpro_i2c_probe() 484 ctx->mbox_chan = pcc_chan->mchan; in xgene_slimpro_i2c_probe() 486 if (!ctx->mbox_chan->mbox->txdone_irq) { in xgene_slimpro_i2c_probe() 515 mbox_free_channel(ctx->mbox_chan); in xgene_slimpro_i2c_probe() 529 mbox_free_channel(ctx->mbox_chan); in xgene_slimpro_i2c_remove()
|
| /linux/include/linux/firmware/imx/ |
| H A D | dsp.h | 20 struct mbox_chan *ch; 52 struct mbox_chan *imx_dsp_request_channel(struct imx_dsp_ipc *ipc, int idx); 63 struct mbox_chan *imx_dsp_request_channel(struct imx_dsp_ipc *ipc, int idx) in imx_dsp_request_channel()
|
| /linux/drivers/irqchip/ |
| H A D | irq-qcom-mpm.c | 82 struct mbox_chan *mbox_chan; member 305 ret = mbox_send_message(priv->mbox_chan, NULL); in mpm_pd_power_off() 309 mbox_client_txdone(priv->mbox_chan, 0); in mpm_pd_power_off() 440 priv->mbox_chan = mbox_request_channel(&priv->mbox_client, 0); in qcom_mpm_probe() 441 if (IS_ERR(priv->mbox_chan)) { in qcom_mpm_probe() 442 ret = PTR_ERR(priv->mbox_chan); in qcom_mpm_probe() 477 mbox_free_channel(priv->mbox_chan); in qcom_mpm_probe()
|