public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mmc: dw_mmc-rockchip: add dependency to ROCKCHIP_PM_DOMAINS
@ 2025-09-11 14:43 Mikko Rapeli
  2025-09-11 15:03 ` Ulf Hansson
  0 siblings, 1 reply; 6+ messages in thread
From: Mikko Rapeli @ 2025-09-11 14:43 UTC (permalink / raw)
  To: ulf.hansson, linux-mmc
  Cc: linux-kernel, adrian.hunter, victor.shih, ben.chuang,
	geert+renesas, angelogioacchino.delregno, dlan, arnd, zhoubinbin,
	Mikko Rapeli

On rockpi4b, mounting rootfs from mmc fails unless ROCKCHIP_PM_DOMAINS
is enabled. This dependency is not exactly clear so make it really
explicit.

Failing boot without CONFIG_ROCKCHIP_PM_DOMAINS=y:

https://ledge.validation.linaro.org/scheduler/job/119268

/dev/disk/by-partuuid/1d48ffd8-f2a7-4a33-b52f-186089b3c85e: Can't lookup blockdev
/dev/disk/by-partuuid/1d48ffd8-f2a7-4a33-b52f-186089b3c85e: Can't lookup blockdev
/dev/disk/by-partuuid/1d48ffd8-f2a7-4a33-b52f-186089b3c85e: Can't lookup blockdev
/dev/disk/by-partuuid/1d48ffd8-f2a7-4a33-b52f-186089b3c85e: Can't lookup blockdev
/dev/disk/by-partuuid/1d48ffd8-f2a7-4a33-b52f-186089b3c85e: Can't lookup blockdev
/dev/disk/by-partuuid/1d48ffd8-f2a7-4a33-b52f-186089b3c85e: Can't lookup blockdev
dw-apb-uart ff1a0000.serial: forbid DMA for kernel console
root '/dev/disk/by-partuuid/1d48ffd8-f2a7-4a33-b52f-186089b3c85e' doesn't exist or does not contain a /dev.
rk_gmac-dwmac fe300000.ethernet: deferred probe timeout, ignoring dependency
rk_gmac-dwmac fe300000.ethernet: probe with driver rk_gmac-dwmac failed with error -110
rk_iommu ff650800.iommu: deferred probe timeout, ignoring dependency
rk_iommu ff650800.iommu: probe with driver rk_iommu failed with error -110
dwmmc_rockchip fe320000.mmc: deferred probe timeout, ignoring dependency
rockchip-typec-phy ff7c0000.phy: deferred probe timeout, ignoring dependency
dwmmc_rockchip fe320000.mmc: probe with driver dwmmc_rockchip failed with error -110
rockchip-typec-phy ff7c0000.phy: probe with driver rockchip-typec-phy failed with error -110
rockchip-typec-phy ff800000.phy: deferred probe timeout, ignoring dependency
rockchip-typec-phy ff800000.phy: probe with driver rockchip-typec-phy failed with error -110
rk_iommu ff660480.iommu: deferred probe timeout, ignoring dependency
rk_iommu ff660480.iommu: probe with driver rk_iommu failed with error -110
rk_iommu ff8f3f00.iommu: deferred probe timeout, ignoring dependency
rk_iommu ff8f3f00.iommu: probe with driver rk_iommu failed with error -110
rk_iommu ff903f00.iommu: deferred probe timeout, ignoring dependency
rk_iommu ff903f00.iommu: probe with driver rk_iommu failed with error -110
rk_iommu ff914000.iommu: deferred probe timeout, ignoring dependency
rk_iommu ff914000.iommu: probe with driver rk_iommu failed with error -110
rk_iommu ff924000.iommu: deferred probe timeout, ignoring dependency
rk_iommu ff924000.iommu: probe with driver rk_iommu failed with error -110
platform fe800000.usb: deferred probe pending: platform: wait for supplier /phy@ff7c0000/usb3-port
sdhci-arasan fe330000.mmc: deferred probe timeout, ignoring dependency
platform fe900000.usb: deferred probe pending: platform: wait for supplier /phy@ff800000/usb3-port
sdhci-arasan fe330000.mmc: probe with driver sdhci-arasan failed with error -110
platform ff1d0000.spi: deferred probe pending: (reason unknown)
platform hdmi-sound: deferred probe pending: asoc-simple-card: parse error

Working boot with CONFIG_ROCKCHIP_PM_DOMAINS=y:

https://ledge.validation.linaro.org/scheduler/job/119272

dwmmc_rockchip fe320000.mmc: IDMAC supports 32-bit address mode.
dwmmc_rockchip fe320000.mmc: Using internal DMA controller.
dwmmc_rockchip fe320000.mmc: Version ID is 270a
dwmmc_rockchip fe320000.mmc: DW MMC controller at irq 45,32 bit host data width,256 deep fifo
dwmmc_rockchip fe320000.mmc: Got CD GPIO
ff1a0000.serial: ttyS2 at MMIO 0xff1a0000 (irq = 44, base_baud = 1500000) is a 16550A
printk: legacy console [ttyS2] enabled
mmc_host mmc1: Bus speed (slot 0) = 400000Hz (slot req 400000Hz, actual 400000HZ div = 0)
dw_wdt ff848000.watchdog: No valid TOPs array specified
mmc_host mmc1: Bus speed (slot 0) = 50000000Hz (slot req 50000000Hz, actual 50000000HZ div = 0)
mmc0: CQHCI version 5.10
rk_gmac-dwmac fe300000.ethernet: IRQ eth_wake_irq not found
mmc1: new high speed SDHC card at address aaaa
fan53555-regulator 0-0040: FAN53555 Option[8] Rev[1] Detected!
fan53555-regulator 0-0041: FAN53555 Option[8] Rev[1] Detected!
rk_gmac-dwmac fe300000.ethernet: IRQ eth_lpi not found
mmcblk1: mmc1:aaaa SC16G 14.8 GiB
rk_gmac-dwmac fe300000.ethernet: IRQ sfty not found
GPT:Primary header thinks Alt. header is not at the end of the disk.
rk_gmac-dwmac fe300000.ethernet: Deprecated MDIO bus assumption used
GPT:1978417 != 31116287
rk_gmac-dwmac fe300000.ethernet: PTP uses main clock
GPT:Alternate GPT header not at the end of the disk.
rk_gmac-dwmac fe300000.ethernet: clock input or output? (input).
GPT:1978417 != 31116287
rk_gmac-dwmac fe300000.ethernet: TX delay(0x28).
GPT: Use GNU Parted to correct GPT errors.
rk_gmac-dwmac fe300000.ethernet: RX delay(0x11).
 mmcblk1: p1 p2 p3 p4 p5 p6 p7 p8

Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
---
 drivers/mmc/host/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
index 7232de1c06887..8664df524f7a7 100644
--- a/drivers/mmc/host/Kconfig
+++ b/drivers/mmc/host/Kconfig
@@ -866,7 +866,7 @@ config MMC_DW_PCI
 
 config MMC_DW_ROCKCHIP
 	tristate "Rockchip specific extensions for Synopsys DW Memory Card Interface"
-	depends on MMC_DW && ARCH_ROCKCHIP
+	depends on MMC_DW && ARCH_ROCKCHIP && ROCKCHIP_PM_DOMAINS
 	select MMC_DW_PLTFM
 	help
 	  This selects support for Rockchip SoC specific extensions to the
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] mmc: dw_mmc-rockchip: add dependency to ROCKCHIP_PM_DOMAINS
  2025-09-11 14:43 [PATCH] mmc: dw_mmc-rockchip: add dependency to ROCKCHIP_PM_DOMAINS Mikko Rapeli
@ 2025-09-11 15:03 ` Ulf Hansson
  2025-09-11 16:05   ` Heiko Stübner
  0 siblings, 1 reply; 6+ messages in thread
From: Ulf Hansson @ 2025-09-11 15:03 UTC (permalink / raw)
  To: arnd, Mikko Rapeli, Heiko Stuebner
  Cc: linux-mmc, linux-kernel, adrian.hunter, victor.shih, ben.chuang,
	geert+renesas, angelogioacchino.delregno, dlan, zhoubinbin

+ Heiko

On Thu, 11 Sept 2025 at 16:43, Mikko Rapeli <mikko.rapeli@linaro.org> wrote:
>
> On rockpi4b, mounting rootfs from mmc fails unless ROCKCHIP_PM_DOMAINS
> is enabled. This dependency is not exactly clear so make it really
> explicit.
>
> Failing boot without CONFIG_ROCKCHIP_PM_DOMAINS=y:
>
> https://ledge.validation.linaro.org/scheduler/job/119268
>
> /dev/disk/by-partuuid/1d48ffd8-f2a7-4a33-b52f-186089b3c85e: Can't lookup blockdev
> /dev/disk/by-partuuid/1d48ffd8-f2a7-4a33-b52f-186089b3c85e: Can't lookup blockdev
> /dev/disk/by-partuuid/1d48ffd8-f2a7-4a33-b52f-186089b3c85e: Can't lookup blockdev
> /dev/disk/by-partuuid/1d48ffd8-f2a7-4a33-b52f-186089b3c85e: Can't lookup blockdev
> /dev/disk/by-partuuid/1d48ffd8-f2a7-4a33-b52f-186089b3c85e: Can't lookup blockdev
> /dev/disk/by-partuuid/1d48ffd8-f2a7-4a33-b52f-186089b3c85e: Can't lookup blockdev
> dw-apb-uart ff1a0000.serial: forbid DMA for kernel console
> root '/dev/disk/by-partuuid/1d48ffd8-f2a7-4a33-b52f-186089b3c85e' doesn't exist or does not contain a /dev.
> rk_gmac-dwmac fe300000.ethernet: deferred probe timeout, ignoring dependency
> rk_gmac-dwmac fe300000.ethernet: probe with driver rk_gmac-dwmac failed with error -110
> rk_iommu ff650800.iommu: deferred probe timeout, ignoring dependency
> rk_iommu ff650800.iommu: probe with driver rk_iommu failed with error -110
> dwmmc_rockchip fe320000.mmc: deferred probe timeout, ignoring dependency
> rockchip-typec-phy ff7c0000.phy: deferred probe timeout, ignoring dependency
> dwmmc_rockchip fe320000.mmc: probe with driver dwmmc_rockchip failed with error -110
> rockchip-typec-phy ff7c0000.phy: probe with driver rockchip-typec-phy failed with error -110
> rockchip-typec-phy ff800000.phy: deferred probe timeout, ignoring dependency
> rockchip-typec-phy ff800000.phy: probe with driver rockchip-typec-phy failed with error -110
> rk_iommu ff660480.iommu: deferred probe timeout, ignoring dependency
> rk_iommu ff660480.iommu: probe with driver rk_iommu failed with error -110
> rk_iommu ff8f3f00.iommu: deferred probe timeout, ignoring dependency
> rk_iommu ff8f3f00.iommu: probe with driver rk_iommu failed with error -110
> rk_iommu ff903f00.iommu: deferred probe timeout, ignoring dependency
> rk_iommu ff903f00.iommu: probe with driver rk_iommu failed with error -110
> rk_iommu ff914000.iommu: deferred probe timeout, ignoring dependency
> rk_iommu ff914000.iommu: probe with driver rk_iommu failed with error -110
> rk_iommu ff924000.iommu: deferred probe timeout, ignoring dependency
> rk_iommu ff924000.iommu: probe with driver rk_iommu failed with error -110
> platform fe800000.usb: deferred probe pending: platform: wait for supplier /phy@ff7c0000/usb3-port
> sdhci-arasan fe330000.mmc: deferred probe timeout, ignoring dependency
> platform fe900000.usb: deferred probe pending: platform: wait for supplier /phy@ff800000/usb3-port
> sdhci-arasan fe330000.mmc: probe with driver sdhci-arasan failed with error -110
> platform ff1d0000.spi: deferred probe pending: (reason unknown)
> platform hdmi-sound: deferred probe pending: asoc-simple-card: parse error
>
> Working boot with CONFIG_ROCKCHIP_PM_DOMAINS=y:
>
> https://ledge.validation.linaro.org/scheduler/job/119272
>
> dwmmc_rockchip fe320000.mmc: IDMAC supports 32-bit address mode.
> dwmmc_rockchip fe320000.mmc: Using internal DMA controller.
> dwmmc_rockchip fe320000.mmc: Version ID is 270a
> dwmmc_rockchip fe320000.mmc: DW MMC controller at irq 45,32 bit host data width,256 deep fifo
> dwmmc_rockchip fe320000.mmc: Got CD GPIO
> ff1a0000.serial: ttyS2 at MMIO 0xff1a0000 (irq = 44, base_baud = 1500000) is a 16550A
> printk: legacy console [ttyS2] enabled
> mmc_host mmc1: Bus speed (slot 0) = 400000Hz (slot req 400000Hz, actual 400000HZ div = 0)
> dw_wdt ff848000.watchdog: No valid TOPs array specified
> mmc_host mmc1: Bus speed (slot 0) = 50000000Hz (slot req 50000000Hz, actual 50000000HZ div = 0)
> mmc0: CQHCI version 5.10
> rk_gmac-dwmac fe300000.ethernet: IRQ eth_wake_irq not found
> mmc1: new high speed SDHC card at address aaaa
> fan53555-regulator 0-0040: FAN53555 Option[8] Rev[1] Detected!
> fan53555-regulator 0-0041: FAN53555 Option[8] Rev[1] Detected!
> rk_gmac-dwmac fe300000.ethernet: IRQ eth_lpi not found
> mmcblk1: mmc1:aaaa SC16G 14.8 GiB
> rk_gmac-dwmac fe300000.ethernet: IRQ sfty not found
> GPT:Primary header thinks Alt. header is not at the end of the disk.
> rk_gmac-dwmac fe300000.ethernet: Deprecated MDIO bus assumption used
> GPT:1978417 != 31116287
> rk_gmac-dwmac fe300000.ethernet: PTP uses main clock
> GPT:Alternate GPT header not at the end of the disk.
> rk_gmac-dwmac fe300000.ethernet: clock input or output? (input).
> GPT:1978417 != 31116287
> rk_gmac-dwmac fe300000.ethernet: TX delay(0x28).
> GPT: Use GNU Parted to correct GPT errors.
> rk_gmac-dwmac fe300000.ethernet: RX delay(0x11).
>  mmcblk1: p1 p2 p3 p4 p5 p6 p7 p8
>
> Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
> ---
>  drivers/mmc/host/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
> index 7232de1c06887..8664df524f7a7 100644
> --- a/drivers/mmc/host/Kconfig
> +++ b/drivers/mmc/host/Kconfig
> @@ -866,7 +866,7 @@ config MMC_DW_PCI
>
>  config MMC_DW_ROCKCHIP
>         tristate "Rockchip specific extensions for Synopsys DW Memory Card Interface"
> -       depends on MMC_DW && ARCH_ROCKCHIP
> +       depends on MMC_DW && ARCH_ROCKCHIP && ROCKCHIP_PM_DOMAINS

Rather than "depends on", I think a "select" is better to be added
from the platform's Kconfig. Probably drivers/soc/rockchip/Kconfig is
where to put this.

Assuming that ROCKCHIP_PM_DOMAINS is a critical piece for most
Rockchip platforms to work.

>         select MMC_DW_PLTFM
>         help
>           This selects support for Rockchip SoC specific extensions to the
> --
> 2.34.1
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] mmc: dw_mmc-rockchip: add dependency to ROCKCHIP_PM_DOMAINS
  2025-09-11 15:03 ` Ulf Hansson
