public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: "Rob Herring (Arm)" <robh@kernel.org>
To: Miquel Raynal <miquel.raynal@bootlin.com>,
	 Richard Weinberger <richard@nod.at>,
	Vignesh Raghavendra <vigneshr@ti.com>,
	 Nicolas Ferre <nicolas.ferre@microchip.com>,
	 Alexandre Belloni <alexandre.belloni@bootlin.com>,
	 Claudiu Beznea <claudiu.beznea@tuxon.dev>,
	 Russell King <linux@armlinux.org.uk>
Cc: linux-mtd@lists.infradead.org,
	linux-arm-kernel@lists.infradead.org,
	 linux-kernel@vger.kernel.org
Subject: [PATCH v3 2/3] ARM: at91: Move PM init functions to .init_late hook
Date: Mon, 05 Jan 2026 15:06:44 -0600	[thread overview]
Message-ID: <20260105-at91-probe-v3-2-594013ff2965@kernel.org> (raw)
In-Reply-To: <20260105-at91-probe-v3-0-594013ff2965@kernel.org>

Move the AT91 PM init functions to .init_late hook to ensure driver
dependencies have probed.

Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Tested-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
---
v3:
 - Fix author name adding "(Arm)"
 - Fixup split between patch 2 and 3

v2:
 - new patch
---
 arch/arm/mach-at91/at91rm9200.c | 3 +--
 arch/arm/mach-at91/at91sam9.c   | 3 +--
 arch/arm/mach-at91/sam9x60.c    | 3 +--
 arch/arm/mach-at91/sam9x7.c     | 3 +--
 arch/arm/mach-at91/sama5.c      | 5 +++--
 arch/arm/mach-at91/sama7.c      | 2 +-
 6 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/arch/arm/mach-at91/at91rm9200.c b/arch/arm/mach-at91/at91rm9200.c
