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,14 +541,17 @@ phys_size_t fsl_ddr_sdram(void) ...@@ -541,14 +541,17 @@ phys_size_t fsl_ddr_sdram(void)
total_memory = fsl_ddr_compute(&info, STEP_GET_SPD, 0); total_memory = fsl_ddr_compute(&info, STEP_GET_SPD, 0);
/* setup 3-way interleaving before enabling DDRC */ /* setup 3-way interleaving before enabling DDRC */
switch (info.memctl_opts[0].memctl_interleaving_mode) { if (info.memctl_opts[0].memctl_interleaving) {
case FSL_DDR_3WAY_1KB_INTERLEAVING: switch (info.memctl_opts[0].memctl_interleaving_mode) {
case FSL_DDR_3WAY_4KB_INTERLEAVING: case FSL_DDR_3WAY_1KB_INTERLEAVING:
case FSL_DDR_3WAY_8KB_INTERLEAVING: case FSL_DDR_3WAY_4KB_INTERLEAVING:
fsl_ddr_set_intl3r(info.memctl_opts[0].memctl_interleaving_mode); case FSL_DDR_3WAY_8KB_INTERLEAVING:
break; fsl_ddr_set_intl3r(
default: info.memctl_opts[0].memctl_interleaving_mode);
break; break;
default:
break;
}
} }
/* Program configuration registers. */ /* Program configuration registers. */
......
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