mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] ARM: switch open-coded instances to platform_mem_driver
@ 2023-01-10 17:35 Ahmad Fatoum
  2023-01-11  7:12 ` [PATCH] fixup! " Ahmad Fatoum
  0 siblings, 1 reply; 3+ messages in thread
From: Ahmad Fatoum @ 2023-01-10 17:35 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

Now that platform_mem_driver ensures probe at mem_initcall level, we no
longer need to use the opencoded version.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 arch/arm/mach-imx/esdctl.c      | 13 +------------
 arch/arm/mach-stm32mp/ddrctrl.c | 13 +------------
 2 files changed, 2 insertions(+), 24 deletions(-)

diff --git a/arch/arm/mach-imx/esdctl.c b/arch/arm/mach-imx/esdctl.c
index eb47957db0e5..9954bcb40bc1 100644
--- a/arch/arm/mach-imx/esdctl.c
+++ b/arch/arm/mach-imx/esdctl.c
@@ -754,18 +754,7 @@ static struct driver imx_esdctl_driver = {
 	.id_table = imx_esdctl_ids,
 	.of_compatible = DRV_OF_COMPAT(imx_esdctl_dt_ids),
 };
-
-static int imx_esdctl_init(void)
-{
-	int ret;
-
-	ret = platform_driver_register(&imx_esdctl_driver);
-	if (ret)
-		return ret;
-
-	return of_devices_ensure_probed_by_dev_id(imx_esdctl_dt_ids);
-}
-mem_initcall(imx_esdctl_init);
+platform_mem_driver(imx_esdctl_driver);
 
 /*
  * The i.MX SoCs usually have two SDRAM chipselects. The following
diff --git a/arch/arm/mach-stm32mp/ddrctrl.c b/arch/arm/mach-stm32mp/ddrctrl.c
index ad4662c44d07..ffda1ba61f3c 100644
--- a/arch/arm/mach-stm32mp/ddrctrl.c
+++ b/arch/arm/mach-stm32mp/ddrctrl.c
@@ -157,15 +157,4 @@ static struct driver stm32mp1_ddr_driver = {
 	.probe  = stm32mp1_ddr_probe,
 	.of_compatible = DRV_OF_COMPAT(stm32mp1_ddr_dt_ids),
 };
-
-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);
+mem_platform_driver(stm32mp1_ddr_driver);
-- 
2.30.2




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

* [PATCH] fixup! ARM: switch open-coded instances to platform_mem_driver
  2023-01-10 17:35 [PATCH] ARM: switch open-coded instances to platform_mem_driver Ahmad Fatoum
@ 2023-01-11  7:12 ` Ahmad Fatoum
  2023-01-11  7:57   ` Sascha Hauer
  0 siblings, 1 reply; 3+ messages in thread
From: Ahmad Fatoum @ 2023-01-11  7:12 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

Now tested both on i.MX as well and noticed the typo..

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 arch/arm/mach-imx/esdctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-imx/esdctl.c b/arch/arm/mach-imx/esdctl.c
index 9954bcb40bc1..a704250297bb 100644
--- a/arch/arm/mach-imx/esdctl.c
+++ b/arch/arm/mach-imx/esdctl.c
@@ -754,7 +754,7 @@ static struct driver imx_esdctl_driver = {
 	.id_table = imx_esdctl_ids,
 	.of_compatible = DRV_OF_COMPAT(imx_esdctl_dt_ids),
 };
-platform_mem_driver(imx_esdctl_driver);
+mem_platform_driver(imx_esdctl_driver);
 
 /*
  * The i.MX SoCs usually have two SDRAM chipselects. The following
-- 
2.30.2




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

* Re: [PATCH] fixup! ARM: switch open-coded instances to platform_mem_driver
  2023-01-11  7:12 ` [PATCH] fixup! " Ahmad Fatoum
@ 2023-01-11  7:57   ` Sascha Hauer
  0 siblings, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2023-01-11  7:57 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: barebox

On Wed, Jan 11, 2023 at 08:12:40AM +0100, Ahmad Fatoum wrote:
> Now tested both on i.MX as well and noticed the typo..
> 
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
>  arch/arm/mach-imx/esdctl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Could you resend this one? git b4 doesn't cope with this one as well.

Plain git b4 tries to apply the fixup first. Explicitly applying the
first one with

git b4 -P_ 20230110173513.43277-1-a.fatoum@pengutronix.de

also doesn't work:

Looking up https://lore.barebox.org/20230110173513.43277-1-a.fatoum%40pengutronix.de
Analyzing 2 messages in the thread
Specified msgid is not present in the series, cannot cherrypick

Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



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

end of thread, other threads:[~2023-01-11  7:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-10 17:35 [PATCH] ARM: switch open-coded instances to platform_mem_driver Ahmad Fatoum
2023-01-11  7:12 ` [PATCH] fixup! " Ahmad Fatoum
2023-01-11  7:57   ` Sascha Hauer

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