linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: at91: remove unnecessary of_platform_default_populate calls
@ 2018-06-19 21:40 Rob Herring
  2018-07-09 15:50 ` Rob Herring
  0 siblings, 1 reply; 7+ messages in thread
From: Rob Herring @ 2018-06-19 21:40 UTC (permalink / raw)
  To: Nicolas Ferre; +Cc: linux-kernel, Alexandre Belloni, linux-arm-kernel

The DT core will call of_platform_default_populate, so it is not
necessary for machine specific code to call it unless there are custom
match entries, auxdata or parent device. Neither of those apply here, so
remove the call.

Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Rob Herring <robh@kernel.org>
---
 arch/arm/mach-at91/at91rm9200.c | 5 -----
 arch/arm/mach-at91/at91sam9.c   | 5 -----
 arch/arm/mach-at91/sama5.c      | 5 -----
 3 files changed, 15 deletions(-)

diff --git a/arch/arm/mach-at91/at91rm9200.c b/arch/arm/mach-at91/at91rm9200.c
index 656ad409a253..42583261951e 100644
--- a/arch/arm/mach-at91/at91rm9200.c
+++ b/arch/arm/mach-at91/at91rm9200.c
@@ -8,17 +8,12 @@
  * Licensed under GPLv2 or later.
  */
 
-#include <linux/of.h>
-#include <linux/of_platform.h>
-
 #include <asm/mach/arch.h>
 
 #include "generic.h"
 
 static void __init at91rm9200_dt_device_init(void)
 {
-	of_platform_default_populate(NULL, NULL, NULL);
-
 	at91rm9200_pm_init();
 }
 
diff --git a/arch/arm/mach-at91/at91sam9.c b/arch/arm/mach-at91/at91sam9.c
index 3dbdef4d3cbf..863a0e7ba00f 100644
--- a/arch/arm/mach-at91/at91sam9.c
+++ b/arch/arm/mach-at91/at91sam9.c
@@ -7,9 +7,6 @@
  * Licensed under GPLv2 or later.
  */
 
-#include <linux/of.h>
-#include <linux/of_platform.h>
-
 #include <asm/mach/arch.h>
 #include <asm/system_misc.h>
 
@@ -17,8 +14,6 @@
 
 static void __init at91sam9_init(void)
 {
-	of_platform_default_populate(NULL, NULL, NULL);
-
 	at91sam9_pm_init();
 }
 
diff --git a/arch/arm/mach-at91/sama5.c b/arch/arm/mach-at91/sama5.c
index 3d0bf95a56ae..e3a84a59db76 100644
--- a/arch/arm/mach-at91/sama5.c
+++ b/arch/arm/mach-at91/sama5.c
@@ -7,9 +7,6 @@
  * Licensed under GPLv2 or later.
  */
 
-#include <linux/of.h>
-#include <linux/of_platform.h>
-
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 #include <asm/system_misc.h>
@@ -18,7 +15,6 @@
 
 static void __init sama5_dt_device_init(void)
 {
-	of_platform_default_populate(NULL, NULL, NULL);
 	sama5_pm_init();
 }
 
@@ -47,7 +43,6 @@ MACHINE_END
 
 static void __init sama5d2_init(void)
 {
-	of_platform_default_populate(NULL, NULL, NULL);
 	sama5d2_pm_init();
 }
 
-- 
2.17.1


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

* Re: [PATCH] ARM: at91: remove unnecessary of_platform_default_populate calls
  2018-06-19 21:40 [PATCH] ARM: at91: remove unnecessary of_platform_default_populate calls Rob Herring
@ 2018-07-09 15:50 ` Rob Herring
  2018-07-11 16:14   ` Alexandre Belloni
  0 siblings, 1 reply; 7+ messages in thread
From: Rob Herring @ 2018-07-09 15:50 UTC (permalink / raw)
  To: Nicolas Ferre
  Cc: linux-kernel, Alexandre Belloni,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE

On Tue, Jun 19, 2018 at 3:40 PM Rob Herring <robh@kernel.org> wrote:
>
> The DT core will call of_platform_default_populate, so it is not
> necessary for machine specific code to call it unless there are custom
> match entries, auxdata or parent device. Neither of those apply here, so
> remove the call.
>
> Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
> Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
> Cc: linux-arm-kernel@lists.infradead.org
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
>  arch/arm/mach-at91/at91rm9200.c | 5 -----
>  arch/arm/mach-at91/at91sam9.c   | 5 -----
>  arch/arm/mach-at91/sama5.c      | 5 -----
>  3 files changed, 15 deletions(-)

Ping?

>
> diff --git a/arch/arm/mach-at91/at91rm9200.c b/arch/arm/mach-at91/at91rm9200.c
> index 656ad409a253..42583261951e 100644
> --- a/arch/arm/mach-at91/at91rm9200.c
> +++ b/arch/arm/mach-at91/at91rm9200.c
> @@ -8,17 +8,12 @@
>   * Licensed under GPLv2 or later.
>   */
>
> -#include <linux/of.h>
> -#include <linux/of_platform.h>
> -
>  #include <asm/mach/arch.h>
>
>  #include "generic.h"
>
>  static void __init at91rm9200_dt_device_init(void)
>  {
> -       of_platform_default_populate(NULL, NULL, NULL);
> -
>         at91rm9200_pm_init();
>  }
>
> diff --git a/arch/arm/mach-at91/at91sam9.c b/arch/arm/mach-at91/at91sam9.c
> index 3dbdef4d3cbf..863a0e7ba00f 100644
> --- a/arch/arm/mach-at91/at91sam9.c
> +++ b/arch/arm/mach-at91/at91sam9.c
> @@ -7,9 +7,6 @@
>   * Licensed under GPLv2 or later.
>   */
>
> -#include <linux/of.h>
> -#include <linux/of_platform.h>
> -
>  #include <asm/mach/arch.h>
>  #include <asm/system_misc.h>
>
> @@ -17,8 +14,6 @@
>
>  static void __init at91sam9_init(void)
>  {
> -       of_platform_default_populate(NULL, NULL, NULL);
> -
>         at91sam9_pm_init();
>  }
>
> diff --git a/arch/arm/mach-at91/sama5.c b/arch/arm/mach-at91/sama5.c
> index 3d0bf95a56ae..e3a84a59db76 100644
> --- a/arch/arm/mach-at91/sama5.c
> +++ b/arch/arm/mach-at91/sama5.c
> @@ -7,9 +7,6 @@
>   * Licensed under GPLv2 or later.
>   */
>
> -#include <linux/of.h>
> -#include <linux/of_platform.h>
> -
>  #include <asm/mach/arch.h>
>  #include <asm/mach/map.h>
>  #include <asm/system_misc.h>
> @@ -18,7 +15,6 @@
>
>  static void __init sama5_dt_device_init(void)
>  {
> -       of_platform_default_populate(NULL, NULL, NULL);
>         sama5_pm_init();
>  }
>
> @@ -47,7 +43,6 @@ MACHINE_END
>
>  static void __init sama5d2_init(void)
>  {
> -       of_platform_default_populate(NULL, NULL, NULL);
>         sama5d2_pm_init();
>  }
>
> --
> 2.17.1
>

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

* Re: [PATCH] ARM: at91: remove unnecessary of_platform_default_populate calls
  2018-07-09 15:50 ` Rob Herring
