From: Lokesh Vutla Date: Tue, 18 Apr 2017 11:57:24 +0000 (+0530) Subject: arch: arm: omap: Declare size of ddr very early X-Git-Tag: v2017.07-rc1~346 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=86282798b0d115f6eca6828b4f0b3bfdf4752cc9;p=u-boot arch: arm: omap: Declare size of ddr very early Declare the size of ddr very early in spl, so that this can be used to enable cache. Signed-off-by: Lokesh Vutla Signed-off-by: Ravi Babu --- diff --git a/arch/arm/mach-omap2/am33xx/board.c b/arch/arm/mach-omap2/am33xx/board.c index 2bfc8649d5..568f36f220 100644 --- a/arch/arm/mach-omap2/am33xx/board.c +++ b/arch/arm/mach-omap2/am33xx/board.c @@ -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 diff --git a/arch/arm/mach-omap2/hwinit-common.c b/arch/arm/mach-omap2/hwinit-common.c index f317293988..cac32748ec 100644 --- a/arch/arm/mach-omap2/hwinit-common.c +++ b/arch/arm/mach-omap2/hwinit-common.c @@ -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