From: Mathieu Poirier <mathieu.poirier@linaro.org>
To: Arnd Bergmann <arnd@kernel.org>
Cc: Jassi Brar <jassisinghbrar@gmail.com>,
Bjorn Andersson <andersson@kernel.org>,
Hari Nagalla <hnagalla@ti.com>, Andrew Davis <afd@ti.com>,
Martyn Welch <martyn.welch@collabora.com>,
Arnd Bergmann <arnd@arndb.de>,
Konrad Dybcio <konradybcio@kernel.org>,
linux-kernel@vger.kernel.org, linux-remoteproc@vger.kernel.org
Subject: Re: [PATCH] mailbox, remoteproc: omap2+: fix compile testing
Date: Tue, 10 Sep 2024 08:59:34 -0600 [thread overview]
Message-ID: <ZuBe1g3tlpvOD5Cu@p14s> (raw)
In-Reply-To: <20240909203825.1666947-1-arnd@kernel.org>
On Mon, Sep 09, 2024 at 08:38:09PM +0000, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> Selecting CONFIG_OMAP2PLUS_MBOX while compile testing
> causes a build failure:
>
> WARNING: unmet direct dependencies detected for OMAP2PLUS_MBOX
> Depends on [n]: MAILBOX [=y] && (ARCH_OMAP2PLUS || ARCH_K3)
> Selected by [m]:
> - TI_K3_M4_REMOTEPROC [=m] && REMOTEPROC [=y] && (ARCH_K3 || COMPILE_TEST [=y])
>
> Using 'select' to force-enable another subsystem is generally
> a mistake and causes problems such as this one, so change the
> three drivers that link against this driver to use 'depends on'
> instead, and ensure the driver itself can be compile tested
> regardless of the platform.
>
> When compile-testing without CONFIG_TI_SCI_PROTOCOL=m, there
> is a chance for a link failure, so add a careful dependency
> on that.
>
> arm-linux-gnueabi-ld: drivers/remoteproc/ti_k3_m4_remoteproc.o: in function `k3_m4_rproc_probe':
> ti_k3_m4_remoteproc.c:(.text.k3_m4_rproc_probe+0x76): undefined reference to `devm_ti_sci_get_by_phandle'
>
> Fixes: ebcf9008a895 ("remoteproc: k3-m4: Add a remoteproc driver for M4F subsystem")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/mailbox/Kconfig | 2 +-
> drivers/mailbox/omap-mailbox.c | 2 +-
> drivers/remoteproc/Kconfig | 10 ++++------
For the remoteproc part:
Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
> 3 files changed, 6 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/mailbox/Kconfig b/drivers/mailbox/Kconfig
> index 4eed97295927..ecaf78beb934 100644
> --- a/drivers/mailbox/Kconfig
> +++ b/drivers/mailbox/Kconfig
> @@ -73,7 +73,7 @@ config ARMADA_37XX_RWTM_MBOX
>
> config OMAP2PLUS_MBOX
> tristate "OMAP2+ Mailbox framework support"
> - depends on ARCH_OMAP2PLUS || ARCH_K3
> + depends on ARCH_OMAP2PLUS || ARCH_K3 || COMPILE_TEST
> help
> Mailbox implementation for OMAP family chips with hardware for
> interprocessor communication involving DSP, IVA1.0 and IVA2 in
> diff --git a/drivers/mailbox/omap-mailbox.c b/drivers/mailbox/omap-mailbox.c
> index 7a87424657a1..6797770474a5 100644
> --- a/drivers/mailbox/omap-mailbox.c
> +++ b/drivers/mailbox/omap-mailbox.c
> @@ -603,7 +603,7 @@ static struct platform_driver omap_mbox_driver = {
> .driver = {
> .name = "omap-mailbox",
> .pm = &omap_mbox_pm_ops,
> - .of_match_table = of_match_ptr(omap_mailbox_of_match),
> + .of_match_table = omap_mailbox_of_match,
> },
> };
> module_platform_driver(omap_mbox_driver);
> diff --git a/drivers/remoteproc/Kconfig b/drivers/remoteproc/Kconfig
> index 0f0862e20a93..62f8548fb46a 100644
> --- a/drivers/remoteproc/Kconfig
> +++ b/drivers/remoteproc/Kconfig
> @@ -330,8 +330,7 @@ config STM32_RPROC
> config TI_K3_DSP_REMOTEPROC
> tristate "TI K3 DSP remoteproc support"
> depends on ARCH_K3
> - select MAILBOX
> - select OMAP2PLUS_MBOX
> + depends on OMAP2PLUS_MBOX
> help
> Say m here to support TI's C66x and C71x DSP remote processor
> subsystems on various TI K3 family of SoCs through the remote
> @@ -343,8 +342,8 @@ config TI_K3_DSP_REMOTEPROC
> config TI_K3_M4_REMOTEPROC
> tristate "TI K3 M4 remoteproc support"
> depends on ARCH_K3 || COMPILE_TEST
> - select MAILBOX
> - select OMAP2PLUS_MBOX
> + depends on TI_SCI_PROTOCOL || (COMPILE_TEST && TI_SCI_PROTOCOL=n)
> + depends on OMAP2PLUS_MBOX
> help
> Say m here to support TI's M4 remote processor subsystems
> on various TI K3 family of SoCs through the remote processor
> @@ -356,8 +355,7 @@ config TI_K3_M4_REMOTEPROC
> config TI_K3_R5_REMOTEPROC
> tristate "TI K3 R5 remoteproc support"
> depends on ARCH_K3
> - select MAILBOX
> - select OMAP2PLUS_MBOX
> + depends on OMAP2PLUS_MBOX
> help
> Say m here to support TI's R5F remote processor subsystems
> on various TI K3 family of SoCs through the remote processor
> --
> 2.39.2
>
next prev parent reply other threads:[~2024-09-10 14:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-09 20:38 [PATCH] mailbox, remoteproc: omap2+: fix compile testing Arnd Bergmann
2024-09-10 14:59 ` Mathieu Poirier [this message]
2024-09-10 15:13 ` Andrew Davis
2024-09-12 15:31 ` Martyn Welch
2024-09-23 0:27 ` Jassi Brar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZuBe1g3tlpvOD5Cu@p14s \
--to=mathieu.poirier@linaro.org \
--cc=afd@ti.com \
--cc=andersson@kernel.org \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=hnagalla@ti.com \
--cc=jassisinghbrar@gmail.com \
--cc=konradybcio@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=martyn.welch@collabora.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.