* [PATCH] soc: fsl: cpm1: qmc: Fix dependency on fsl_soc.h
@ 2024-09-04 7:51 Christophe Leroy
2024-09-04 8:33 ` Herve Codina
0 siblings, 1 reply; 2+ messages in thread
From: Christophe Leroy @ 2024-09-04 7:51 UTC (permalink / raw)
To: Stephen Rothwell, Arnd Bergmann
Cc: Christophe Leroy, linuxppc-dev, linux-arm-kernel, linux-kernel,
Qiang Zhao, Herve Codina
QMC driver requires fsl_soc.h to use function get_immrbase().
This header is provided by powerpc architecture and the functions
it declares are defined only when FSL_SOC is selected.
Today the dependency is the following:
depends on CPM1 || QUICC_ENGINE || \
(FSL_SOC && (CPM || QUICC_ENGINE) && COMPILE_TEST)
This dependency tentatively ensure that FSL_SOC is there when doing a
COMPILE_TEST.
CPM1 is only selected by PPC_8xx and cannot be selected manually.
CPM1 selects FSL_SOC
QUICC_ENGINE on the other hand can be selected by ARM or ARM64 which
doesn't select FSL_SOC. QUICC_ENGINE can also be selected with just
COMPILE_TEST.
It is therefore possible to end up with CPM_QMC selected
without FSL_SOC.
So fix it by making it depend on FSL_SOC at all time.
The rest of the above dependency is the same as the one for CPM_TSA on
which CPM_QMC also depends, so it can go away, leaving only a simple
dependency on FSL_SOC.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Closes: https://lore.kernel.org/lkml/20240904104859.020fe3a9@canb.auug.org.au/
Fixes: 8655b76b7004 ("soc: fsl: cpm1: qmc: Handle QUICC Engine (QE) soft-qmc firmware")
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
---
drivers/soc/fsl/qe/Kconfig | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/soc/fsl/qe/Kconfig b/drivers/soc/fsl/qe/Kconfig
index 5e3c996eb19e..eb03f42ab978 100644
--- a/drivers/soc/fsl/qe/Kconfig
+++ b/drivers/soc/fsl/qe/Kconfig
@@ -48,8 +48,7 @@ config CPM_TSA
config CPM_QMC
tristate "CPM/QE QMC support"
depends on OF && HAS_IOMEM
- depends on CPM1 || QUICC_ENGINE || \
- (FSL_SOC && (CPM || QUICC_ENGINE) && COMPILE_TEST)
+ depends on FSL_SOC
depends on CPM_TSA
help
Freescale CPM/QE QUICC Multichannel Controller
--
2.44.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] soc: fsl: cpm1: qmc: Fix dependency on fsl_soc.h
2024-09-04 7:51 [PATCH] soc: fsl: cpm1: qmc: Fix dependency on fsl_soc.h Christophe Leroy
@ 2024-09-04 8:33 ` Herve Codina
0 siblings, 0 replies; 2+ messages in thread
From: Herve Codina @ 2024-09-04 8:33 UTC (permalink / raw)
To: Christophe Leroy
Cc: Stephen Rothwell, Arnd Bergmann, linuxppc-dev, linux-arm-kernel,
linux-kernel, Qiang Zhao
Hi Christophe,
On Wed, 4 Sep 2024 09:51:09 +0200
Christophe Leroy <christophe.leroy@csgroup.eu> wrote:
> QMC driver requires fsl_soc.h to use function get_immrbase().
> This header is provided by powerpc architecture and the functions
> it declares are defined only when FSL_SOC is selected.
>
> Today the dependency is the following:
>
> depends on CPM1 || QUICC_ENGINE || \
> (FSL_SOC && (CPM || QUICC_ENGINE) && COMPILE_TEST)
>
> This dependency tentatively ensure that FSL_SOC is there when doing a
> COMPILE_TEST.
>
> CPM1 is only selected by PPC_8xx and cannot be selected manually.
> CPM1 selects FSL_SOC
>
> QUICC_ENGINE on the other hand can be selected by ARM or ARM64 which
> doesn't select FSL_SOC. QUICC_ENGINE can also be selected with just
> COMPILE_TEST.
>
> It is therefore possible to end up with CPM_QMC selected
> without FSL_SOC.
>
> So fix it by making it depend on FSL_SOC at all time.
>
> The rest of the above dependency is the same as the one for CPM_TSA on
> which CPM_QMC also depends, so it can go away, leaving only a simple
> dependency on FSL_SOC.
>
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Closes: https://lore.kernel.org/lkml/20240904104859.020fe3a9@canb.auug.org.au/
> Fixes: 8655b76b7004 ("soc: fsl: cpm1: qmc: Handle QUICC Engine (QE) soft-qmc firmware")
> Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Thanks for this patch!
Acked-by: Herve Codina <herve.codina@bootlin.com>
Best regards,
Hervé
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-09-04 8:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-04 7:51 [PATCH] soc: fsl: cpm1: qmc: Fix dependency on fsl_soc.h Christophe Leroy
2024-09-04 8:33 ` Herve Codina
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).