@ 2018-07-11 16:14   ` Alexandre Belloni
  2018-07-11 18:13     ` Rob Herring
  2023-01-24 11:23     ` nicolas.ferre
  0 siblings, 2 replies; 7+ messages in thread
From: Alexandre Belloni @ 2018-07-11 16:14 UTC (permalink / raw)
  To: Rob Herring
  Cc: Nicolas Ferre, linux-kernel,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE

Hi,

On 09/07/2018 09:50:47-0600, Rob Herring wrote:
> On Tue, Jun 19, 2018 at 3:40 PM Rob Herring <robh@kernel.org> wrote:
> >
> > The DT core will call of_platform_default_populate, so it is not
> > necessary for machine specific code to call it unless there are custom
> > match entries, auxdata or parent device. Neither of those apply here, so
> > remove the call.
> >
> > Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
> > Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
> > Cc: linux-arm-kernel@lists.infradead.org
> > Signed-off-by: Rob Herring <robh@kernel.org>
> > ---
> >  arch/arm/mach-at91/at91rm9200.c | 5 -----
> >  arch/arm/mach-at91/at91sam9.c   | 5 -----
> >  arch/arm/mach-at91/sama5.c      | 5 -----
> >  3 files changed, 15 deletions(-)
> 
> Ping?
> 

This breaks the platform in two different ways:
 - PM is not working anymore because of the missing SRAM node
 - the pinctrl driver fails to probe and so many drivers are
   deferring the probe forever

Relevant messages (once the earlycon crap is removed to let earlyprintk
do its job):

at91_pm_sram_init: failed to find sram device!
AT91: PM not supported, due to no SRAM allocated

pinctrl-at91 ahb:apb:pinctrl@fc06a000: you need to specify at least one gpio-controller
pinctrl-at91: probe of ahb:apb:pinctrl@fc06a000 failed with error -22
gpio-at91 fc06a000.gpio: at address (ptrval)
gpio-at91 fc06b000.gpio: at address (ptrval)
gpio-at91 fc06c000.gpio: at address (ptrval)
gpio-at91 fc068000.gpio: at address (ptrval)
gpio-at91 fc06d000.gpio: at address (ptrval)

at91_i2c f8014000.i2c: could not find pctldev for node /ahb/apb/pinctrl@fc06a000/i2c0/i2c0-0, deferring probe
atmel_usart f8004000.serial: could not find pctldev for node /ahb/apb/pinctrl@fc06a000/uart0/uart0-0, deferring probe
atmel_usart fc00c000.serial: could not find pctldev for node /ahb/apb/pinctrl@fc06a000/usart3/usart3-0, deferring probe
atmel_usart fc010000.serial: could not find pctldev for node /ahb/apb/pinctrl@fc06a000/usart4/usart4-0, deferring probe
atmel_spi f8010000.spi: could not find pctldev for node /ahb/apb/pinctrl@fc06a000/spi0/spi0-0, deferring probe
atmel_spi fc018000.spi: could not find pctldev for node /ahb/apb/pinctrl@fc06a000/spi1/spi1-0, deferring probe
macb f8020000.ethernet: could not find pctldev for node /ahb/apb/pinctrl@fc06a000/macb0/macb0_rmii-0, deferring probe
atmel_mci fc000000.mmc: could not find pctldev for node /ahb/apb/pinctrl@fc06a000/mmc1/mmc1_clk_cmd_dat0, deferring probe
at91_adc fc034000.adc: could not find pctldev for node /ahb/apb/pinctrl@fc06a000/adc0/adc0_ad0, deferring probe
gpio-keys gpio_keys: could not find pctldev for node /ahb/apb/pinctrl@fc06a000/board/key_gpio_0, deferring probe


-- 
Alexandre Belloni, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

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

* Re: [PATCH] ARM: at91: remove unnecessary of_platform_default_populate calls
  2018-07-11 16:14   ` Alexandre Belloni
