瀏覽代碼

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>
Simon Glass 13 年之前
父節點
當前提交
7f8c070ff9
共有 1 個文件被更改,包括 1 次插入9 次删除
  1. 1 9
      arch/arm/cpu/armv7/tegra2/board.c

+ 1 - 9
arch/arm/cpu/armv7/tegra2/board.c

@@ -57,16 +57,8 @@ unsigned int query_sdram_size(void)
 
 
 int dram_init(void)
 int dram_init(void)
 {
 {
-	unsigned long rs;
-
 	/* We do not initialise DRAM here. We just query the size */
 	/* 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;
 	return 0;
 }
 }