* [PATCH] mmc: dw_mmc: move pmops into core driver
@ 2026-02-04 13:00 Arnd Bergmann
2026-02-04 14:03 ` Ulf Hansson
0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2026-02-04 13:00 UTC (permalink / raw)
To: Jaehoon Chung, Shawn Lin, Ulf Hansson
Cc: Arnd Bergmann, linux-mmc, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
Since the platform power management structure is now shared with the PCI
front-end, there is a link failure if only the PCI variant is enabled:
arm-linux-gnueabi/bin/arm-linux-gnueabi-ld: drivers/mmc/host/dw_mmc-pci.o:(.data+0x74): undefined reference to `dw_mci_pltfm_pmops'
This could be fixed by selecting the platform driver from the PCI one
in Kconfig, or by reverting the change to the PCI driver, but since this
is now used by all dw_mmc variants, just move the structure into the core
code as well.
Fixes: d9346fb36d84 ("mmc: dw_mmc-pltfm: use modern PM macros")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
I ended up not renaming the structure in the process, but that
would be another option.
---
drivers/mmc/host/dw_mmc-pltfm.c | 9 ---------
drivers/mmc/host/dw_mmc.c | 6 ++++++
2 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/drivers/mmc/host/dw_mmc-pltfm.c b/drivers/mmc/host/dw_mmc-pltfm.c
index fde465a4bf5d..079d0cc97766 100644
--- a/drivers/mmc/host/dw_mmc-pltfm.c
+++ b/drivers/mmc/host/dw_mmc-pltfm.c
@@ -56,15 +56,6 @@ int dw_mci_pltfm_register(struct platform_device *pdev,
}
EXPORT_SYMBOL_GPL(dw_mci_pltfm_register);
-const struct dev_pm_ops dw_mci_pltfm_pmops = {
- SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
- pm_runtime_force_resume)
- RUNTIME_PM_OPS(dw_mci_runtime_suspend,
- dw_mci_runtime_resume,
- NULL)
-};
-EXPORT_SYMBOL_GPL(dw_mci_pltfm_pmops);
-
static int dw_mci_socfpga_priv_init(struct dw_mci *host)
{
struct device_node *np = host->dev->of_node;
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index b2ac61f3a8f7..97e880022007 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -3523,6 +3523,12 @@ int dw_mci_runtime_resume(struct device *dev)
}
EXPORT_SYMBOL(dw_mci_runtime_resume);
+const struct dev_pm_ops dw_mci_pltfm_pmops = {
+ SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume)
+ RUNTIME_PM_OPS(dw_mci_runtime_suspend, dw_mci_runtime_resume, NULL)
+};
+EXPORT_SYMBOL_GPL(dw_mci_pltfm_pmops);
+
static int __init dw_mci_init(void)
{
pr_info("Synopsys Designware Multimedia Card Interface Driver\n");
--
2.39.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mmc: dw_mmc: move pmops into core driver
2026-02-04 13:00 [PATCH] mmc: dw_mmc: move pmops into core driver Arnd Bergmann
@ 2026-02-04 14:03 ` Ulf Hansson
0 siblings, 0 replies; 2+ messages in thread
From: Ulf Hansson @ 2026-02-04 14:03 UTC (permalink / raw)
To: Arnd Bergmann, Shawn Lin
Cc: Jaehoon Chung, Arnd Bergmann, linux-mmc, linux-kernel
On Wed, 4 Feb 2026 at 14:00, Arnd Bergmann <arnd@kernel.org> wrote:
>
> From: Arnd Bergmann <arnd@arndb.de>
>
> Since the platform power management structure is now shared with the PCI
> front-end, there is a link failure if only the PCI variant is enabled:
>
> arm-linux-gnueabi/bin/arm-linux-gnueabi-ld: drivers/mmc/host/dw_mmc-pci.o:(.data+0x74): undefined reference to `dw_mci_pltfm_pmops'
>
> This could be fixed by selecting the platform driver from the PCI one
> in Kconfig, or by reverting the change to the PCI driver, but since this
> is now used by all dw_mmc variants, just move the structure into the core
> code as well.
>
> Fixes: d9346fb36d84 ("mmc: dw_mmc-pltfm: use modern PM macros")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Thanks for the fix, applied for next!
> ---
> I ended up not renaming the structure in the process, but that
> would be another option.
Yeah, we should probably rename it to "dw_mci_pmops", but I think that
can be done as a clean-up on top. Maybe Shawn can manage it?
Kind regards
Uffe
> ---
> drivers/mmc/host/dw_mmc-pltfm.c | 9 ---------
> drivers/mmc/host/dw_mmc.c | 6 ++++++
> 2 files changed, 6 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/mmc/host/dw_mmc-pltfm.c b/drivers/mmc/host/dw_mmc-pltfm.c
> index fde465a4bf5d..079d0cc97766 100644
> --- a/drivers/mmc/host/dw_mmc-pltfm.c
> +++ b/drivers/mmc/host/dw_mmc-pltfm.c
> @@ -56,15 +56,6 @@ int dw_mci_pltfm_register(struct platform_device *pdev,
> }
> EXPORT_SYMBOL_GPL(dw_mci_pltfm_register);
>
> -const struct dev_pm_ops dw_mci_pltfm_pmops = {
> - SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
> - pm_runtime_force_resume)
> - RUNTIME_PM_OPS(dw_mci_runtime_suspend,
> - dw_mci_runtime_resume,
> - NULL)
> -};
> -EXPORT_SYMBOL_GPL(dw_mci_pltfm_pmops);
> -
> static int dw_mci_socfpga_priv_init(struct dw_mci *host)
> {
> struct device_node *np = host->dev->of_node;
> diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
> index b2ac61f3a8f7..97e880022007 100644
> --- a/drivers/mmc/host/dw_mmc.c
> +++ b/drivers/mmc/host/dw_mmc.c
> @@ -3523,6 +3523,12 @@ int dw_mci_runtime_resume(struct device *dev)
> }
> EXPORT_SYMBOL(dw_mci_runtime_resume);
>
> +const struct dev_pm_ops dw_mci_pltfm_pmops = {
> + SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume)
> + RUNTIME_PM_OPS(dw_mci_runtime_suspend, dw_mci_runtime_resume, NULL)
> +};
> +EXPORT_SYMBOL_GPL(dw_mci_pltfm_pmops);
> +
> static int __init dw_mci_init(void)
> {
> pr_info("Synopsys Designware Multimedia Card Interface Driver\n");
> --
> 2.39.5
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-02-04 14:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-04 13:00 [PATCH] mmc: dw_mmc: move pmops into core driver Arnd Bergmann
2026-02-04 14:03 ` Ulf Hansson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox