devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: fix node name for the sysclk
@ 2021-06-08 11:26 Vladimir Oltean
  2021-06-08 11:31 ` Vladimir Oltean
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Vladimir Oltean @ 2021-06-08 11:26 UTC (permalink / raw)
  To: Shawn Guo, devicetree
  Cc: Li Yang, Rob Herring, linux-arm-kernel, linux-kernel, Vladimir Oltean

From: Vladimir Oltean <vladimir.oltean@nxp.com>

U-Boot attempts to fix up the "clock-frequency" property of the "/sysclk" node:
https://elixir.bootlin.com/u-boot/v2021.04/source/arch/arm/cpu/armv8/fsl-layerscape/fdt.c#L512

but fails to do so:

  ## Booting kernel from Legacy Image at a1000000 ...
     Image Name:
     Created:      2021-06-08  10:31:38 UTC
     Image Type:   AArch64 Linux Kernel Image (gzip compressed)
     Data Size:    15431370 Bytes = 14.7 MiB
     Load Address: 80080000
     Entry Point:  80080000
     Verifying Checksum ... OK
  ## Flattened Device Tree blob at a0000000
     Booting using the fdt blob at 0xa0000000
     Uncompressing Kernel Image
     Loading Device Tree to 00000000fbb19000, end 00000000fbb22717 ... OK
  Unable to update property /sysclk:clock-frequency, err=FDT_ERR_NOTFOUND

  Starting kernel ...

All Layerscape SoCs except LS1028A use "sysclk" as the node name, and
not "clock-sysclk". So change the node name of LS1028A accordingly.

Fixes: 8897f3255c9c ("arm64: dts: Add support for NXP LS1028A SoC")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
 arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi
index d0dddf19578a..03e1ca7fea9a 100644
--- a/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi
+++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi
@@ -66,7 +66,7 @@ CPU_PW20: cpu-pw20 {
 		};
 	};
 
-	sysclk: clock-sysclk {
+	sysclk: sysclk {
 		compatible = "fixed-clock";
 		#clock-cells = <0>;
 		clock-frequency = <100000000>;
-- 
2.25.1


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

* Re: [PATCH] arm64: dts: fix node name for the sysclk
  2021-06-08 11:26 [PATCH] arm64: dts: fix node name for the sysclk Vladimir Oltean
@ 2021-06-08 11:31 ` Vladimir Oltean
  2021-06-12  7:53 ` Shawn Guo
  2021-07-14  2:29 ` Shawn Guo
  2 siblings, 0 replies; 5+ messages in thread
From: Vladimir Oltean @ 2021-06-08 11:31 UTC (permalink / raw)
  To: Shawn Guo, devicetree
  Cc: Li Yang, Rob Herring, linux-arm-kernel, linux-kernel, Vladimir Oltean

I forgot to add "ls1028a: " to the commit prefix. Shawn, if there are no
objections to the patch, would you mind adding it when applying? Thanks!

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

* Re: [PATCH] arm64: dts: fix node name for the sysclk
  2021-06-08 11:26 [PATCH] arm64: dts: fix node name for the sysclk Vladimir Oltean
  2021-06-08 11:31 ` Vladimir Oltean
@ 2021-06-12  7:53 ` Shawn Guo
  2021-06-14 14:51   ` Vladimir Oltean
  2021-07-14  2:29 ` Shawn Guo
  2 siblings, 1 reply; 5+ messages in thread
From: Shawn Guo @ 2021-06-12  7:53 UTC (permalink / raw)
  To: Vladimir Oltean
  Cc: devicetree, Li Yang, Rob Herring, linux-arm-kernel, linux-kernel,
	Vladimir Oltean

On Tue, Jun 08, 2021 at 02:26:58PM +0300, Vladimir Oltean wrote:
> From: Vladimir Oltean <vladimir.oltean@nxp.com>
> 
> U-Boot attempts to fix up the "clock-frequency" property of the "/sysclk" node:
> https://elixir.bootlin.com/u-boot/v2021.04/source/arch/arm/cpu/armv8/fsl-layerscape/fdt.c#L512
> 
> but fails to do so:
> 
>   ## Booting kernel from Legacy Image at a1000000 ...
>      Image Name:
>      Created:      2021-06-08  10:31:38 UTC
>      Image Type:   AArch64 Linux Kernel Image (gzip compressed)
>      Data Size:    15431370 Bytes = 14.7 MiB
>      Load Address: 80080000
>      Entry Point:  80080000
>      Verifying Checksum ... OK
>   ## Flattened Device Tree blob at a0000000
>      Booting using the fdt blob at 0xa0000000
>      Uncompressing Kernel Image
>      Loading Device Tree to 00000000fbb19000, end 00000000fbb22717 ... OK
>   Unable to update property /sysclk:clock-frequency, err=FDT_ERR_NOTFOUND
> 
>   Starting kernel ...
> 
> All Layerscape SoCs except LS1028A use "sysclk" as the node name, and
> not "clock-sysclk". So change the node name of LS1028A accordingly.

Wouldn't it more flexible to use alias/label for finding the node?
Using node name/path looks fragile. 

Shawn

> 
> Fixes: 8897f3255c9c ("arm64: dts: Add support for NXP LS1028A SoC")
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
> ---
>  arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi b/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi
> index d0dddf19578a..03e1ca7fea9a 100644
> --- a/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi
> +++ b/arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi
> @@ -66,7 +66,7 @@ CPU_PW20: cpu-pw20 {
>  		};
>  	};
>  
> -	sysclk: clock-sysclk {
> +	sysclk: sysclk {
>  		compatible = "fixed-clock";
>  		#clock-cells = <0>;
>  		clock-frequency = <100000000>;
> -- 
> 2.25.1
> 

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

* Re: [PATCH] arm64: dts: fix node name for the sysclk
  2021-06-12  7:53 ` Shawn Guo
@ 2021-06-14 14:51   ` Vladimir Oltean
  0 siblings, 0 replies; 5+ messages in thread
From: Vladimir Oltean @ 2021-06-14 14:51 UTC (permalink / raw)
  To: Shawn Guo
  Cc: devicetree, Li Yang, Rob Herring, linux-arm-kernel, linux-kernel,
	Vladimir Oltean

Hello Shawn,

On Sat, Jun 12, 2021 at 03:53:47PM +0800, Shawn Guo wrote:
> On Tue, Jun 08, 2021 at 02:26:58PM +0300, Vladimir Oltean wrote:
> > From: Vladimir Oltean <vladimir.oltean@nxp.com>
> >
> > U-Boot attempts to fix up the "clock-frequency" property of the "/sysclk" node:
> > https://elixir.bootlin.com/u-boot/v2021.04/source/arch/arm/cpu/armv8/fsl-layerscape/fdt.c#L512
> >
> > but fails to do so:
> >
> >   ## Booting kernel from Legacy Image at a1000000 ...
> >      Image Name:
> >      Created:      2021-06-08  10:31:38 UTC
> >      Image Type:   AArch64 Linux Kernel Image (gzip compressed)
> >      Data Size:    15431370 Bytes = 14.7 MiB
> >      Load Address: 80080000
> >      Entry Point:  80080000
> >      Verifying Checksum ... OK
> >   ## Flattened Device Tree blob at a0000000
> >      Booting using the fdt blob at 0xa0000000
> >      Uncompressing Kernel Image
> >      Loading Device Tree to 00000000fbb19000, end 00000000fbb22717 ... OK
> >   Unable to update property /sysclk:clock-frequency, err=FDT_ERR_NOTFOUND
> >
> >   Starting kernel ...
> >
> > All Layerscape SoCs except LS1028A use "sysclk" as the node name, and
> > not "clock-sysclk". So change the node name of LS1028A accordingly.
>
> Wouldn't it more flexible to use alias/label for finding the node?
> Using node name/path looks fragile.

Thank you for the advice, I will keep it in mind next time when I design
my own bootloader device tree fixup scheme. However, in this case I did
not create it, and implementing your suggestion to find the sysclk node
through /aliases would require changes not only to the bootloader, but
to the Linux device tree still (and if we're modifying the Linux DT, why
not just go with this patch). So yes, the existing mechanism is more
fragile, but I am not sure if we gain anything by artificially creating
an additional dependency in the process.

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

* Re: [PATCH] arm64: dts: fix node name for the sysclk
  2021-06-08 11:26 [PATCH] arm64: dts: fix node name for the sysclk Vladimir Oltean
  2021-06-08 11:31 ` Vladimir Oltean
  2021-06-12  7:53 ` Shawn Guo
@ 2021-07-14  2:29 ` Shawn Guo
  2 siblings, 0 replies; 5+ messages in thread
From: Shawn Guo @ 2021-07-14  2:29 UTC (permalink / raw)
  To: Vladimir Oltean
  Cc: devicetree, Li Yang, Rob Herring, linux-arm-kernel, linux-kernel,
	Vladimir Oltean

On Tue, Jun 08, 2021 at 02:26:58PM +0300, Vladimir Oltean wrote:
> From: Vladimir Oltean <vladimir.oltean@nxp.com>
> 
> U-Boot attempts to fix up the "clock-frequency" property of the "/sysclk" node:
> https://elixir.bootlin.com/u-boot/v2021.04/source/arch/arm/cpu/armv8/fsl-layerscape/fdt.c#L512
> 
> but fails to do so:
> 
>   ## Booting kernel from Legacy Image at a1000000 ...
>      Image Name:
>      Created:      2021-06-08  10:31:38 UTC
>      Image Type:   AArch64 Linux Kernel Image (gzip compressed)
>      Data Size:    15431370 Bytes = 14.7 MiB
>      Load Address: 80080000
>      Entry Point:  80080000
>      Verifying Checksum ... OK
>   ## Flattened Device Tree blob at a0000000
>      Booting using the fdt blob at 0xa0000000
>      Uncompressing Kernel Image
>      Loading Device Tree to 00000000fbb19000, end 00000000fbb22717 ... OK
>   Unable to update property /sysclk:clock-frequency, err=FDT_ERR_NOTFOUND
> 
>   Starting kernel ...
> 
> All Layerscape SoCs except LS1028A use "sysclk" as the node name, and
> not "clock-sysclk". So change the node name of LS1028A accordingly.
> 
> Fixes: 8897f3255c9c ("arm64: dts: Add support for NXP LS1028A SoC")
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>

Applied, thanks.

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

end of thread, other threads:[~2021-07-14  2:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-08 11:26 [PATCH] arm64: dts: fix node name for the sysclk Vladimir Oltean
2021-06-08 11:31 ` Vladimir Oltean
2021-06-12  7:53 ` Shawn Guo
2021-06-14 14:51   ` Vladimir Oltean
2021-07-14  2:29 ` Shawn Guo

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).