All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lokesh Vutla <lokeshvutla@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC PATCH 1/3] arch: arm: omap: Declare size of ddr very early
Date: Mon, 28 Nov 2016 15:04:43 +0530	[thread overview]
Message-ID: <20161128093445.15300-2-lokeshvutla@ti.com> (raw)
In-Reply-To: <20161128093445.15300-1-lokeshvutla@ti.com>

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>
---
 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 5ebeac0..7f445ae 100644
--- a/arch/arm/mach-omap2/am33xx/board.c
+++ b/arch/arm/mach-omap2/am33xx/board.c
@@ -303,6 +303,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 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
 
-- 
2.10.1

  reply	other threads:[~2016-11-28  9:34 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-28  9:34 [U-Boot] [RFC PATCH 0/3] spl: Add D-cache support Lokesh Vutla
2016-11-28  9:34 ` Lokesh Vutla [this message]
2016-11-28 16:56   ` [U-Boot] [RFC PATCH 1/3] arch: arm: omap: Declare size of ddr very early Tom Rini
2016-11-28  9:34 ` [U-Boot] [RFC PATCH 2/3] spl: reorder the assignment of board info to global data Lokesh Vutla
2016-11-28 16:57   ` Tom Rini
2016-11-30  0:34   ` Simon Glass
2016-11-28  9:34 ` [U-Boot] [RFC PATCH 3/3] spl: Add support for enabling dcache Lokesh Vutla
2016-11-28 16:57   ` Tom Rini
2016-11-30  0:34   ` Simon Glass
2016-11-28 16:40 ` [U-Boot] [RFC PATCH 0/3] spl: Add D-cache support Tom Rini
2016-11-29  5:41   ` Lokesh Vutla
2016-12-12  9:52 ` Lokesh Vutla
2016-12-12 14:32   ` Tom Rini
2016-12-13 12:14   ` Tom Rini
2016-12-13 15:18     ` Lokesh Vutla
2016-12-13 15:26       ` Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161128093445.15300-2-lokeshvutla@ti.com \
    --to=lokeshvutla@ti.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.