@ 2025-09-11 16:05   ` Heiko Stübner
  2025-09-12  8:47     ` Arnd Bergmann
  0 siblings, 1 reply; 6+ messages in thread
From: Heiko Stübner @ 2025-09-11 16:05 UTC (permalink / raw)
  To: arnd, Mikko Rapeli, Ulf Hansson
  Cc: linux-mmc, linux-kernel, adrian.hunter, victor.shih, ben.chuang,
	geert+renesas, angelogioacchino.delregno, dlan, zhoubinbin

Hi,

Am Donnerstag, 11. September 2025, 17:03:14 Mitteleuropäische Sommerzeit schrieb Ulf Hansson:
> On Thu, 11 Sept 2025 at 16:43, Mikko Rapeli <mikko.rapeli@linaro.org> wrote:
> > @@ -866,7 +866,7 @@ config MMC_DW_PCI
> >
> >  config MMC_DW_ROCKCHIP
> >         tristate "Rockchip specific extensions for Synopsys DW Memory Card Interface"
> > -       depends on MMC_DW && ARCH_ROCKCHIP
> > +       depends on MMC_DW && ARCH_ROCKCHIP && ROCKCHIP_PM_DOMAINS
> 
> Rather than "depends on", I think a "select" is better to be added
> from the platform's Kconfig. Probably drivers/soc/rockchip/Kconfig is
> where to put this.
> 
> Assuming that ROCKCHIP_PM_DOMAINS is a critical piece for most
> Rockchip platforms to work.

