[PATCH v3 2/2] mailbox: Add Broadcom STB mailbox driver

Jim Quinlan james.quinlan at broadcom.com
Sat Sep 19 17:04:57 EDT 2020


On Sat, Sep 19, 2020 at 3:32 PM Randy Dunlap <rdunlap at infradead.org> wrote:
>
> Hi Jim,
>
> On 9/19/20 12:22 PM, Jim Quinlan wrote:
> > ---
> >  drivers/mailbox/Kconfig           |  12 +++
> >  drivers/mailbox/Makefile          |   2 +
> >  drivers/mailbox/brcmstb-mailbox.c | 173 ++++++++++++++++++++++++++++++
> >  3 files changed, 187 insertions(+)
> >  create mode 100644 drivers/mailbox/brcmstb-mailbox.c
> >
> > diff --git a/drivers/mailbox/Kconfig b/drivers/mailbox/Kconfig
> > index 05b1009e2820..96faf1139cb9 100644
> > --- a/drivers/mailbox/Kconfig
> > +++ b/drivers/mailbox/Kconfig
> > @@ -254,4 +254,16 @@ config QCOM_IPCC
> >         acts as an interrupt controller for receiving interrupts from clients.
> >         Say Y here if you want to build this driver.
> >
> > +config BRCMSTB_MBOX
> > +     tristate "Broadcom STB Mailbox"
> > +     depends on ARM64 || ARM
> > +     depends on ARM_SCMI_PROTOCOL && ARCH_BRCMSTB
> > +     default ARM_SCMI_PROTOCOL && ARCH_BRCMSTB
> > +        help
>
> "help" is still indented with spaces instead of one tab.
> You probably should wait a bit to see if there are other comments on this patch
> before doing a v4.
Hi Randy,

Will fix, then wait...
>
> > +       Mailbox implementation of the Broadcom STB for the sole purposes
> > +       of SCMI communication.  This is used by the SCMI drivers to
> > +       communicate with FW that runs in EL3.  This mailbox only implements
> > +       the agent-to-platform channgel of SCMI but may be augmented in
> > +       the future to add the platform-to-agent channel.
> > +
> >  endif
> > diff --git a/drivers/mailbox/brcmstb-mailbox.c b/drivers/mailbox/brcmstb-mailbox.c
> > new file mode 100644
> > index 000000000000..27d87938b08c
> > --- /dev/null
> > +++ b/drivers/mailbox/brcmstb-mailbox.c
> > @@ -0,0 +1,173 @@
> > +// SPDX-License-Identifier: GPL-2.0
> > +/* Copyright (c) 2017, Broadcom */
>
> 2017 is a little surprising.
Will fix.

>
>
> > +#if defined(CONFIG_ARM64) || defined(CONFIG_ARM)
> > +static int announce_msg(unsigned int mbox_num, unsigned int ch)
> > +{
> > +     struct arm_smccc_res res;
> > +
> > +     if (ch >= NUM_CHAN)
> > +             return -EIO;
> > +     arm_smccc_smc(BRCM_FID(ch), mbox_num, 0, 0, 0, 0, 0, 0, &res);
> > +     if (res.a0)
> > +             return -EIO;
> > +     return 0;
> > +}
> > +#else
> > +#error Func announce_msg() not defined for the current ARCH
> > +#endif
>
> This is handled by the Kconfig depends on clause.
> Why is it repeated here?
Will fix.

Thanks,
Jim
>
>
>
> thanks.
> --
> ~Randy
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4167 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20200919/343ff7e7/attachment-0001.p7s>


More information about the linux-arm-kernel mailing list