]> git.sur5r.net Git - u-boot/commitdiff
arch: arm: omap: Declare size of ddr very early
authorLokesh Vutla <lokeshvutla@ti.com>
Tue, 18 Apr 2017 11:57:24 +0000 (17:27 +0530)
committerTom Rini <trini@konsulko.com>
Fri, 12 May 2017 02:03:41 +0000 (22:03 -0400)
Declare the size of ddr very early in spl, so that this can be
used to enable cache.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Ravi Babu <ravibabu@ti.com>
arch/arm/mach-omap2/am33xx/board.c
arch/arm/mach-omap2/hwinit-common.c

index 2bfc8649d5de97d37659ee4617460a5afe232cfb..568f36f220f8e632397120c3bd9879d2c35ed2e6 100644 (file)
@@ -327,6 +327,10 @@ void board_init_f(ulong dummy)
        early_system_init();
        board_early_init_f();
        sdram_init();
+       /* dram_init must store complete ramsize in gd->ram_size */
+       gd->ram_size = get_ram_size(
+                       (void *)CONFIG_SYS_SDRAM_BASE,
+                       CONFIG_MAX_RAM_BANK_SIZE);
 }
 #endif
 
index f3172939889296dec5c5ec797058505c60372ed1..cac32748ec10c2ad05fcb51f801efd96f397c99b 100644 (file)
@@ -171,6 +171,7 @@ void board_init_f(ulong dummy)
 #endif
        /* For regular u-boot sdram_init() is called from dram_init() */
        sdram_init();
+       gd->ram_size = omap_sdram_size();
 }
 #endif