Commit 0a7c5353 authored by York Sun's avatar York Sun Committed by Andy Fleming
Browse files

powerpc/mpc8xxx: Fix DDR 3-way interleaving



Should check if interleaving is enabled before using interleaving mode.

Signed-off-by: default avatarYork Sun <yorksun@freescale.com>
Signed-off-by: default avatarAndy Fleming <afleming@freescale.com>
parent 054dfd9b
......@@ -541,15 +541,18 @@ phys_size_t fsl_ddr_sdram(void)
total_memory = fsl_ddr_compute(&info, STEP_GET_SPD, 0);
/* setup 3-way interleaving before enabling DDRC */
if (info.memctl_opts[0].memctl_interleaving) {
switch (info.memctl_opts[0].memctl_interleaving_mode) {
case FSL_DDR_3WAY_1KB_INTERLEAVING:
case FSL_DDR_3WAY_4KB_INTERLEAVING:
case FSL_DDR_3WAY_8KB_INTERLEAVING:
fsl_ddr_set_intl3r(info.memctl_opts[0].memctl_interleaving_mode);
fsl_ddr_set_intl3r(
info.memctl_opts[0].memctl_interleaving_mode);
break;
default:
break;
}
}
/* Program configuration registers. */
for (i = 0; i < CONFIG_NUM_DDR_CONTROLLERS; i++) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment