/* * imx_dsp_ring_doorbell - triggers an interrupt on the other side (DSP) * * @dsp: DSP IPC handle * @chan_idx: index of the channel where to trigger the interrupt * * Returns non-negative value for success, negative value for error
*/ int imx_dsp_ring_doorbell(struct imx_dsp_ipc *ipc, unsignedint idx)
{ int ret; struct imx_dsp_chan *dsp_chan;
if (idx >= DSP_MU_CHAN_NUM) return -EINVAL;
dsp_chan = &ipc->chans[idx];
ret = mbox_send_message(dsp_chan->ch, NULL); if (ret < 0) return ret;
return 0;
}
EXPORT_SYMBOL(imx_dsp_ring_doorbell);
/* * imx_dsp_handle_rx - rx callback used by imx mailbox * * @c: mbox client * @msg: message received * * Users of DSP IPC will need to privde handle_reply and handle_request * callbacks.
*/ staticvoid imx_dsp_handle_rx(struct mbox_client *c, void *msg)
{ struct imx_dsp_chan *chan = container_of(c, struct imx_dsp_chan, cl);
staticint imx_dsp_setup_channels(struct imx_dsp_ipc *dsp_ipc)
{ struct device *dev = dsp_ipc->dev; struct imx_dsp_chan *dsp_chan; struct mbox_client *cl; char *chan_name; int ret; int i, j;
for (i = 0; i < DSP_MU_CHAN_NUM; i++) { if (i < 2)
chan_name = kasprintf(GFP_KERNEL, "txdb%d", i); else
chan_name = kasprintf(GFP_KERNEL, "rxdb%d", i - 2);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.