[U-Boot] [PATCH 2/2] km_arm: enable SDRAM window size fixup
Gerlando Falauto
gerlando.falauto at keymile.com
Thu Jul 5 16:28:12 CEST 2012
Size of the SDRAM chips might differ between any two (otherwise
identical) instances of the same board.
So change board_early_init_f() to use km_sdram_bs_set(), in order to
fixup the window size register at runtime, according to the detected
SDRAM size.
Signed-off-by: Gerlando Falauto <gerlando.falauto at keymile.com>
Cc: Valentin Longchamp <valentin.longchamp at keymile.com>
Cc: Holger Brunck <holger.brunck at keymile.com>
---
board/keymile/km_arm/km_arm.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/board/keymile/km_arm/km_arm.c b/board/keymile/km_arm/km_arm.c
index cb3402b..d531c08 100644
--- a/board/keymile/km_arm/km_arm.c
+++ b/board/keymile/km_arm/km_arm.c
@@ -241,10 +241,22 @@ int misc_init_r(void)
return 0;
}
+static void dram_size_fixup(void)
+{
+ u32 size;
+
+ /* probe currently equipped RAM size */
+ size = get_ram_size((void *)kw_sdram_bar(0), kw_sdram_bs(0));
+
+ /* fixup SDRAM window size accordingly */
+ kw_sdram_bs_set(0, size);
+}
+
int board_early_init_f(void)
{
u32 tmp;
+ dram_size_fixup();
kirkwood_mpp_conf(kwmpp_config, NULL);
/*
--
1.7.1
More information about the U-Boot
mailing list