From: Mikko Rapeli <mikko.rapeli@linaro.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: "Heiko Stübner" <heiko@sntech.de>,
"Ulf Hansson" <ulf.hansson@linaro.org>,
"linux-mmc @ vger . kernel . org" <linux-mmc@vger.kernel.org>,
linux-kernel@vger.kernel.org,
"Adrian Hunter" <adrian.hunter@intel.com>,
"Victor Shih" <victor.shih@genesyslogic.com.tw>,
"Ben Chuang" <ben.chuang@genesyslogic.com.tw>,
"Geert Uytterhoeven" <geert+renesas@glider.be>,
"AngeloGioacchino Del Regno"
<angelogioacchino.delregno@collabora.com>,
"Yixun Lan" <dlan@gentoo.org>,
"Binbin Zhou" <zhoubinbin@loongson.cn>
Subject: Re: [PATCH] mmc: dw_mmc-rockchip: add dependency to ROCKCHIP_PM_DOMAINS
Date: Fri, 12 Sep 2025 14:30:03 +0300 [thread overview]
Message-ID: <aMQEO7tmvSY5thC-@nuoska> (raw)
In-Reply-To: <acbc46c8-30df-47bb-9d3d-91ba477f6029@app.fastmail.com>
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
next prev parent reply other threads:[~2025-09-12 11:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2025-09-12 13:24 ` Arnd Bergmann
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=aMQEO7tmvSY5thC-@nuoska \
--to=mikko.rapeli@linaro.org \
--cc=adrian.hunter@intel.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=arnd@arndb.de \
--cc=ben.chuang@genesyslogic.com.tw \
--cc=dlan@gentoo.org \
--cc=geert+renesas@glider.be \
--cc=heiko@sntech.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=ulf.hansson@linaro.org \
--cc=victor.shih@genesyslogic.com.tw \
--cc=zhoubinbin@loongson.cn \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox