diff options
author | Haiying Wang <Haiying.Wang@freescale.com> | 2008-10-03 12:36:39 -0400 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2008-10-18 21:54:04 +0200 |
commit | dbbbb3abeff325855cae76e33d69d5665631443f (patch) | |
tree | 2df59a7ac7364e4c501e228c74db3cd5f14ad3b1 /cpu/mpc8xxx/ddr/main.c | |
parent | 1c9aa76bf9013069e24258f46f4687c9f98a02d6 (diff) | |
download | u-boot-imx-dbbbb3abeff325855cae76e33d69d5665631443f.zip u-boot-imx-dbbbb3abeff325855cae76e33d69d5665631443f.tar.gz u-boot-imx-dbbbb3abeff325855cae76e33d69d5665631443f.tar.bz2 |
Make DDR interleaving mode work correctly
Fix some bugs:
1. Correctly set intlv_ctl in cs_config.
2. Correctly set sa, ea in cs_bnds when bank interleaving mode is enabled.
3. Set base_address and total memory for each ddr controller in memory
controller interleaving mode.
Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com>
Diffstat (limited to 'cpu/mpc8xxx/ddr/main.c')
-rw-r--r-- | cpu/mpc8xxx/ddr/main.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cpu/mpc8xxx/ddr/main.c b/cpu/mpc8xxx/ddr/main.c index c340d56..d26c5c5 100644 --- a/cpu/mpc8xxx/ddr/main.c +++ b/cpu/mpc8xxx/ddr/main.c @@ -179,6 +179,7 @@ int step_assign_addresses(fsl_ddr_info_t *pinfo, if (*memctl_interleaving) { phys_addr_t addr; + phys_size_t total_mem_per_ctlr = 0; /* * If interleaving between memory controllers, @@ -197,14 +198,18 @@ int step_assign_addresses(fsl_ddr_info_t *pinfo, for (i = 0; i < CONFIG_NUM_DDR_CONTROLLERS; i++) { addr = 0; + pinfo->common_timing_params[i].base_address = + (phys_addr_t)addr; for (j = 0; j < CONFIG_DIMM_SLOTS_PER_CTLR; j++) { unsigned long long cap = pinfo->dimm_params[i][j].capacity; pinfo->dimm_params[i][j].base_address = addr; addr += (phys_addr_t)(cap >> dbw_cap_adj[i]); + total_mem_per_ctlr += cap >> dbw_cap_adj[i]; } } + pinfo->common_timing_params[0].total_mem = total_mem_per_ctlr; } else { /* * Simple linear assignment if memory |