I'd think
- arch/arm64/Kconfig.platforms
- arch/arm/mach-rockchip/Kconfig
would be the correct positions.

And as Ulf suggested, this should be a "select"


And I guess, always selecting it makes sense as well.

Every supported soc back to the before 2012 RK3066 has controllable
power-domains and while the driver is selected in both the arm32+64
defconfigs, this still allows people to manually de-select the driver
leaving most elements to defer.

So yes, always-selecting the driver makes a lot of sense.


Thanks
Heiko



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] mmc: dw_mmc-rockchip: add dependency to ROCKCHIP_PM_DOMAINS
  2025-09-11 16:05   ` Heiko Stübner
@ 2025-09-12  8:47     ` Arnd Bergmann
  2025-09-12 11:30       ` Mikko Rapeli
  0 siblings, 1 reply; 6+ messages in thread
From: Arnd Bergmann @ 2025-09-12  8:47 UTC (permalink / raw)
  To: Heiko Stübner, Mikko Rapeli, Ulf Hansson
  Cc: linux-mmc @ vger . kernel . org, linux-kernel, Adrian Hunter,
	Victor Shih, Ben Chuang, Geert Uytterhoeven,
	AngeloGioacchino Del Regno, Yixun Lan, Binbin Zhou

On Thu, Sep 11, 2025, at 18:05, Heiko Stübner wrote:
>
> Am Donnerstag, 11. September 2025, 17:03:14 Mitteleuropäische 
> Sommerzeit schrieb Ulf Hansson:
>> On Thu, 11 Sept 2025 at 16:43, Mikko Rapeli <mikko.rapeli@linaro.org> wrote:
>> > @@ -866,7 +866,7 @@ config MMC_DW_PCI
>> >
>> >  config MMC_DW_ROCKCHIP
>> >         tristate "Rockchip specific extensions for Synopsys DW Memory Card Interface"
>> > -       depends on MMC_DW && ARCH_ROCKCHIP
>> > +       depends on MMC_DW && ARCH_ROCKCHIP && ROCKCHIP_PM_DOMAINS

The hard dependencies are usually only for compile-time requirements.

Ideally this should go the other way and use

      depends on (ARCH_ROCKCHIP || COMPILE_TEST)

after you check that this actually builds on x86 with COMPILE_TEST
enabled, as there may be other compile-time dependencies.
 
>> Rather than "depends on", I think a "select" is better to be added
>> from the platform's Kconfig. Probably drivers/soc/rockchip/Kconfig is
>> where to put this.
>> 
>> Assuming that ROCKCHIP_PM_DOMAINS is a critical piece for most
>> Rockchip platforms to work.
>
> I'd think
> - arch/arm64/Kconfig.platforms
> - arch/arm/mach-rockchip/Kconfig
> would be the correct positions.
>
> And as Ulf suggested, this should be a "select"

I think in this case a 'default ARCH_ROCKCHIP' in the
ROCKCHIP_PM_DOMAINS definition is sufficient to have it
normally enabled, and still allows someone to try turning
it into a loadable module later, which would be a requirement
e.g. for Android GKI.

    Arnd

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] mmc: dw_mmc-rockchip: add dependency to ROCKCHIP_PM_DOMAINS
  2025-09-12  8:47     ` Arnd Bergmann
