]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
zynq: common: Use CONFIG_SYS_SDRAM_BASE/SIZE for ram
authorMichal Simek <monstr@monstr.eu>
Tue, 25 Sep 2012 08:41:41 +0000 (10:41 +0200)
committerMichal Simek <monstr@monstr.eu>
Fri, 5 Oct 2012 13:07:14 +0000 (15:07 +0200)
Synchronization with PetaLinux.

Signed-off-by: Michal Simek <monstr@monstr.eu>
board/xilinx/zynq_common/board.c
include/configs/zynq_common.h

index 90ce16b07f45065b7a74fda0240d829184a4cc48..54a109a8e7549b1ba9dd0eafb8f0712b13439abd 100644 (file)
@@ -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;
 }
index b83204045a63fbc5ef81e9fea641e8e9fa84f02b..bca41d0567156cc3e746f491cd8c05a804e1626b 100644 (file)
@@ -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 }