From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lukasz Majewski Date: Tue, 18 Apr 2017 15:33:12 +0200 Subject: [U-Boot] [PATCH 2/5] arch: arm: omap: Declare size of ddr very early In-Reply-To: <1492516647-26840-3-git-send-email-ravibabu@ti.com> References: <1492516647-26840-1-git-send-email-ravibabu@ti.com> <1492516647-26840-3-git-send-email-ravibabu@ti.com> Message-ID: <20170418153312.0383b955@jawa> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Ravi, > From: Lokesh Vutla > > 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 > --- > arch/arm/mach-omap2/am33xx/board.c | 4 ++++ > arch/arm/mach-omap2/hwinit-common.c | 1 + > 2 files changed, 5 insertions(+) > > diff --git a/arch/arm/mach-omap2/am33xx/board.c > b/arch/arm/mach-omap2/am33xx/board.c index 2bfc864..568f36f 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); The above call is a bit strange, since the sdram_init() function sets the DDR (EMIF) controller to use the whole SDRAM available. Why one cannot take this info directly from EMIF controller? > } > #endif > > diff --git a/arch/arm/mach-omap2/hwinit-common.c > b/arch/arm/mach-omap2/hwinit-common.c index f317293..cac3274 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 > Best regards, Lukasz Majewski -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de