]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
Ka-Ro: tk71: use get_ram_size() to determine the actual SDRAM size automagically
authorLothar Waßmann <LW@KARO-electronics.de>
Fri, 28 Jul 2017 10:50:19 +0000 (12:50 +0200)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 28 Jul 2017 10:50:19 +0000 (12:50 +0200)
board/karo/tk71/tk71.c
include/configs/tk71.h

index 96410d77d60ae5c195752418f102ced0a5ec2f0f..323b1e6fc3c9e923fcfcac7b69604a7bf7bf7d2a 100644 (file)
@@ -105,6 +105,13 @@ int board_early_init_f(void)
        return 0;
 }
 
+int dram_init(void)
+{
+       gd->ram_size = get_ram_size((void *)CONFIG_SYS_SDRAM_BASE,
+                                   PHYS_SDRAM_1_SIZE);
+       return 0;
+}
+
 int board_init(void)
 {
        /*
index d3965154a95ecf508d33141602f683f6f2b85fa6..88f49e7ddc5641062bda5060f74a9ec63b0c1dfc 100644 (file)
 #define MTDIDS_DEFAULT                 "nand0=orion_nand"
 #define MTDPARTS_DEFAULT               "mtdparts=orion_nand:"CONFIG_MTDPARTS
 
+#define CONFIG_SYS_BOARD_DRAM_INIT
 #define PHYS_SDRAM_1           0x00000000      /* Base address */
 #define PHYS_SDRAM_1_SIZE      0x20000000      /* Max 512 MB RAM */