diff options
author | Simon Glass <sjg@chromium.org> | 2011-11-05 03:56:57 +0000 |
---|---|---|
committer | Albert ARIBAUD <albert.u.boot@aribaud.net> | 2011-12-09 17:30:09 +0100 |
commit | 7f8c070ff99aadf153cd90cd0ec1987e8c2ebbe1 (patch) | |
tree | 86fa147b274f3957f94e0db04e8c48f7e9313c73 /arch/arm/cpu | |
parent | e81cdc03505737914dfcf99b9f47292e7174c7bf (diff) | |
download | u-boot-imx-7f8c070ff99aadf153cd90cd0ec1987e8c2ebbe1.zip u-boot-imx-7f8c070ff99aadf153cd90cd0ec1987e8c2ebbe1.tar.gz u-boot-imx-7f8c070ff99aadf153cd90cd0ec1987e8c2ebbe1.tar.bz2 |
tegra2: 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 avoids dying because DRAM is at zero on Tegra2. The common ARM
routine sets up the banks in the same way anyway, so we can just remove this
code.
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
Diffstat (limited to 'arch/arm/cpu')
-rw-r--r-- | arch/arm/cpu/armv7/tegra2/board.c | 10 |
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 fbf189a..59dce8f 100644 --- a/arch/arm/cpu/armv7/tegra2/board.c +++ b/arch/arm/cpu/armv7/tegra2/board.c @@ -57,16 +57,8 @@ unsigned int query_sdram_size(void) 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 = 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 = query_sdram_size(); return 0; } |