diff mbox

[U-Boot,2/2] ARM: highbank: remove DRAM bank setup

Message ID 1359085160-28675-2-git-send-email-robherring2@gmail.com
State Deferred
Delegated to: Albert ARIBAUD
Headers show

Commit Message

Rob Herring Jan. 25, 2013, 3:39 a.m. UTC
From: Rob Herring <rob.herring@calxeda.com>

The memory sizes in highbank dtb's are already correct, so remove the DRAM
bank setup so the memory node is not fixed up by u-boot.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
---
 board/highbank/highbank.c  |    6 ------
 include/configs/highbank.h |    2 +-
 2 files changed, 1 insertion(+), 7 deletions(-)

Comments

Wolfgang Denk Feb. 19, 2013, 7:27 p.m. UTC | #1
Dear Rob Herring,

In message <1359085160-28675-2-git-send-email-robherring2@gmail.com> you wrote:
>
> The memory sizes in highbank dtb's are already correct, so remove the DRAM
> bank setup so the memory node is not fixed up by u-boot.

I think you do more here...

> -void dram_init_banksize(void)
> -{
> -	gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
> -	gd->bd->bi_dram[0].size =  PHYS_SDRAM_1_SIZE;
> -}
...
> -#define CONFIG_NR_DRAM_BANKS		1
> +#define CONFIG_NR_DRAM_BANKS		0

I think this is a very bad idea, as you will now be no longer possible
to get information about memory sizes from U-Boot.  For exmaple,
"bdinfo" will not print any reasonable value any more.

Please don't do that!

Best regards,

Wolfgang Denk
diff mbox

Patch

diff --git a/board/highbank/highbank.c b/board/highbank/highbank.c
index f41bf05..647bd56 100644
--- a/board/highbank/highbank.c
+++ b/board/highbank/highbank.c
@@ -79,12 +79,6 @@  int dram_init(void)
 	return 0;
 }
 
-void dram_init_banksize(void)
-{
-	gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
-	gd->bd->bi_dram[0].size =  PHYS_SDRAM_1_SIZE;
-}
-
 void reset_cpu(ulong addr)
 {
 	writel(HB_PWR_HARD_RESET, HB_SREG_A9_PWR_REQ);
diff --git a/include/configs/highbank.h b/include/configs/highbank.h
index 62cc08c..a0fe2c3 100644
--- a/include/configs/highbank.h
+++ b/include/configs/highbank.h
@@ -97,7 +97,7 @@ 
 /*-----------------------------------------------------------------------
  * Physical Memory Map
  */
-#define CONFIG_NR_DRAM_BANKS		1
+#define CONFIG_NR_DRAM_BANKS		0
 #define PHYS_SDRAM_1_SIZE		(4089 << 20)
 #define CONFIG_SYS_MEMTEST_START	0x100000
 #define CONFIG_SYS_MEMTEST_END		(PHYS_SDRAM_1_SIZE - 0x100000)