Skip to contentSkip to conversation

mmc: host: Enable compile testing of multiple drivers

PATCH In review Krzysztof Kozlowski 2 participants 5 messages Sep 7, 2020 – Sep 8, 2020 MMC, SD and SDIO

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 mmc: host: Enable compile testing of multiple drivers

Multiple MMC host controller driver can be compile tested as they do not depend on architecture specific headers.

---

Changes since v2:
1. Rebase.

Please expect conflicts around MMC_SDHCI_S3C with:
https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux.git/log/?h=next/soc-s3c-cleanup

Possible resolution:

-depends on PLAT_SAMSUNG || COMPILE_TEST
+depends on PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS || COMPILE_TEST
---
 drivers/mmc/host/Kconfig | 40 +++++++++++++++++++++-------------------
 1 file changed, 21 insertions(+), 19 deletions(-)
drivers/mmc/host/Kconfig +21 -19
index ddbed6f41c41..dc646359b4ff 100644
@@ -178,7 +178,7 @@ config MMC_SDHCI_OF_AT91
 config MMC_SDHCI_OF_ESDHC
 	tristate "SDHCI OF support for the Freescale eSDHC controller"
 	depends on MMC_SDHCI_PLTFM
-	depends on PPC || ARCH_MXC || ARCH_LAYERSCAPE
+	depends on PPC || ARCH_MXC || ARCH_LAYERSCAPE || COMPILE_TEST
 	select MMC_SDHCI_IO_ACCESSORS
 	select FSL_GUTS
 	help
@@ -216,7 +216,7 @@ config MMC_SDHCI_OF_DWCMSHC
 config MMC_SDHCI_OF_SPARX5
 	tristate "SDHCI OF support for the MCHP Sparx5 SoC"
 	depends on MMC_SDHCI_PLTFM
-	depends on ARCH_SPARX5
+	depends on ARCH_SPARX5 || COMPILE_TEST
 	help
 	  This selects the Secure Digital Host Controller Interface (SDHCI)
 	  found in the MCHP Sparx5 SoC.
@@ -238,7 +238,7 @@ config MMC_SDHCI_CADENCE
 
 config MMC_SDHCI_CNS3XXX
 	tristate "SDHCI support on the Cavium Networks CNS3xxx SoC"
-	depends on ARCH_CNS3XXX
+	depends on ARCH_CNS3XXX || COMPILE_TEST
 	depends on MMC_SDHCI_PLTFM
 	help
 	  This selects the SDHCI support for CNS3xxx System-on-Chip devices.
@@ -262,7 +262,7 @@ config MMC_SDHCI_ESDHC_MCF
 
 config MMC_SDHCI_ESDHC_IMX
 	tristate "SDHCI support for the Freescale eSDHC/uSDHC i.MX controller"
-	depends on ARCH_MXC
+	depends on ARCH_MXC || COMPILE_TEST
 	depends on MMC_SDHCI_PLTFM
 	select MMC_SDHCI_IO_ACCESSORS
 	select MMC_CQHCI
@@ -276,7 +276,7 @@ config MMC_SDHCI_ESDHC_IMX
 
 config MMC_SDHCI_DOVE
 	tristate "SDHCI support on Marvell's Dove SoC"
-	depends on ARCH_DOVE || MACH_DOVE
+	depends on ARCH_DOVE || MACH_DOVE || COMPILE_TEST
 	depends on MMC_SDHCI_PLTFM
 	select MMC_SDHCI_IO_ACCESSORS
 	help
@@ -289,7 +289,7 @@ config MMC_SDHCI_DOVE
 
 config MMC_SDHCI_TEGRA
 	tristate "SDHCI platform support for the Tegra SD/MMC Controller"
-	depends on ARCH_TEGRA
+	depends on ARCH_TEGRA || COMPILE_TEST
 	depends on MMC_SDHCI_PLTFM
 	select MMC_SDHCI_IO_ACCESSORS
 	select MMC_CQHCI
@@ -301,7 +301,8 @@ config MMC_SDHCI_TEGRA
 
 config MMC_SDHCI_S3C
 	tristate "SDHCI support on Samsung S3C SoC"
-	depends on MMC_SDHCI && PLAT_SAMSUNG
+	depends on MMC_SDHCI
+	depends on PLAT_SAMSUNG || COMPILE_TEST
 	help
 	  This selects the Secure Digital Host Controller Interface (SDHCI)
 	  often referrered to as the HSMMC block in some of the Samsung S3C
@@ -313,7 +314,7 @@ config MMC_SDHCI_S3C
 
 config MMC_SDHCI_SIRF
 	tristate "SDHCI support on CSR SiRFprimaII and SiRFmarco SoCs"
-	depends on ARCH_SIRF
+	depends on ARCH_SIRF || COMPILE_TEST
 	depends on MMC_SDHCI_PLTFM
 	select MMC_SDHCI_IO_ACCESSORS
 	help
@@ -351,7 +352,8 @@ config MMC_SDHCI_PXAV2
 
 config MMC_SDHCI_SPEAR
 	tristate "SDHCI support on ST SPEAr platform"
-	depends on MMC_SDHCI && PLAT_SPEAR
+	depends on MMC_SDHCI
+	depends on PLAT_SPEAR || COMPILE_TEST
 	depends on OF
 	help
 	  This selects the Secure Digital Host Controller Interface (SDHCI)
@@ -374,7 +376,7 @@ config MMC_SDHCI_S3C_DMA
 
 config MMC_SDHCI_BCM_KONA
 	tristate "SDHCI support on Broadcom KONA platform"
-	depends on ARCH_BCM_MOBILE
+	depends on ARCH_BCM_MOBILE || COMPILE_TEST
 	depends on MMC_SDHCI_PLTFM
 	help
 	  This selects the Broadcom Kona Secure Digital Host Controller
@@ -422,7 +424,7 @@ config MMC_SDHCI_IPROC
 
 config MMC_MESON_GX
 	tristate "Amlogic S905/GX*/AXG SD/MMC Host Controller support"
-	depends on ARCH_MESON
+	depends on ARCH_MESON|| COMPILE_TEST
 	help
 	  This selects support for the Amlogic SD/MMC Host Controller
 	  found on the S905/GX*/AXG family of SoCs.  This controller is
@@ -458,7 +460,7 @@ config MMC_MESON_MX_SDIO
 
 config MMC_MOXART
 	tristate "MOXART SD/MMC Host Controller support"
-	depends on ARCH_MOXART
+	depends on ARCH_MOXART || COMPILE_TEST
 	help
 	  This selects support for the MOXART SD/MMC Host Controller.
 	  MOXA provides one multi-functional card reader which can
@@ -467,7 +469,7 @@ config MMC_MOXART
 
 config MMC_SDHCI_ST
 	tristate "SDHCI support on STMicroelectronics SoC"
-	depends on ARCH_STI || FSP2
+	depends on ARCH_STI || FSP2 || COMPILE_TEST
 	depends on MMC_SDHCI_PLTFM
 	select MMC_SDHCI_IO_ACCESSORS
 	help
@@ -587,7 +589,7 @@ config MMC_TIFM_SD
 
 config MMC_MVSDIO
 	tristate "Marvell MMC/SD/SDIO host driver"
-	depends on PLAT_ORION
+	depends on PLAT_ORION || (COMPILE_TEST && ARM)
 	depends on OF
 	help
 	  This selects the Marvell SDIO host driver.
@@ -599,7 +601,7 @@ config MMC_MVSDIO
 
 config MMC_DAVINCI
 	tristate "TI DAVINCI Multimedia Card Interface support"
-	depends on ARCH_DAVINCI
+	depends on ARCH_DAVINCI || COMPILE_TEST
 	help
 	  This selects the TI DAVINCI Multimedia card Interface.
 	  If you have an DAVINCI board with a Multimedia Card slot,
@@ -628,7 +630,7 @@ config MMC_SPI
 
 config MMC_S3C
 	tristate "Samsung S3C SD/MMC Card Interface support"
-	depends on ARCH_S3C24XX
+	depends on ARCH_S3C24XX || COMPILE_TEST
 	depends on S3C24XX_DMAC
 	help
 	  This selects a driver for the MCI interface found in
@@ -681,7 +683,7 @@ config MMC_SDRICOH_CS
 
 config MMC_SDHCI_SPRD
 	tristate "Spreadtrum SDIO host Controller"
-	depends on ARCH_SPRD
+	depends on ARCH_SPRD || COMPILE_TEST
 	depends on MMC_SDHCI_PLTFM
 	select MMC_SDHCI_IO_ACCESSORS
 	select MMC_HSQ
@@ -698,7 +700,7 @@ config MMC_TMIO_CORE
 
 config MMC_TMIO
 	tristate "Toshiba Mobile IO Controller (TMIO) MMC/SD function support"
-	depends on MFD_TMIO || MFD_ASIC3
+	depends on MFD_TMIO || MFD_ASIC3 || COMPILE_TEST
 	select MMC_TMIO_CORE
 	help
 	  This provides support for the SD/MMC cell found in TC6393XB,
@@ -971,7 +973,7 @@ config MMC_REALTEK_USB
 
 config MMC_SUNXI
 	tristate "Allwinner sunxi SD/MMC Host Controller support"
-	depends on ARCH_SUNXI
+	depends on ARCH_SUNXI || COMPILE_TEST
 	help
 	  This selects support for the SD/MMC Host Controller on
 	  Allwinner sunxi SoCs.
Signature · 1 line
2.17.1
#1 lore raw
Quoted 5 lines · Krzysztof Kozlowski

Multiple MMC host controller driver can be compile tested as they do not depend on architecture specific headers.

Applied for next, thanks!

Quoted 8 lines

---

Changes since v2:
1. Rebase.

Please expect conflicts around MMC_SDHCI_S3C with:
https://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux.git/log/?h=next/soc-s3c-cleanup

I see. Thanks for sharing. Looks like the fixup should be possible to carry for Stephen in linux-next.

Kind regards
Uffe

Quoted 188 lines

Possible resolution:

(quoted diff) +1 -2
-depends on PLAT_SAMSUNG || COMPILE_TEST
+depends on PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS || COMPILE_TEST
---
 drivers/mmc/host/Kconfig | 40 +++++++++++++++++++++-------------------
 1 file changed, 21 insertions(+), 19 deletions(-)
drivers/mmc/host/Kconfig +21 -20
index ddbed6f41c41..dc646359b4ff 100644
@@ -178,7 +178,7 @@ config MMC_SDHCI_OF_AT91
 config MMC_SDHCI_OF_ESDHC
        tristate "SDHCI OF support for the Freescale eSDHC controller"
        depends on MMC_SDHCI_PLTFM
-       depends on PPC || ARCH_MXC || ARCH_LAYERSCAPE
+       depends on PPC || ARCH_MXC || ARCH_LAYERSCAPE || COMPILE_TEST
        select MMC_SDHCI_IO_ACCESSORS
        select FSL_GUTS
        help
@@ -216,7 +216,7 @@ config MMC_SDHCI_OF_DWCMSHC
 config MMC_SDHCI_OF_SPARX5
        tristate "SDHCI OF support for the MCHP Sparx5 SoC"
        depends on MMC_SDHCI_PLTFM
-       depends on ARCH_SPARX5
+       depends on ARCH_SPARX5 || COMPILE_TEST
        help
          This selects the Secure Digital Host Controller Interface (SDHCI)
          found in the MCHP Sparx5 SoC.
@@ -238,7 +238,7 @@ config MMC_SDHCI_CADENCE
 
 config MMC_SDHCI_CNS3XXX
        tristate "SDHCI support on the Cavium Networks CNS3xxx SoC"
-       depends on ARCH_CNS3XXX
+       depends on ARCH_CNS3XXX || COMPILE_TEST
        depends on MMC_SDHCI_PLTFM
        help
          This selects the SDHCI support for CNS3xxx System-on-Chip devices.
@@ -262,7 +262,7 @@ config MMC_SDHCI_ESDHC_MCF
 
 config MMC_SDHCI_ESDHC_IMX
        tristate "SDHCI support for the Freescale eSDHC/uSDHC i.MX controller"
-       depends on ARCH_MXC
+       depends on ARCH_MXC || COMPILE_TEST
        depends on MMC_SDHCI_PLTFM
        select MMC_SDHCI_IO_ACCESSORS
        select MMC_CQHCI
@@ -276,7 +276,7 @@ config MMC_SDHCI_ESDHC_IMX
 
 config MMC_SDHCI_DOVE
        tristate "SDHCI support on Marvell's Dove SoC"
-       depends on ARCH_DOVE || MACH_DOVE
+       depends on ARCH_DOVE || MACH_DOVE || COMPILE_TEST
        depends on MMC_SDHCI_PLTFM
        select MMC_SDHCI_IO_ACCESSORS
        help
@@ -289,7 +289,7 @@ config MMC_SDHCI_DOVE
 
 config MMC_SDHCI_TEGRA
        tristate "SDHCI platform support for the Tegra SD/MMC Controller"
-       depends on ARCH_TEGRA
+       depends on ARCH_TEGRA || COMPILE_TEST
        depends on MMC_SDHCI_PLTFM
        select MMC_SDHCI_IO_ACCESSORS
        select MMC_CQHCI
@@ -301,7 +301,8 @@ config MMC_SDHCI_TEGRA
 
 config MMC_SDHCI_S3C
        tristate "SDHCI support on Samsung S3C SoC"
-       depends on MMC_SDHCI && PLAT_SAMSUNG
+       depends on MMC_SDHCI
+       depends on PLAT_SAMSUNG || COMPILE_TEST
        help
          This selects the Secure Digital Host Controller Interface (SDHCI)
          often referrered to as the HSMMC block in some of the Samsung S3C
@@ -313,7 +314,7 @@ config MMC_SDHCI_S3C
 
 config MMC_SDHCI_SIRF
        tristate "SDHCI support on CSR SiRFprimaII and SiRFmarco SoCs"
-       depends on ARCH_SIRF
+       depends on ARCH_SIRF || COMPILE_TEST
        depends on MMC_SDHCI_PLTFM
        select MMC_SDHCI_IO_ACCESSORS
        help
@@ -351,7 +352,8 @@ config MMC_SDHCI_PXAV2
 
 config MMC_SDHCI_SPEAR
        tristate "SDHCI support on ST SPEAr platform"
-       depends on MMC_SDHCI && PLAT_SPEAR
+       depends on MMC_SDHCI
+       depends on PLAT_SPEAR || COMPILE_TEST
        depends on OF
        help
          This selects the Secure Digital Host Controller Interface (SDHCI)
@@ -374,7 +376,7 @@ config MMC_SDHCI_S3C_DMA
 
 config MMC_SDHCI_BCM_KONA
        tristate "SDHCI support on Broadcom KONA platform"
-       depends on ARCH_BCM_MOBILE
+       depends on ARCH_BCM_MOBILE || COMPILE_TEST
        depends on MMC_SDHCI_PLTFM
        help
          This selects the Broadcom Kona Secure Digital Host Controller
@@ -422,7 +424,7 @@ config MMC_SDHCI_IPROC
 
 config MMC_MESON_GX
        tristate "Amlogic S905/GX*/AXG SD/MMC Host Controller support"
-       depends on ARCH_MESON
+       depends on ARCH_MESON|| COMPILE_TEST
        help
          This selects support for the Amlogic SD/MMC Host Controller
          found on the S905/GX*/AXG family of SoCs.  This controller is
@@ -458,7 +460,7 @@ config MMC_MESON_MX_SDIO
 
 config MMC_MOXART
        tristate "MOXART SD/MMC Host Controller support"
-       depends on ARCH_MOXART
+       depends on ARCH_MOXART || COMPILE_TEST
        help
          This selects support for the MOXART SD/MMC Host Controller.
          MOXA provides one multi-functional card reader which can
@@ -467,7 +469,7 @@ config MMC_MOXART
 
 config MMC_SDHCI_ST
        tristate "SDHCI support on STMicroelectronics SoC"
-       depends on ARCH_STI || FSP2
+       depends on ARCH_STI || FSP2 || COMPILE_TEST
        depends on MMC_SDHCI_PLTFM
        select MMC_SDHCI_IO_ACCESSORS
        help
@@ -587,7 +589,7 @@ config MMC_TIFM_SD
 
 config MMC_MVSDIO
        tristate "Marvell MMC/SD/SDIO host driver"
-       depends on PLAT_ORION
+       depends on PLAT_ORION || (COMPILE_TEST && ARM)
        depends on OF
        help
          This selects the Marvell SDIO host driver.
@@ -599,7 +601,7 @@ config MMC_MVSDIO
 
 config MMC_DAVINCI
        tristate "TI DAVINCI Multimedia Card Interface support"
-       depends on ARCH_DAVINCI
+       depends on ARCH_DAVINCI || COMPILE_TEST
        help
          This selects the TI DAVINCI Multimedia card Interface.
          If you have an DAVINCI board with a Multimedia Card slot,
@@ -628,7 +630,7 @@ config MMC_SPI
 
 config MMC_S3C
        tristate "Samsung S3C SD/MMC Card Interface support"
-       depends on ARCH_S3C24XX
+       depends on ARCH_S3C24XX || COMPILE_TEST
        depends on S3C24XX_DMAC
        help
          This selects a driver for the MCI interface found in
@@ -681,7 +683,7 @@ config MMC_SDRICOH_CS
 
 config MMC_SDHCI_SPRD
        tristate "Spreadtrum SDIO host Controller"
-       depends on ARCH_SPRD
+       depends on ARCH_SPRD || COMPILE_TEST
        depends on MMC_SDHCI_PLTFM
        select MMC_SDHCI_IO_ACCESSORS
        select MMC_HSQ