@ 2025-09-12 11:30       ` Mikko Rapeli
  2025-09-12 13:24         ` Arnd Bergmann
  0 siblings, 1 reply; 6+ messages in thread
From: Mikko Rapeli @ 2025-09-12 11:30 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Heiko Stübner, Ulf Hansson, linux-mmc @ vger . kernel . org,
	linux-kernel, Adrian Hunter, Victor Shih, Ben Chuang,
	Geert Uytterhoeven, AngeloGioacchino Del Regno, Yixun Lan,
	Binbin Zhou

Hi,

On Fri, Sep 12, 2025 at 10:47:29AM +0200, Arnd Bergmann wrote:
> On Thu, Sep 11, 2025, at 18:05, Heiko Stübner wrote:
> >
> > Am Donnerstag, 11. September 2025, 17:03:14 Mitteleuropäische 
> > Sommerzeit schrieb Ulf Hansson:
> >> On Thu, 11 Sept 2025 at 16:43, Mikko Rapeli <mikko.rapeli@linaro.org> wrote:
> >> > @@ -866,7 +866,7 @@ config MMC_DW_PCI
> >> >
> >> >  config MMC_DW_ROCKCHIP
> >> >         tristate "Rockchip specific extensions for Synopsys DW Memory Card Interface"
> >> > -       depends on MMC_DW && ARCH_ROCKCHIP
> >> > +       depends on MMC_DW && ARCH_ROCKCHIP && ROCKCHIP_PM_DOMAINS
> 
> The hard dependencies are usually only for compile-time requirements.
> 
> Ideally this should go the other way and use
> 
>       depends on (ARCH_ROCKCHIP || COMPILE_TEST)
> 
> after you check that this actually builds on x86 with COMPILE_TEST
> enabled, as there may be other compile-time dependencies.

