Skip to content

Commit

Permalink
soc: fsl: cpm1: qmc: Fix dependency on fsl_soc.h
Browse files Browse the repository at this point in the history
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: 8655b76 ("soc: fsl: cpm1: qmc: Handle QUICC Engine (QE) soft-qmc firmware")
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Acked-by: Herve Codina <herve.codina@bootlin.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
  • Loading branch information
chleroy authored and arndb committed Sep 4, 2024
1 parent a0e199e commit d205c06
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/soc/fsl/qe/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d205c06

Please sign in to comment.