@@ -698,7 +700,7 @@ config MMC_TMIO_CORE
 
 config MMC_TMIO
        tristate "Toshiba Mobile IO Controller (TMIO) MMC/SD function support"
-       depends on MFD_TMIO || MFD_ASIC3
+       depends on MFD_TMIO || MFD_ASIC3 || COMPILE_TEST
        select MMC_TMIO_CORE
        help
          This provides support for the SD/MMC cell found in TC6393XB,
@@ -971,7 +973,7 @@ config MMC_REALTEK_USB
 
 config MMC_SUNXI
        tristate "Allwinner sunxi SD/MMC Host Controller support"
-       depends on ARCH_SUNXI
+       depends on ARCH_SUNXI || COMPILE_TEST
        help
          This selects support for the SD/MMC Host Controller on
          Allwinner sunxi SoCs.
--

2.17.1

#4 lore raw
In reply to Krzysztof Kozlowski
Quoted 31 lines · Krzysztof Kozlowski
Quoted 29 lines · Ulf Hansson

+ Arnd

Quoted 5 lines · Krzysztof Kozlowski

Multiple MMC host controller driver can be compile tested as they do not depend on architecture specific headers.

It seems like this is causing build errors for my next branch when running allmod config [1].

[...]

drivers/mmc/host/Kconfig config MMC_SPI · line 636

Quoted 8 lines

config MMC_S3C
tristate "Samsung S3C SD/MMC Card Interface support"

drivers/mmc/host/Kconfig +1 -1
-       depends on ARCH_S3C24XX
+       depends on ARCH_S3C24XX || COMPILE_TEST
        depends on S3C24XX_DMAC
        help
          This selects a driver for the MCI interface found in

[...]

The problem doesn't exist in linux-next, since it has the corresponding cleanup/rework patches for MMC_S3C from Arnd.

Quoted 8 lines
Quoted 5 lines

To fix the problem, we should probably remove COMPILE_TEST for MMC_S3C, for now. Then we can add it again and send it as a fix for v5.10-rc1.

What do you think?

Yes, better to remove it otherwise it will pop up when Linus merges your tree. Do you want a patch for this or you fix it up by yourself?

I posted a patch, applying it on top. No worries.

Kind regards
Uffe

#3 lore raw
In reply to Ulf Hansson
Quoted 26 lines · Ulf Hansson

+ Arnd

Quoted 5 lines · Krzysztof Kozlowski

Multiple MMC host controller driver can be compile tested as they do not depend on architecture specific headers.

It seems like this is causing build errors for my next branch when running allmod config [1].

[...]

Quoted 8 lines

config MMC_S3C
tristate "Samsung S3C SD/MMC Card Interface support"

drivers/mmc/host/Kconfig +1 -1
-       depends on ARCH_S3C24XX
+       depends on ARCH_S3C24XX || COMPILE_TEST
        depends on S3C24XX_DMAC
        help
          This selects a driver for the MCI interface found in

[...]

Quoted 8 lines

The problem doesn't exist in linux-next, since it has the corresponding cleanup/rework patches for MMC_S3C from Arnd.

To fix the problem, we should probably remove COMPILE_TEST for MMC_S3C, for now. Then we can add it again and send it as a fix for v5.10-rc1.

What do you think?

Yes, better to remove it otherwise it will pop up when Linus merges your tree. Do you want a patch for this or you fix it up by yourself?

Best regards,
Krzysztof

#2 lore raw
In reply to Krzysztof Kozlowski

+ Arnd

Quoted 5 lines · Krzysztof Kozlowski

Multiple MMC host controller driver can be compile tested as they do not depend on architecture specific headers.

It seems like this is causing build errors for my next branch when running allmod config [1].

[...]

drivers/mmc/host/Kconfig config MMC_SPI · line 636

Quoted 8 lines

config MMC_S3C
tristate "Samsung S3C SD/MMC Card Interface support"

drivers/mmc/host/Kconfig +1 -1
-       depends on ARCH_S3C24XX
+       depends on ARCH_S3C24XX || COMPILE_TEST
        depends on S3C24XX_DMAC
        help
          This selects a driver for the MCI interface found in

[...]

The problem doesn't exist in linux-next, since it has the corresponding cleanup/rework patches for MMC_S3C from Arnd.

To fix the problem, we should probably remove COMPILE_TEST for MMC_S3C, for now. Then we can add it again and send it as a fix for v5.10-rc1.

What do you think?

Kind regards
Uffe

[1]
https://kernelci.org/build/id/5f57413db10918c9bad353a5/logs/