Ok so a lot of mmc driver set this correctly but few don't:

 * MMC_PXA
 * MMC_OMAP
 * MMC_ATMELMCI
 * MMC_MXC
 * MMC_MXS
 * MMC_DW_ROCKCHIP
 * MMC_WMT

Maybe there are good reasons why these are not part of COMPILE_TEST.
I can try adding MMC_DW_ROCKCHIP. Did not yet find out how to start
the COMPILE_TEST build. Hints welcome. Which top level Makefile
target or script to run?

> >> Rather than "depends on", I think a "select" is better to be added
> >> from the platform's Kconfig. Probably drivers/soc/rockchip/Kconfig is
> >> where to put this.
> >> 
> >> Assuming that ROCKCHIP_PM_DOMAINS is a critical piece for most
> >> Rockchip platforms to work.
> >
> > I'd think
> > - arch/arm64/Kconfig.platforms
> > - arch/arm/mach-rockchip/Kconfig
> > would be the correct positions.
> >
> > And as Ulf suggested, this should be a "select"
> 
> I think in this case a 'default ARCH_ROCKCHIP' in the
> ROCKCHIP_PM_DOMAINS definition is sufficient to have it
> normally enabled, and still allows someone to try turning
> it into a loadable module later, which would be a requirement
> e.g. for Android GKI.