@ 2018-07-11 18:13     ` Rob Herring
  2018-07-11 19:41       ` Alexandre Belloni
  2023-01-24 11:23     ` nicolas.ferre
  1 sibling, 1 reply; 7+ messages in thread
From: Rob Herring @ 2018-07-11 18:13 UTC (permalink / raw)
  To: Alexandre Belloni
  Cc: Nicolas Ferre, linux-kernel,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE

On Wed, Jul 11, 2018 at 10:15 AM Alexandre Belloni
<alexandre.belloni@bootlin.com> wrote:
>
> Hi,
>
> On 09/07/2018 09:50:47-0600, Rob Herring wrote:
> > On Tue, Jun 19, 2018 at 3:40 PM Rob Herring <robh@kernel.org> wrote:
> > >
> > > The DT core will call of_platform_default_populate, so it is not
> > > necessary for machine specific code to call it unless there are custom
> > > match entries, auxdata or parent device. Neither of those apply here, so
> > > remove the call.
> > >
> > > Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
> > > Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
> > > Cc: linux-arm-kernel@lists.infradead.org
> > > Signed-off-by: Rob Herring <robh@kernel.org>
> > > ---
> > >  arch/arm/mach-at91/at91rm9200.c | 5 -----
> > >  arch/arm/mach-at91/at91sam9.c   | 5 -----
> > >  arch/arm/mach-at91/sama5.c      | 5 -----
> > >  3 files changed, 15 deletions(-)
> >
> > Ping?
> >
>
> This breaks the platform in two different ways:
>  - PM is not working anymore because of the missing SRAM node
>  - the pinctrl driver fails to probe and so many drivers are
>    deferring the probe forever
>
> Relevant messages (once the earlycon crap is removed to let earlyprintk
> do its job):
>
> at91_pm_sram_init: failed to find sram device!
> AT91: PM not supported, due to no SRAM allocated

So the at91_pm_sram_init function tries to get SRAM platform device,
but it doesn't exist yet. Of course, that is fragile because while the
device may exist, it's just luck that it's driver has probed already.
Would using .init_late hook instead of .init_machine work for you?

Ideally, couldn't much of this code be converted to a driver? It's a
bit strange for initcall code to have a driver dependency.

>
> pinctrl-at91 ahb:apb:pinctrl@fc06a000: you need to specify at least one gpio-controller
> pinctrl-at91: probe of ahb:apb:pinctrl@fc06a000 failed with error -22

So this one has the strange dependency that the child nodes probe
before the parent node. That's backwards. Probe order is probably
changing from link order (all the devices are created before drivers
register) to device creation order. I think the fix is the pinctrl
driver should just count the gpio child nodes rather than relying on
aliases (which I'm not a fan of either). I can write a patch to do
that.

Rob

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

* Re: [PATCH] ARM: at91: remove unnecessary of_platform_default_populate calls
  2018-07-11 18:13     ` Rob Herring
