diff mbox

[U-Boot,2/2] rpi: Fix fdt_high & initrd_high for 64-bit builds

Message ID 20170619110804.17635-2-tuomas.tynkkynen@iki.fi
State Changes Requested
Delegated to: Tom Rini
Headers show

Commit Message

Tuomas Tynkkynen June 19, 2017, 11:08 a.m. UTC
The magic value that disables relocation is dependent on the CPU word
size, so the current 'ffffffff' is doing the wrong thing on aarch64.

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
---
These two patches aren't really related except for touching the same
parts of the code, I just noticed this by coincidence. For me there's no
visible effects with this patch.

Instead of spreading this #ifdef pattern further,
http://patchwork.ozlabs.org/patch/716487/ would be a cleaner way of
solving this...
---
 include/configs/rpi.h | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/include/configs/rpi.h b/include/configs/rpi.h
index a2d82a9146..153b2463a7 100644
--- a/include/configs/rpi.h
+++ b/include/configs/rpi.h
@@ -119,6 +119,14 @@ 
 	"stdout=serial,vidconsole\0" \
 	"stderr=serial,vidconsole\0"
 
+#ifdef CONFIG_ARM64
+#define FDT_HIGH "ffffffffffffffff"
+#define INITRD_HIGH "ffffffffffffffff"
+#else
+#define FDT_HIGH "ffffffff"
+#define INITRD_HIGH "ffffffff"
+#endif
+
 /*
  * Memory layout for where various images get loaded by boot scripts:
  *
@@ -164,8 +172,8 @@ 
 # define KERNEL_ADDR_R "0x03000000"
 #endif
 #define ENV_MEM_LAYOUT_SETTINGS \
-	"fdt_high=ffffffff\0" \
-	"initrd_high=ffffffff\0" \
+	"fdt_high=" FDT_HIGH "\0" \
+	"initrd_high=" INITRD_HIGH "\0" \
 	"fdt_addr_r=0x00000100\0" \
 	"kernel_addr_r=" KERNEL_ADDR_R "\0" \
 	"scriptaddr=0x04000000\0" \