[PATCH 15/19] ARM: stm32mp: ddrctrl: add deep-probe support
Sascha Hauer
s.hauer at pengutronix.de
Fri Jun 25 00:25:36 PDT 2021
From: Marco Felsch <m.felsch at pengutronix.de>
In case of deep-probe we have to ensure that the memory device is
available after the mem_initcall().
Signed-off-by: Marco Felsch <m.felsch at pengutronix.de>
Link: https://lore.pengutronix.de/20201021115813.31645-10-m.felsch@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
arch/arm/mach-stm32mp/ddrctrl.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-stm32mp/ddrctrl.c b/arch/arm/mach-stm32mp/ddrctrl.c
index 43486c57c5..7f2013c22d 100644
--- a/arch/arm/mach-stm32mp/ddrctrl.c
+++ b/arch/arm/mach-stm32mp/ddrctrl.c
@@ -146,4 +146,14 @@ static struct driver_d stm32mp1_ddr_driver = {
.of_compatible = DRV_OF_COMPAT(stm32mp1_ddr_dt_ids),
};
-mem_platform_driver(stm32mp1_ddr_driver);
+static int stm32mp1_ddr_init(void)
+{
+ int ret;
+
+ ret = platform_driver_register(&stm32mp1_ddr_driver);
+ if (ret)
+ return ret;
+
+ return of_devices_ensure_probed_by_dev_id(stm32mp1_ddr_dt_ids);
+}
+mem_initcall(stm32mp1_ddr_init);
--
2.29.2
More information about the barebox
mailing list