Only attempt to configure and add DRAM at chip select 1 if the board has configured more than one bank of DRAM.
This prevents boards that have CONFIG_NR_DRAM_BANKS set to 1 from getting an incorrect DRAM size. Signed-off-by: Grant Erickson <maratho...@gmail.com> Cc: Tom Rini <tr...@ti.com> --- arch/arm/cpu/armv7/omap3/sdrc.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/arch/arm/cpu/armv7/omap3/sdrc.c b/arch/arm/cpu/armv7/omap3/sdrc.c index a27b4b1..4c02214 100644 --- a/arch/arm/cpu/armv7/omap3/sdrc.c +++ b/arch/arm/cpu/armv7/omap3/sdrc.c @@ -213,6 +213,7 @@ int dram_init(void) unsigned int size0 = 0, size1 = 0; size0 = get_sdr_cs_size(CS0); +#if CONFIG_NR_DRAM_BANKS > 1 /* * We always need to have cs_cfg point at where the second * bank would be, if present. Failure to do so can lead to @@ -223,6 +224,7 @@ int dram_init(void) make_cs1_contiguous(); do_sdrc_init(CS1, NOT_EARLY); size1 = get_sdr_cs_size(CS1); +#endif gd->ram_size = size0 + size1; -- 1.7.7.3 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot