summaryrefslogtreecommitdiff
path: root/arch/arm/cpu
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2011-09-30 09:54:53 -0700
committerSimon Glass <sjg@chromium.org>2011-10-04 15:11:00 -0700
commitbebb0b274bdea91623e33210f8ac9c4ac6864b9d (patch)
tree52ff3195f0f30dd8d5676d3134cc5038e7ac3a1a /arch/arm/cpu
parente95f0c16e2ea9d05d0e557568c335725e75fde1d (diff)
tegra: Don't use board pointer before it is set up
In board_init_f() the gd->bd pointer is not valid when dram_init() is called. This only avoid dying because DRAM is at zero. The common ARM routine sets up the banks in the same way anyway, so we can just remove this code. BUG=chromium-os:19353 TEST=build and boot on Seaboard Change-Id: I81660e67d265031a73b416beaba64ba5a9cbc99d Reviewed-on: http://gerrit.chromium.org/gerrit/8681 Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/arm/cpu')
-rw-r--r--arch/arm/cpu/armv7/tegra2/board.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/arch/arm/cpu/armv7/tegra2/board.c b/arch/arm/cpu/armv7/tegra2/board.c
index 55fdfe5464..ba50661ce6 100644
--- a/arch/arm/cpu/armv7/tegra2/board.c
+++ b/arch/arm/cpu/armv7/tegra2/board.c
@@ -34,16 +34,8 @@ DECLARE_GLOBAL_DATA_PTR;
int dram_init(void)
{
- unsigned long rs;
-
/* We do not initialise DRAM here. We just query the size */
- gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
- gd->bd->bi_dram[0].size = gd->ram_size = board_query_sdram_size();
-
- /* Now check it dynamically */
- rs = get_ram_size(CONFIG_SYS_SDRAM_BASE, gd->ram_size);
- if (rs)
- gd->bd->bi_dram[0].size = gd->ram_size = rs;
+ gd->ram_size = board_query_sdram_size();
return 0;
}