Thread (19 messages) 19 messages, 3 authors, 2019-06-13

Re: [PATCH 1/6] mailbox: add support for doorbell/signal mode controllers

From: Jassi Brar <jassisinghbrar@gmail.com>
Date: 2019-06-03 21:51:18
Also in: lkml

On Fri, May 31, 2019 at 9:33 AM Sudeep Holla [off-list ref] wrote:
quoted hunk ↗ jump to hunk
diff --git a/drivers/mailbox/mailbox.c b/drivers/mailbox/mailbox.c
index 38d9df3fb199..e26a079f8223 100644
--- a/drivers/mailbox/mailbox.c
+++ b/drivers/mailbox/mailbox.c
@@ -77,7 +77,10 @@ static void msg_submit(struct mbox_chan *chan)
        if (chan->cl->tx_prepare)
                chan->cl->tx_prepare(chan->cl, data);
        /* Try to submit a message to the MBOX controller */
-       err = chan->mbox->ops->send_data(chan, data);
+       if (chan->mbox->ops->send_data)
+               err = chan->mbox->ops->send_data(chan, data);
+       else
+               err = chan->mbox->ops->send_signal(chan);
        if (!err) {
                chan->active_req = data;
                chan->msg_count--;
The  'void *data'  parameter in send_data() is controller specific.
The doorbell controllers should simply ignore that.

So signal/doorbell controllers are already supported fine. See
drivers/mailbox/tegra-hsp.c for example.

Thanks.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help