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

From: Jassi Brar
Date: Mon Jun 03 2019 - 17:55:08 EST


On Fri, May 31, 2019 at 9:33 AM Sudeep Holla <sudeep.holla@xxxxxxx> 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.

Thanks.