mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-21 06:31:31 +00:00
ARM: mxs: let boards override entire dram parameter table
If many values differ from the defaults, overriding the full table is simpler and more space efficient than tweaking it through mxs_adjust_memory_params(). Signed-off-by: Mans Rullgard <mans@mansr.com>
This commit is contained in:
parent
c5437e5b8a
commit
29b921b86c
1 changed files with 7 additions and 7 deletions
|
@ -15,7 +15,7 @@
|
|||
|
||||
#include "mxs_init.h"
|
||||
|
||||
static uint32_t dram_vals[] = {
|
||||
__weak uint32_t mxs_dram_vals[] = {
|
||||
/*
|
||||
* i.MX28 DDR2 at 200MHz
|
||||
*/
|
||||
|
@ -100,11 +100,11 @@ static void initialize_dram_values(void)
|
|||
int i;
|
||||
|
||||
debug("SPL: Setting mx28 board specific SDRAM parameters\n");
|
||||
mxs_adjust_memory_params(dram_vals);
|
||||
mxs_adjust_memory_params(mxs_dram_vals);
|
||||
|
||||
debug("SPL: Applying SDRAM parameters\n");
|
||||
for (i = 0; i < ARRAY_SIZE(dram_vals); i++)
|
||||
writel(dram_vals[i], MXS_DRAM_BASE + (4 * i));
|
||||
for (i = 0; i < ARRAY_SIZE(mxs_dram_vals); i++)
|
||||
writel(mxs_dram_vals[i], MXS_DRAM_BASE + (4 * i));
|
||||
}
|
||||
#else
|
||||
static void initialize_dram_values(void)
|
||||
|
@ -112,7 +112,7 @@ static void initialize_dram_values(void)
|
|||
int i;
|
||||
|
||||
debug("SPL: Setting mx23 board specific SDRAM parameters\n");
|
||||
mxs_adjust_memory_params(dram_vals);
|
||||
mxs_adjust_memory_params(mxs_dram_vals);
|
||||
|
||||
/*
|
||||
* HW_DRAM_CTL27, HW_DRAM_CTL28 and HW_DRAM_CTL35 are not initialized as
|
||||
|
@ -124,10 +124,10 @@ static void initialize_dram_values(void)
|
|||
* So skip the initialization of these HW_DRAM_CTL registers.
|
||||
*/
|
||||
debug("SPL: Applying SDRAM parameters\n");
|
||||
for (i = 0; i < ARRAY_SIZE(dram_vals); i++) {
|
||||
for (i = 0; i < ARRAY_SIZE(mxs_dram_vals); i++) {
|
||||
if (i == 8 || i == 27 || i == 28 || i == 35)
|
||||
continue;
|
||||
writel(dram_vals[i], MXS_DRAM_BASE + (4 * i));
|
||||
writel(mxs_dram_vals[i], MXS_DRAM_BASE + (4 * i));
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Reference in a new issue