Ok I can test this out. kernel.org defconfigs have ROCKCHIP_PM_DOMAINS
enabled so they don't see any issues but when users/distros configure
kernels, then ROCKCHIP_PM_DOMAINS is needed for MMC_DW_ROCKCHIP to work.
To me a warning is sufficient from kernel config tooling since yocto
side tooling picks this up but enabling by default is even better.
These runtime dependencies hard to track down. Kernel modules would
be sufficient if support was there since in my case there is always
an initrd with udev and modules.

Cheers,

-Mikko

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] mmc: dw_mmc-rockchip: add dependency to ROCKCHIP_PM_DOMAINS
  2025-09-12 11:30       ` Mikko Rapeli
@ 2025-09-12 13:24         ` Arnd Bergmann
  0 siblings, 0 replies; 6+ messages in thread
From: Arnd Bergmann @ 2025-09-12 13:24 UTC (permalink / raw)
  To: Mikko Rapeli
  Cc: Heiko Stübner, Ulf Hansson, linux-mmc @ vger . kernel . org,
	linux-kernel, Adrian Hunter, Victor Shih, Ben Chuang,
	Geert Uytterhoeven, AngeloGioacchino Del Regno, Yixun Lan,
	Binbin Zhou

On Fri, Sep 12, 2025, at 13:30, Mikko Rapeli wrote:
> On Fri, Sep 12, 2025 at 10:47:29AM +0200, Arnd Bergmann wrote:
>> On Thu, Sep 11, 2025, at 18:05, Heiko Stübner wrote:
>> 
>>       depends on (ARCH_ROCKCHIP || COMPILE_TEST)
>> 
>> after you check that this actually builds on x86 with COMPILE_TEST
>> enabled, as there may be other compile-time dependencies.
>
> Ok so a lot of mmc driver set this correctly but few don't:
>
>  * MMC_PXA
>  * MMC_OMAP
>  * MMC_ATMELMCI
>  * MMC_MXC
>  * MMC_MXS
>  * MMC_DW_ROCKCHIP
>  * MMC_WMT
>
> Maybe there are good reasons why these are not part of COMPILE_TEST.
> I can try adding MMC_DW_ROCKCHIP. Did not yet find out how to start
> the COMPILE_TEST build. Hints welcome. Which top level Makefile
> target or script to run?