@ 2018-07-11 19:41       ` Alexandre Belloni
  0 siblings, 0 replies; 7+ messages in thread
From: Alexandre Belloni @ 2018-07-11 19:41 UTC (permalink / raw)
  To: Rob Herring
  Cc: Nicolas Ferre, Shawn Guo, linux-kernel, Pengutronix Kernel Team,
	Fabio Estevam,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE

On 11/07/2018 12:13:17-0600, Rob Herring wrote:
> On Wed, Jul 11, 2018 at 10:15 AM Alexandre Belloni
> <alexandre.belloni@bootlin.com> wrote:
> >
> > Hi,
> >
> > On 09/07/2018 09:50:47-0600, Rob Herring wrote:
> > > On Tue, Jun 19, 2018 at 3:40 PM Rob Herring <robh@kernel.org> wrote:
> > > >
> > > > The DT core will call of_platform_default_populate, so it is not
> > > > necessary for machine specific code to call it unless there are custom
> > > > match entries, auxdata or parent device. Neither of those apply here, so
> > > > remove the call.
> > > >
> > > > Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
> > > > Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
> > > > Cc: linux-arm-kernel@lists.infradead.org
> > > > Signed-off-by: Rob Herring <robh@kernel.org>
> > > > ---
> > > >  arch/arm/mach-at91/at91rm9200.c | 5 -----
> > > >  arch/arm/mach-at91/at91sam9.c   | 5 -----
> > > >  arch/arm/mach-at91/sama5.c      | 5 -----
> > > >  3 files changed, 15 deletions(-)
> > >
> > > Ping?
> > >
> >
> > This breaks the platform in two different ways:
> >  - PM is not working anymore because of the missing SRAM node
> >  - the pinctrl driver fails to probe and so many drivers are
> >    deferring the probe forever
> >
> > Relevant messages (once the earlycon crap is removed to let earlyprintk
> > do its job):
> >
> > at91_pm_sram_init: failed to find sram device!
> > AT91: PM not supported, due to no SRAM allocated
> 
> So the at91_pm_sram_init function tries to get SRAM platform device,
> but it doesn't exist yet. Of course, that is fragile because while the
> device may exist, it's just luck that it's driver has probed already.
> Would using .init_late hook instead of .init_machine work for you?
> 
> Ideally, couldn't much of this code be converted to a driver? It's a
> bit strange for initcall code to have a driver dependency.
> 

.init_late seems to work after testing quickly

You probably didn't see it because they still have a soc_device parent
but Arnd wanted us to remove it so it is gone.

> >
> > pinctrl-at91 ahb:apb:pinctrl@fc06a000: you need to specify at least one gpio-controller
> > pinctrl-at91: probe of ahb:apb:pinctrl@fc06a000 failed with error -22
> 
> So this one has the strange dependency that the child nodes probe
> before the parent node. That's backwards. Probe order is probably
> changing from link order (all the devices are created before drivers
> register) to device creation order. I think the fix is the pinctrl
> driver should just count the gpio child nodes rather than relying on
> aliases (which I'm not a fan of either). I can write a patch to do
> that.

I'll let you do that.

-- 
Alexandre Belloni, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [PATCH] ARM: at91: remove unnecessary of_platform_default_populate calls
  2018-07-11 16:14   ` Alexandre Belloni
  2018-07-11 18:13     ` Rob Herring
@ 2023-01-24 11:23     ` nicolas.ferre
  2023-01-24 12:42       ` Nicolas Ferre
  1 sibling, 1 reply; 7+ messages in thread
From: nicolas.ferre @ 2023-01-24 11:23 UTC (permalink / raw)
  To: robh, Alexandre Belloni, ryan.wanner; +Cc: linux-kernel, linux-arm-kernel

From: Rob Herring <robh@kernel.org>

DO NOT APPLY: breaking boot on at91 (sama5d3 xplained / NAND at least)

The DT core will call of_platform_default_populate, so it is not
necessary for machine specific code to call it unless there are custom
match entries, auxdata or parent device. Neither of those apply here, so
remove the call.

Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Rob Herring <robh@kernel.org>
[nicolas.ferre@microchip.com: update to newest kernel, add sama7.c file]
Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
---
Rob, Alexandre,

This is the updated patch by Rob.
Tested on sama5d3 xplained platform it fails at least with NAND and, as you
observed Alexandre, SRAM.

The pinctrl patch [1] applied seem to solve the problem with GPIO/pinctrl.

So, this move is not ready now, but we can make progress, little by little.

Best regards,
  Nicolas

 arch/arm/mach-at91/at91rm9200.c | 5 -----
 arch/arm/mach-at91/at91sam9.c   | 5 -----
 arch/arm/mach-at91/sama5.c      | 7 +------
 arch/arm/mach-at91/sama7.c      | 4 ----
 4 files changed, 1 insertion(+), 20 deletions(-)

diff --git a/arch/arm/mach-at91/at91rm9200.c b/arch/arm/mach-at91/at91rm9200.c
index 4f8186211619..e262f5459c76 100644
--- a/arch/arm/mach-at91/at91rm9200.c
+++ b/arch/arm/mach-at91/at91rm9200.c
@@ -7,17 +7,12 @@
  *                2012 Joachim Eastwood <manabian@gmail.com>
  */
 
-#include <linux/of.h>
-#include <linux/of_platform.h>
-
 #include <asm/mach/arch.h>
 
 #include "generic.h"
 
 static void __init at91rm9200_dt_device_init(void)
 {
-	of_platform_default_populate(NULL, NULL, NULL);
-
 	at91rm9200_pm_init();
 }
 
diff --git a/arch/arm/mach-at91/at91sam9.c b/arch/arm/mach-at91/at91sam9.c
index 7e572189a5eb..74b4dd8403a2 100644
--- a/arch/arm/mach-at91/at91sam9.c
+++ b/arch/arm/mach-at91/at91sam9.c
@@ -6,9 +6,6 @@
  *                2011 Nicolas Ferre <nicolas.ferre@atmel.com>
  */
 
-#include <linux/of.h>
-#include <linux/of_platform.h>
-
 #include <asm/mach/arch.h>
 #include <asm/system_misc.h>
 
@@ -16,8 +13,6 @@
 
 static void __init at91sam9_init(void)
 {
-	of_platform_default_populate(NULL, NULL, NULL);
-
 	at91sam9_pm_init();
 }
 
diff --git a/arch/arm/mach-at91/sama5.c b/arch/arm/mach-at91/sama5.c
index bf2b5c6a18c6..79dfa257b3b4 100644
--- a/arch/arm/mach-at91/sama5.c
+++ b/arch/arm/mach-at91/sama5.c
@@ -6,14 +6,11 @@
  *                2013 Ludovic Desroches <ludovic.desroches@atmel.com>
  */
 
-#include <linux/of.h>
-#include <linux/of_platform.h>
-
-#include <asm/hardware/cache-l2x0.h>
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 #include <asm/outercache.h>
 #include <asm/system_misc.h>
+#include <asm/hardware/cache-l2x0.h>
 
 #include "generic.h"
 #include "sam_secure.h"
@@ -32,7 +29,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();
 }
 
@@ -61,7 +57,6 @@ MACHINE_END
 
 static void __init sama5d2_init(void)
 {
-	of_platform_default_populate(NULL, NULL, NULL);
 	sama5d2_pm_init();
 }
 
diff --git a/arch/arm/mach-at91/sama7.c b/arch/arm/mach-at91/sama7.c
index bd43733ede18..5faccfe9a9bb 100644
--- a/arch/arm/mach-at91/sama7.c
+++ b/arch/arm/mach-at91/sama7.c
@@ -6,9 +6,6 @@
  *
  */
 
-#include <linux/of.h>
-#include <linux/of_platform.h>
-
 #include <asm/mach/arch.h>
 #include <asm/system_misc.h>
 
@@ -16,7 +13,6 @@
 
 static void __init sama7_dt_device_init(void)
 {
-	of_platform_default_populate(NULL, NULL, NULL);
 	sama7_pm_init();
 }
 
-- 
2.34.1


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

* Re: [PATCH] ARM: at91: remove unnecessary of_platform_default_populate calls
  2023-01-24 11:23     ` nicolas.ferre
