public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] i.MX28: Add function to adjust memory parameters
@ 2012-05-30  5:43 Marek Vasut
  2012-05-31 18:04 ` Fabio Estevam
  2012-06-19  7:29 ` Stefano Babic
  0 siblings, 2 replies; 11+ messages in thread
From: Marek Vasut @ 2012-05-30  5:43 UTC (permalink / raw)
  To: u-boot

This function can be overridden at run-time and allows implementors
of new boards based on the i.MX28 chip to fine-tune the memory params.
It is possible to write into the dram_vals array because when the SPL
runs, it is located SRAM. Therefore the location is writable. There is
no possibility of these data to be read-only.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Detlev Zundel <dzu@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Fabio Estevam <festevam@gmail.com>
---
 arch/arm/cpu/arm926ejs/mx28/spl_mem_init.c |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/arm/cpu/arm926ejs/mx28/spl_mem_init.c b/arch/arm/cpu/arm926ejs/mx28/spl_mem_init.c
index 9fa5d29..e17a4d7 100644
--- a/arch/arm/cpu/arm926ejs/mx28/spl_mem_init.c
+++ b/arch/arm/cpu/arm926ejs/mx28/spl_mem_init.c
@@ -82,10 +82,18 @@ uint32_t dram_vals[] = {
 	0x00000000, 0x00010001
 };
 
+void __mx28_adjust_memory_params(uint32_t *dram_vals)
+{
+}
+void mx28_adjust_memory_params(uint32_t *dram_vals)
+	__attribute__((weak, alias("__mx28_adjust_memory_params")));
+
 void init_m28_200mhz_ddr2(void)
 {
 	int i;
 
+	mx28_adjust_memory_params(dram_vals);
+
 	for (i = 0; i < ARRAY_SIZE(dram_vals); i++)
 		writel(dram_vals[i], MXS_DRAM_BASE + (4 * i));
 }
-- 
1.7.10

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2012-06-19  7:29 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-30  5:43 [U-Boot] [PATCH] i.MX28: Add function to adjust memory parameters Marek Vasut
2012-05-31 18:04 ` Fabio Estevam
2012-05-31 18:45   ` Marek Vasut
2012-06-18 14:17     ` Fabio Estevam
2012-06-18 14:23       ` Marek Vasut
2012-06-18 15:16         ` Stefano Babic
2012-06-18 15:36           ` Marek Vasut
2012-06-18 15:43             ` Marek Vasut
2012-06-18 16:32               ` Stefano Babic
2012-06-18 17:10                 ` Marek Vasut
2012-06-19  7:29 ` Stefano Babic

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox