[U-Boot] [PATCH 24/27] malta: Use a physical CONFIG_SYS_SDRAM_BASE

Paul Burton paul.burton at imgtec.com
Sat Oct 1 16:19:27 CEST 2016


README states that CONFIG_SYS_SDRAM_BASE should the physical base
address of SDRAM, whilst up until now various pieces of generic code
have presumed that it can be directly accessed by the CPU & MIPS has
provided a virtual address for CONFIG_SYS_SDRAM_BASE. Other generic code
expects CONFIG_SYS_SDRAM_BASE to be a physical address, which makes the
inconsistency a mess.

Now that the preceding patches have prepared us to handle using a
physical CONFIG_SYS_SDRAM_BASE, clean up the inconsistency for malta by
providing a physical CONFIG_SYS_SDRAM_BASE.

Signed-off-by: Paul Burton <paul.burton at imgtec.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck at gmail.com>
---

 include/configs/malta.h | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/include/configs/malta.h b/include/configs/malta.h
index fc4baba..5bc9f23 100644
--- a/include/configs/malta.h
+++ b/include/configs/malta.h
@@ -39,18 +39,20 @@
  */
 #define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_TEXT_BASE
 
-#ifdef CONFIG_64BIT
-# define CONFIG_SYS_SDRAM_BASE		0xffffffff80000000
-#else
-# define CONFIG_SYS_SDRAM_BASE		0x80000000
-#endif
+#define CONFIG_SYS_SDRAM_BASE		0x0
 #define CONFIG_SYS_MEM_SIZE		(256 * 1024 * 1024)
 
 #define CONFIG_SYS_INIT_SP_OFFSET	0x400000
 
-#define CONFIG_SYS_LOAD_ADDR		(CONFIG_SYS_SDRAM_BASE + 0x01000000)
-#define CONFIG_SYS_MEMTEST_START	(CONFIG_SYS_SDRAM_BASE + 0x00100000)
-#define CONFIG_SYS_MEMTEST_END		(CONFIG_SYS_SDRAM_BASE + 0x00800000)
+#ifdef CONFIG_64BIT
+# define CONFIG_SYS_LOAD_ADDR		0xffffffff81000000
+# define CONFIG_SYS_MEMTEST_START	0xffffffff80100000
+# define CONFIG_SYS_MEMTEST_END		0xffffffff80800000
+#else
+# define CONFIG_SYS_LOAD_ADDR		0x81000000
+# define CONFIG_SYS_MEMTEST_START	0x80100000
+# define CONFIG_SYS_MEMTEST_END		0x80800000
+#endif
 
 #define CONFIG_SYS_MALLOC_LEN		(128 * 1024)
 #define CONFIG_SYS_BOOTPARAMS_LEN	(128 * 1024)
-- 
2.10.0



More information about the U-Boot mailing list