summaryrefslogtreecommitdiffstats
path: root/board/freescale/mpc5121ads
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2009-10-04 22:56:08 +0200
committerWolfgang Denk <wd@denx.de>2009-10-08 00:23:12 +0200
commitda01f53404f99db185d196867af79371725d4683 (patch)
tree0cdf0d758bb985df06aa8c9c8adb493c38ee2da5 /board/freescale/mpc5121ads
parentdbcc357166bed20df13450e93a501f30b197efd1 (diff)
downloadblackbird-obmc-uboot-da01f53404f99db185d196867af79371725d4683.tar.gz
blackbird-obmc-uboot-da01f53404f99db185d196867af79371725d4683.zip
mpc512x: fix fixed_sdram() init code.
Commit 054197ba and later fixes used an array to initialize some of the MDDRC parameters; however, the use of an array turned out to be a bad idea as it was not possible to correlate structure entries to array indices in readable and reliable way. Now we use a struct instead, which makes this self-explanatory. Signed-off-by: Wolfgang Denk <wd@denx.de>
Diffstat (limited to 'board/freescale/mpc5121ads')
-rw-r--r--board/freescale/mpc5121ads/mpc5121ads.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/board/freescale/mpc5121ads/mpc5121ads.c b/board/freescale/mpc5121ads/mpc5121ads.c
index 13bd73c81e..2fa3650092 100644
--- a/board/freescale/mpc5121ads/mpc5121ads.c
+++ b/board/freescale/mpc5121ads/mpc5121ads.c
@@ -169,11 +169,11 @@ phys_size_t initdram(int board_type)
* Elpida MDDRC and initialization settings are an alternative
* to the Default Micron ones for all but the earliest Rev 4 boards
*/
- u32 elpida_mddrc_config[4] = {
- CONFIG_SYS_MDDRC_TIME_CFG0,
- CONFIG_SYS_MDDRC_TIME_CFG1_ELPIDA,
- CONFIG_SYS_MDDRC_TIME_CFG2_ELPIDA,
- CONFIG_SYS_MDDRC_SYS_CFG_ELPIDA,
+ ddr512x_config_t elpida_mddrc_config = {
+ .ddr_sys_config = CONFIG_SYS_MDDRC_SYS_CFG_ELPIDA,
+ .ddr_time_config0 = CONFIG_SYS_MDDRC_TIME_CFG0,
+ .ddr_time_config1 = CONFIG_SYS_MDDRC_TIME_CFG1_ELPIDA,
+ .ddr_time_config2 = CONFIG_SYS_MDDRC_TIME_CFG2_ELPIDA,
};
u32 elpida_init_sequence[] = {
@@ -229,7 +229,7 @@ phys_size_t initdram(int board_type)
if (is_micron()) {
msize = fixed_sdram(NULL, NULL, 0);
} else {
- msize = fixed_sdram(elpida_mddrc_config,
+ msize = fixed_sdram(&elpida_mddrc_config,
elpida_init_sequence,
sizeof(elpida_init_sequence)/sizeof(u32));
}
OpenPOWER on IntegriCloud