Skip to contentSkip to conversation

ARM: dts: palmetto: Fix flash_memory region

PATCH In review Lei YU 3 participants 4 messages Feb 15, 2019 – Feb 18, 2019

Subsystems (2)
lore
Share & tools
lore

Lei YU

author
#0 lore raw

PATCH 1/1 ARM: dts: palmetto: Fix flash_memory region

The flash_memory region was incorrect and exceeds AST2400's RAM range. Fix it by putting it before coldfire region, and aligned with 32MiB.

---
 arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts +2 -2
index 9285b90..50c9178 100644
@@ -32,9 +32,9 @@
 			no-map;
 		};
 
-		flash_memory: region@98000000 {
+		flash_memory: region@5c000000 {
 			no-map;
-			reg = <0x98000000 0x01000000>; /* 16MB */
+			reg = <0x5C000000 0x02000000>; /* 32MB */
 		};
 	};
 
Signature · 1 line
2.7.4
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Lei YU

The flash_memory region was incorrect and exceeds AST2400's RAM range. Fix it by putting it before coldfire region, and aligned with 32MiB.

Quoted 24 lines
---
 arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/ renamed from arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts +0 -0

boot/dts/aspeed-bmc-opp-palmetto.dts
index 9285b90..50c9178 100644

arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts +2 -2
@@ -32,9 +32,9 @@
 			no-map;
 		};
 
-		flash_memory: region@98000000 {
+		flash_memory: region@5c000000 {
 			no-map;
-			reg = <0x98000000 0x01000000>; /* 16MB */
+			reg = <0x5C000000 0x02000000>; /* 32MB */
 		};
 	};
 
Signature · 1 line
2.7.4
maintainer
#2 lore raw
In reply to Lei YU
Quoted 3 lines · Lei YU

The flash_memory region was incorrect and exceeds AST2400's RAM range. Fix it by putting it before coldfire region, and aligned with 32MiB.

We've had a patch to do this in patchwork for some time now:

https://patchwork.ozlabs.org/patch/879522/

We can't do that as it breaks booting, as the FIT loading will (sometimes) place the initrd or dtb in the reserved region, and this stops Linux from being able to map it, causing boot to fail.

We need to fix that bug before we can resolve this issue. There is a u-boot environment variable that can be set that stops anything being loaded too high. The proper fix is probably to make u-boot's FIT loader aware of the reserved mappings and not put things there. Other suggestions are welcome.

Quoted 25 lines
---
 arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts +2 -3
index 9285b90..50c9178 100644
@@ -32,9 +32,9 @@
                        no-map;
                };
 
-               flash_memory: region@98000000 {
+               flash_memory: region@5c000000 {
                        no-map;
-                       reg = <0x98000000 0x01000000>; /* 16MB */
+                       reg = <0x5C000000 0x02000000>; /* 32MB */
                };
        };
 
--

2.7.4

author
#3 lore raw
Quoted 11 lines
Quoted 2 lines

The flash_memory region was incorrect and exceeds AST2400's RAM range. Fix it by putting it before coldfire region, and aligned with 32MiB.

We've had a patch to do this in patchwork for some time now:

https://patchwork.ozlabs.org/patch/879522/

We can't do that as it breaks booting, as the FIT loading will (sometimes) place the initrd or dtb in the reserved region, and this stops Linux from being able to map it, causing boot to fail.

Quoted 5 lines

We need to fix that bug before we can resolve this issue. There is a u-boot environment variable that can be set that stops anything being loaded too high. The proper fix is probably to make u-boot's FIT loader aware of the reserved mappings and not put things there. Other suggestions are welcome.

This patch puts the window a bit lower, 0x5c000000 instead of 0x5e000000, and from my testing it does not break booting.