Patchwork [U-Boot] powerpc/ddr: fix fsl_ddr_get_dimm_params compile error

login
register
mail settings
Submitter shaohui xie
Date June 29, 2012, 9:36 a.m.
Message ID <1340962598-7849-1-git-send-email-Shaohui.Xie@freescale.com>
Download mbox | patch
Permalink /patch/168027/
State Accepted
Commit 98de369b1ca49a3c6d1b6408e78d05cbf2f3ea5d
Delegated to: Andy Fleming
Headers show

Comments

shaohui xie - June 29, 2012, 9:36 a.m.
fsl_ddr_get_dimm_params() should be wrapped by
CONFIG_SYS_DDR_RAW_TIMING, otherwise, when using fixed_sdram() instead of
using SPD, it will cause compile error.

Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
Acked-by: York Sun <yorksun@freescale.com>
---
 arch/powerpc/cpu/mpc8xxx/ddr/main.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Andy Fleming - Aug. 9, 2012, 12:31 a.m.
Please copy me on 85xx patches

On Fri, Jun 29, 2012 at 4:36 AM, Shaohui Xie <Shaohui.Xie@freescale.com> wrote:
> fsl_ddr_get_dimm_params() should be wrapped by
> CONFIG_SYS_DDR_RAW_TIMING, otherwise, when using fixed_sdram() instead of
> using SPD, it will cause compile error.
>
> Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
> Acked-by: York Sun <yorksun@freescale.com>

Applied, thanks

Patch

diff --git a/arch/powerpc/cpu/mpc8xxx/ddr/main.c b/arch/powerpc/cpu/mpc8xxx/ddr/main.c
index f52ad9f..c2a03e3 100644
--- a/arch/powerpc/cpu/mpc8xxx/ddr/main.c
+++ b/arch/powerpc/cpu/mpc8xxx/ddr/main.c
@@ -366,7 +366,7 @@  fsl_ddr_compute(fsl_ddr_info_t *pinfo, unsigned int start_step,
 			}
 		}
 
-#else
+#elif defined(CONFIG_SYS_DDR_RAW_TIMING)
 	case STEP_COMPUTE_DIMM_PARMS:
 		for (i = 0; i < CONFIG_NUM_DDR_CONTROLLERS; i++) {
 			for (j = 0; j < CONFIG_DIMM_SLOTS_PER_CTLR; j++) {