diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2020-06-18 11:10:53 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2020-06-23 09:56:43 +0200 |
commit | 7bbcfc85aa5d93f5729673d5c745fb753f39a78f (patch) | |
tree | 08e39eaab23cffbe2bcc9f0d7a091f6398942036 /arch/arm/dts/at91-microchip-ksz9477-evb.dts | |
parent | 414ba34b6cdf3872b511a7735b971d6664172b83 (diff) | |
download | barebox-7bbcfc85aa5d93f5729673d5c745fb753f39a78f.tar.gz barebox-7bbcfc85aa5d93f5729673d5c745fb753f39a78f.tar.xz |
ARM: dts: reference nodes to extend by phandles instead
Many device trees upstream have moved to memory@BASE_ADDRESS for the
memory node instead of a unit-name-less memory node. This has resulted
in breakage[1] in barebox, because some device trees feature an upstream
memory size that's not available in all variants and the barebox device
tree must override it, not create a second correct node next to the broken
one and risk of_add_memory allocating banks with bogus sizes.
To avoid this happening in future, to memory or to other nodes, extension
of nodes should happen via phandles throughout, because a phandle is assumed
to be more stable and if one is removed a compile error results instead
of creating a new node somewhere. For nodes lacking a phandle, we can
use the &{/path} syntax to declare an anonymous phandle that will fail
to compile when the upstream path changes. This is better than having
devices fail to boot at runtime.
[1]: 0d26ce1c11a1 ("ARM: Phytec phyFLEX i.MX6: delete wrong memory node")
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/dts/at91-microchip-ksz9477-evb.dts')
-rw-r--r-- | arch/arm/dts/at91-microchip-ksz9477-evb.dts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm/dts/at91-microchip-ksz9477-evb.dts b/arch/arm/dts/at91-microchip-ksz9477-evb.dts index 075cdcd088..a0c3ce39bb 100644 --- a/arch/arm/dts/at91-microchip-ksz9477-evb.dts +++ b/arch/arm/dts/at91-microchip-ksz9477-evb.dts @@ -27,10 +27,10 @@ file-path = "barebox.env"; }; }; +}; - memory { - reg = <0x20000000 0x10000000>; - }; +&{/memory} { + reg = <0x20000000 0x10000000>; }; &pinctrl { |