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.

> +       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.


> +#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?



thanks.
-- 
~Randy

Reply via email to