[U-Boot] [PATCH 2/3] KW: Add kw_adjust_dram() weak function

Marek Vasut marex at denx.de
Tue Jun 26 14:15:13 CEST 2012


This function shall allow a board to adjust DRAM parameters in case
there are multiple versions of the board with different DRAM sizes.

Signed-off-by: Marek Vasut <marex at denx.de>
Cc: Prafulla Wadaskar <prafulla at marvell.com>
Cc: Wolfgang Denk <wd at denx.de>
---
 arch/arm/cpu/arm926ejs/kirkwood/dram.c |   11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/arch/arm/cpu/arm926ejs/kirkwood/dram.c b/arch/arm/cpu/arm926ejs/kirkwood/dram.c
index ccb6b03..cdf0d21 100644
--- a/arch/arm/cpu/arm926ejs/kirkwood/dram.c
+++ b/arch/arm/cpu/arm926ejs/kirkwood/dram.c
@@ -60,6 +60,15 @@ u32 kw_sdram_bs(enum memory_bank bank)
 	return result;
 }
 
+/*
+ * kw_adjust_sdram - allow post init adjustment of DRAM size
+ */
+void __kw_adjust_dram(void)
+{
+}
+
+void kw_adjust_dram(void) __attribute__((weak, alias("__kw_adjust_dram")));
+
 #ifndef CONFIG_SYS_BOARD_DRAM_INIT
 int dram_init(void)
 {
@@ -91,6 +100,8 @@ int dram_init(void)
 		gd->bd->bi_dram[i].size = 0;
 	}
 
+	kw_adjust_dram();
+
 	return 0;
 }
 
-- 
1.7.10



More information about the U-Boot mailing list