index 4f8186211619..2ac564eb8bbb 100644
--- a/arch/arm/mach-at91/at91rm9200.c
+++ b/arch/arm/mach-at91/at91rm9200.c
@@ -17,8 +17,6 @@
 static void __init at91rm9200_dt_device_init(void)
 {
 	of_platform_default_populate(NULL, NULL, NULL);
-
-	at91rm9200_pm_init();
 }
 
 static const char *const at91rm9200_dt_board_compat[] __initconst = {
@@ -27,6 +25,7 @@ static const char *const at91rm9200_dt_board_compat[] __initconst = {
 };
 
 DT_MACHINE_START(at91rm9200_dt, "Atmel AT91RM9200")
+	.init_late	= at91rm9200_pm_init,
 	.init_machine	= at91rm9200_dt_device_init,
 	.dt_compat	= at91rm9200_dt_board_compat,
 MACHINE_END
diff --git a/arch/arm/mach-at91/at91sam9.c b/arch/arm/mach-at91/at91sam9.c
index 7e572189a5eb..cf07cba4ee5d 100644
--- a/arch/arm/mach-at91/at91sam9.c
+++ b/arch/arm/mach-at91/at91sam9.c
@@ -17,8 +17,6 @@
 static void __init at91sam9_init(void)
 {
 	of_platform_default_populate(NULL, NULL, NULL);
-
-	at91sam9_pm_init();
 }
 
 static const char *const at91_dt_board_compat[] __initconst = {
@@ -28,6 +26,7 @@ static const char *const at91_dt_board_compat[] __initconst = {
 
 DT_MACHINE_START(at91sam_dt, "Atmel AT91SAM9")
 	/* Maintainer: Atmel */
+	.init_late	= at91sam9_pm_init,
 	.init_machine	= at91sam9_init,
 	.dt_compat	= at91_dt_board_compat,
 MACHINE_END
diff --git a/arch/arm/mach-at91/sam9x60.c b/arch/arm/mach-at91/sam9x60.c
index d8c739d25458..a31beaaeffcd 100644
--- a/arch/arm/mach-at91/sam9x60.c
+++ b/arch/arm/mach-at91/sam9x60.c
@@ -18,8 +18,6 @@
 static void __init sam9x60_init(void)
 {
 	of_platform_default_populate(NULL, NULL, NULL);
-
-	sam9x60_pm_init();
 }
 
 static const char *const sam9x60_dt_board_compat[] __initconst = {
@@ -29,6 +27,7 @@ static const char *const sam9x60_dt_board_compat[] __initconst = {
 
 DT_MACHINE_START(sam9x60_dt, "Microchip SAM9X60")
 	/* Maintainer: Microchip */
+	.init_late	= sam9x60_pm_init,
 	.init_machine	= sam9x60_init,
 	.dt_compat	= sam9x60_dt_board_compat,
 MACHINE_END
diff --git a/arch/arm/mach-at91/sam9x7.c b/arch/arm/mach-at91/sam9x7.c
index e1ff30b5b09b..0c73f7fefd4f 100644
--- a/arch/arm/mach-at91/sam9x7.c
+++ b/arch/arm/mach-at91/sam9x7.c
@@ -17,8 +17,6 @@
 static void __init sam9x7_init(void)
 {
 	of_platform_default_populate(NULL, NULL, NULL);
-
-	sam9x7_pm_init();
 }
 
 static const char * const sam9x7_dt_board_compat[] __initconst = {
@@ -28,6 +26,7 @@ static const char * const sam9x7_dt_board_compat[] __initconst = {
 
 DT_MACHINE_START(sam9x7_dt, "Microchip SAM9X7")
 	/* Maintainer: Microchip */
+	.init_late	= sam9x7_pm_init,
 	.init_machine	= sam9x7_init,
 	.dt_compat	= sam9x7_dt_board_compat,
 MACHINE_END
diff --git a/arch/arm/mach-at91/sama5.c b/arch/arm/mach-at91/sama5.c
index bf2b5c6a18c6..576654cba82d 100644
--- a/arch/arm/mach-at91/sama5.c
+++ b/arch/arm/mach-at91/sama5.c
@@ -33,7 +33,6 @@ static void __init sama5_secure_cache_init(void)
 static void __init sama5_dt_device_init(void)
 {
 	of_platform_default_populate(NULL, NULL, NULL);
-	sama5_pm_init();
 }
 
 static const char *const sama5_dt_board_compat[] __initconst = {
@@ -43,6 +42,7 @@ static const char *const sama5_dt_board_compat[] __initconst = {
 
 DT_MACHINE_START(sama5_dt, "Atmel SAMA5")
 	/* Maintainer: Atmel */
+	.init_late	= sama5_pm_init,
 	.init_machine	= sama5_dt_device_init,
 	.dt_compat	= sama5_dt_board_compat,
 MACHINE_END
@@ -55,6 +55,7 @@ static const char *const sama5_alt_dt_board_compat[] __initconst = {
 DT_MACHINE_START(sama5_alt_dt, "Atmel SAMA5")
 	/* Maintainer: Atmel */
 	.init_machine	= sama5_dt_device_init,
+	.init_late	= sama5_pm_init,
 	.dt_compat	= sama5_alt_dt_board_compat,
 	.l2c_aux_mask	= ~0UL,
 MACHINE_END
@@ -62,7 +63,6 @@ MACHINE_END
 static void __init sama5d2_init(void)
 {
 	of_platform_default_populate(NULL, NULL, NULL);
-	sama5d2_pm_init();
 }
 
 static const char *const sama5d2_compat[] __initconst = {
@@ -74,6 +74,7 @@ DT_MACHINE_START(sama5d2, "Atmel SAMA5")
 	/* Maintainer: Atmel */
 	.init_machine	= sama5d2_init,
 	.init_early	= sama5_secure_cache_init,
+	.init_late	= sama5d2_pm_init,
 	.dt_compat	= sama5d2_compat,
 	.l2c_aux_mask	= ~0UL,
 MACHINE_END
diff --git a/arch/arm/mach-at91/sama7.c b/arch/arm/mach-at91/sama7.c
index bd43733ede18..8bf57a020f1c 100644
--- a/arch/arm/mach-at91/sama7.c
+++ b/arch/arm/mach-at91/sama7.c
@@ -17,7 +17,6 @@
 static void __init sama7_dt_device_init(void)
 {
 	of_platform_default_populate(NULL, NULL, NULL);
-	sama7_pm_init();
 }
 
 static const char *const sama7_dt_board_compat[] __initconst = {
@@ -27,6 +26,7 @@ static const char *const sama7_dt_board_compat[] __initconst = {
 
 DT_MACHINE_START(sama7_dt, "Microchip SAMA7")
 	/* Maintainer: Microchip */
+	.init_late	= sama7_pm_init,
 	.init_machine	= sama7_dt_device_init,
 	.dt_compat	= sama7_dt_board_compat,
 MACHINE_END

-- 
2.51.0


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

  parent reply	other threads:[~2026-01-05 21:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-05 21:06 [PATCH v3 0/3] at91: Remove of_platform_default_populate() calls Rob Herring (Arm)
2026-01-05 21:06 ` [PATCH v3 1/3] mtd: nand: atmel: Defer probe if SRAM is missing Rob Herring (Arm)
2026-01-05 21:06 ` Rob Herring (Arm) [this message]
2026-01-05 21:06 ` [PATCH v3 3/3] ARM: at91: remove unnecessary of_platform_default_populate calls Rob Herring (Arm)
2026-01-10 15:57 ` [PATCH v3 0/3] at91: Remove of_platform_default_populate() calls Claudiu Beznea
2026-01-19 10:21 ` Miquel Raynal

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=20260105-at91-probe-v3-2-594013ff2965@kernel.org \
    --to=robh@kernel.org \
    --cc=alexandre.belloni@bootlin.com \
    --cc=claudiu.beznea@tuxon.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linux@armlinux.org.uk \
    --cc=miquel.raynal@bootlin.com \
    --cc=nicolas.ferre@microchip.com \
    --cc=richard@nod.at \
    --cc=vigneshr@ti.com \
    /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