Part Number:AM5728
Tool/software: Linux
Hello,I tried to figure it out how A15 kicks PRU through RPMSG & mailbox,can you help me ,thanks ahead.
I read drivers/remoteproc/pru_rproc.c
static void pru_rproc_kick(struct rproc *rproc, int vq_id)
{
struct device *dev = &rproc->dev;
struct pru_rproc *pru = rproc->priv;
int ret;
dev_dbg(dev, "kicking vqid %d on PRU%d\n", vq_id, pru->id);
if (pru->mbox) {
/*
* send the index of the triggered virtqueue in the mailbox
* payload
*/
ret = mbox_send_message(pru->mbox, (void *)vq_id);
if (ret < 0)
dev_err(dev, "mbox_send_message failed: %d\n", ret);
} else if (pru->irq_kick > 0) {
ret = pruss_intc_trigger(pru->irq_kick);
if (ret < 0)
dev_err(dev, "pruss_intc_trigger failed: %d\n", ret);
}
}
And I thought the driver rpmsg_pru should call "pru_rproc_kick" when it A15 send data out .
But : in drivers/rpmsg/rpmsg_pru.c("-->" means call )
rpmsg_write() --> rmpsg_send() --> virtio_rpmsg_send --> rpmsg_send_offchannel_raw --> virtqueue_kick
I am now getting confused , question is :
1. How do the driver "rpmsg_pru.c" kicks PRU, I think the driver must access mailbox.
2.How do these drivers cooperate? "rpmsg_pru.c", "pru_rproc.c", "omap-mailbox.c"
![]()