I see that Krzysztof went through the subsystem five years ago
and enabled everything he could in commit 54d8454436a2 ("mmc: host:
Enable compile testing of multiple drivers").

The set you found above is probably a combination of drivers
that were added after that without the COMPILE_TEST check,
and drivers that fail to build on x86.

>> I think in this case a 'default ARCH_ROCKCHIP' in the
>> ROCKCHIP_PM_DOMAINS definition is sufficient to have it
>> normally enabled, and still allows someone to try turning
>> it into a loadable module later, which would be a requirement
>> e.g. for Android GKI.
>
> Ok I can test this out.

Thanks!

> kernel.org defconfigs have ROCKCHIP_PM_DOMAINS
> enabled so they don't see any issues but when users/distros configure
> kernels, then ROCKCHIP_PM_DOMAINS is needed for MMC_DW_ROCKCHIP to work.
> To me a warning is sufficient from kernel config tooling since yocto
> side tooling picks this up but enabling by default is even better.
> These runtime dependencies hard to track down. Kernel modules would
> be sufficient if support was there since in my case there is always
> an initrd with udev and modules.

There is no good answer in general here. Adding a lot of
dependencies for each run-time requirement would make Kconfig
overly complicated and introduce circular dependencies
everywhere, so generally I recommend to only have either
compile-time dependencies specified, or dependencies on specific
platforms that can then be turned off when you know you are
building for another one,

     Arnd

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-09-12 13:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-11 14:43 [PATCH] mmc: dw_mmc-rockchip: add dependency to ROCKCHIP_PM_DOMAINS Mikko Rapeli
2025-09-11 15:03 ` Ulf Hansson
2025-09-11 16:05   ` Heiko Stübner
2025-09-12  8:47     ` Arnd Bergmann
2025-09-12 11:30       ` Mikko Rapeli
2025-09-12 13:24         ` Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox