From: Michal Simek Date: Tue, 25 Sep 2012 08:41:41 +0000 (+0200) Subject: zynq: common: Use CONFIG_SYS_SDRAM_BASE/SIZE for ram X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=85b20efedd38185f14ce5223f8d9f6f8dea9b92a;p=thirdparty%2Fu-boot.git zynq: common: Use CONFIG_SYS_SDRAM_BASE/SIZE for ram Synchronization with PetaLinux. Signed-off-by: Michal Simek --- diff --git a/board/xilinx/zynq_common/board.c b/board/xilinx/zynq_common/board.c index 90ce16b07f4..54a109a8e75 100644 --- a/board/xilinx/zynq_common/board.c +++ b/board/xilinx/zynq_common/board.c @@ -26,7 +26,7 @@ #define NOR_FLASH_MODE (0x00000002) /**< NOR */ #define NAND_FLASH_MODE (0x00000004) /**< NAND */ #define SD_MODE (0x00000005) /**< Secure Digital card */ -#define JTAG_MODE (0x00000000) /**< JTAG */ +#define JTAG_MODE (0x00000000) /**< JTAG */ DECLARE_GLOBAL_DATA_PTR; @@ -138,7 +138,10 @@ int board_nand_init(struct nand_chip *nand_chip) int dram_init(void) { - gd->ram_size = PHYS_SDRAM_1_SIZE; + gd->ram_size = get_ram_size((void *)CONFIG_SYS_SDRAM_BASE, + CONFIG_SYS_SDRAM_SIZE); + gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE; + gd->bd->bi_dram[0].size = CONFIG_SYS_SDRAM_SIZE; return 0; } diff --git a/include/configs/zynq_common.h b/include/configs/zynq_common.h index b83204045a6..bca41d05671 100644 --- a/include/configs/zynq_common.h +++ b/include/configs/zynq_common.h @@ -27,6 +27,9 @@ #define CONFIG_IPADDR 192.168.0.99 #define CONFIG_SERVERIP 192.168.0.101 +#define CONFIG_SYS_SDRAM_BASE 0 +#define CONFIG_SYS_SDRAM_SIZE PHYS_SDRAM_1_SIZE + /* Serial drivers */ #define CONFIG_BAUDRATE 115200 #define CONFIG_SYS_BAUDRATE_TABLE { 9600, 38400, 115200 }