@ 2023-01-24 12:42       ` Nicolas Ferre
  0 siblings, 0 replies; 7+ messages in thread
From: Nicolas Ferre @ 2023-01-24 12:42 UTC (permalink / raw)
  To: robh, Alexandre Belloni, ryan.wanner; +Cc: linux-kernel, linux-arm-kernel

On 24/01/2023 at 12:23, nicolas.ferre@microchip.com wrote:
> From: Rob Herring <robh@kernel.org>
> 
> DO NOT APPLY: breaking boot on at91 (sama5d3 xplained / NAND at least)
> 
> The DT core will call of_platform_default_populate, so it is not
> necessary for machine specific code to call it unless there are custom
> match entries, auxdata or parent device. Neither of those apply here, so
> remove the call.
> 
> Cc: Alexandre Belloni <alexandre.belloni@bootlin.com>
> Cc: linux-arm-kernel@lists.infradead.org
> Signed-off-by: Rob Herring <robh@kernel.org>
> [nicolas.ferre@microchip.com: update to newest kernel, add sama7.c file]
> Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
> ---
> Rob, Alexandre,
> 
> This is the updated patch by Rob.
> Tested on sama5d3 xplained platform it fails at least with NAND and, as you
> observed Alexandre, SRAM.
> 
> The pinctrl patch [1] applied seem to solve the problem with GPIO/pinctrl.

Ref. missing:
[1] https://lore.kernel.org/all/20180712192222.32481-1-robh@kernel.org/

> 
> So, this move is not ready now, but we can make progress, little by little.
> 
> Best regards,
>    Nicolas
> 
>   arch/arm/mach-at91/at91rm9200.c | 5 -----
>   arch/arm/mach-at91/at91sam9.c   | 5 -----
>   arch/arm/mach-at91/sama5.c      | 7 +------
>   arch/arm/mach-at91/sama7.c      | 4 ----
>   4 files changed, 1 insertion(+), 20 deletions(-)
> 
> diff --git a/arch/arm/mach-at91/at91rm9200.c b/arch/arm/mach-at91/at91rm9200.c
> index 4f8186211619..e262f5459c76 100644
> --- a/arch/arm/mach-at91/at91rm9200.c
> +++ b/arch/arm/mach-at91/at91rm9200.c
> @@ -7,17 +7,12 @@
>    *                2012 Joachim Eastwood <manabian@gmail.com>
>    */
> 
> -#include <linux/of.h>
> -#include <linux/of_platform.h>
> -
>   #include <asm/mach/arch.h>
> 
>   #include "generic.h"
> 
>   static void __init at91rm9200_dt_device_init(void)
>   {
> -       of_platform_default_populate(NULL, NULL, NULL);
> -
>          at91rm9200_pm_init();
>   }
> 
> diff --git a/arch/arm/mach-at91/at91sam9.c b/arch/arm/mach-at91/at91sam9.c
> index 7e572189a5eb..74b4dd8403a2 100644
> --- a/arch/arm/mach-at91/at91sam9.c
> +++ b/arch/arm/mach-at91/at91sam9.c
> @@ -6,9 +6,6 @@
>    *                2011 Nicolas Ferre <nicolas.ferre@atmel.com>
>    */
> 
> -#include <linux/of.h>
> -#include <linux/of_platform.h>
> -
>   #include <asm/mach/arch.h>
>   #include <asm/system_misc.h>
> 
> @@ -16,8 +13,6 @@
> 
>   static void __init at91sam9_init(void)
>   {
> -       of_platform_default_populate(NULL, NULL, NULL);
> -
>          at91sam9_pm_init();
>   }
> 
> diff --git a/arch/arm/mach-at91/sama5.c b/arch/arm/mach-at91/sama5.c
> index bf2b5c6a18c6..79dfa257b3b4 100644
> --- a/arch/arm/mach-at91/sama5.c
> +++ b/arch/arm/mach-at91/sama5.c
> @@ -6,14 +6,11 @@
>    *                2013 Ludovic Desroches <ludovic.desroches@atmel.com>
>    */
> 
> -#include <linux/of.h>
> -#include <linux/of_platform.h>
> -
> -#include <asm/hardware/cache-l2x0.h>
>   #include <asm/mach/arch.h>
>   #include <asm/mach/map.h>
>   #include <asm/outercache.h>
>   #include <asm/system_misc.h>
> +#include <asm/hardware/cache-l2x0.h>
> 
>   #include "generic.h"
>   #include "sam_secure.h"
> @@ -32,7 +29,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();
>   }
> 
> @@ -61,7 +57,6 @@ MACHINE_END
> 
>   static void __init sama5d2_init(void)
>   {
> -       of_platform_default_populate(NULL, NULL, NULL);
>          sama5d2_pm_init();
>   }
> 
> diff --git a/arch/arm/mach-at91/sama7.c b/arch/arm/mach-at91/sama7.c
> index bd43733ede18..5faccfe9a9bb 100644
> --- a/arch/arm/mach-at91/sama7.c
> +++ b/arch/arm/mach-at91/sama7.c
> @@ -6,9 +6,6 @@
>    *
>    */
> 
> -#include <linux/of.h>
> -#include <linux/of_platform.h>
> -
>   #include <asm/mach/arch.h>
>   #include <asm/system_misc.h>
> 
> @@ -16,7 +13,6 @@
> 
>   static void __init sama7_dt_device_init(void)
>   {
> -       of_platform_default_populate(NULL, NULL, NULL);
>          sama7_pm_init();
>   }
> 
> --
> 2.34.1
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

-- 
Nicolas Ferre


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

end of thread, other threads:[~2023-01-24 12:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-19 21:40 [PATCH] ARM: at91: remove unnecessary of_platform_default_populate calls Rob Herring
2018-07-09 15:50 ` Rob Herring
2018-07-11 16:14   ` Alexandre Belloni
2018-07-11 18:13     ` Rob Herring
2018-07-11 19:41       ` Alexandre Belloni
2023-01-24 11:23     ` nicolas.ferre
2023-01-24 12:42       ` Nicolas Ferre

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).