[U-Boot] [PATCH v2 7/9] microblaze: Read information about RAM from DT

Michal Simek michal.simek at xilinx.com
Thu Dec 17 13:13:59 CET 2015


Do not setup ram start/size in board file. Read it from DT instead.

Signed-off-by: Michal Simek <michal.simek at xilinx.com>
---

Changes in v2:
- new patch in this series

 board/xilinx/microblaze-generic/microblaze-generic.c | 9 ---------
 board/xilinx/microblaze-generic/xparameters.h        | 4 ----
 include/configs/microblaze-generic.h                 | 9 +--------
 3 files changed, 1 insertion(+), 21 deletions(-)

diff --git a/board/xilinx/microblaze-generic/microblaze-generic.c b/board/xilinx/microblaze-generic/microblaze-generic.c
index 0e7509d288ce..0d7bed58d808 100644
--- a/board/xilinx/microblaze-generic/microblaze-generic.c
+++ b/board/xilinx/microblaze-generic/microblaze-generic.c
@@ -23,7 +23,6 @@ DECLARE_GLOBAL_DATA_PTR;
 static int reset_pin = -1;
 #endif
 
-#if CONFIG_IS_ENABLED(OF_CONTROL)
 ulong ram_base;
 
 void dram_init_banksize(void)
@@ -57,14 +56,6 @@ int dram_init(void)
 
 	return 0;
 };
-#else
-int dram_init(void)
-{
-	gd->ram_size = CONFIG_SYS_SDRAM_SIZE;
-
-	return 0;
-}
-#endif
 
 int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
 {
diff --git a/board/xilinx/microblaze-generic/xparameters.h b/board/xilinx/microblaze-generic/xparameters.h
index 552aaf4fdea0..ccb528ed9266 100644
--- a/board/xilinx/microblaze-generic/xparameters.h
+++ b/board/xilinx/microblaze-generic/xparameters.h
@@ -35,10 +35,6 @@
 #define XILINX_FLASH_START	0x2c000000
 #define XILINX_FLASH_SIZE	0x00800000
 
-/* Main Memory is DDR_SDRAM_64Mx32 */
-#define XILINX_RAM_START	0x28000000
-#define XILINX_RAM_SIZE	0x04000000
-
 /* Watchdog IP is wxi_timebase_wdt_0 */
 #define XILINX_WATCHDOG_BASEADDR	0x50000000
 #define XILINX_WATCHDOG_IRQ		1
diff --git a/include/configs/microblaze-generic.h b/include/configs/microblaze-generic.h
index 48edddae4d56..3458e66a8873 100644
--- a/include/configs/microblaze-generic.h
+++ b/include/configs/microblaze-generic.h
@@ -68,13 +68,6 @@
 # endif
 #endif
 
-#if !defined(CONFIG_OF_CONTROL) || \
-	(defined(CONFIG_SPL_BUILD) && !defined(CONFIG_SPL_OF_CONTROL))
-/* ddr sdram - main memory */
-# define CONFIG_SYS_SDRAM_BASE	XILINX_RAM_START
-# define CONFIG_SYS_SDRAM_SIZE	XILINX_RAM_SIZE
-#endif
-
 #define CONFIG_SYS_MALLOC_LEN	0xC0000
 
 /* Stack location before relocation */
@@ -259,7 +252,7 @@
 #define	CONFIG_SYS_MAXARGS	15
 #define	CONFIG_SYS_LONGHELP
 /* default load address */
-#define	CONFIG_SYS_LOAD_ADDR	XILINX_RAM_START
+#define	CONFIG_SYS_LOAD_ADDR	0
 
 #define	CONFIG_BOOTDELAY	-1	/* -1 disables auto-boot */
 #define	CONFIG_BOOTARGS		"root=romfs"
-- 
1.9.1



More information about the U-Boot mailing list