Messages in this thread | | | Date | Tue, 4 Jun 2019 10:01:23 +0100 | From | Sudeep Holla <> | Subject | Re: [PATCH 1/6] mailbox: add support for doorbell/signal mode controllers |
| |
On Mon, Jun 03, 2019 at 04:51:05PM -0500, Jassi Brar wrote: > On Fri, May 31, 2019 at 9:33 AM Sudeep Holla <sudeep.holla@arm.com> wrote: > > > 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. >
Agreed, I did have that. But then I thought this API makes it even clearer to the users that no data is expected. I am fine either way.
-- Regards, Sudeep
| |