summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorShaohui Xie <Shaohui.Xie@nxp.com>2016-09-07 17:56:06 +0800
committerYork Sun <york.sun@nxp.com>2016-09-14 14:09:22 -0700
commit2f0dcf2dfaca94b7a178b80ef43926f90ff1054c (patch)
tree9d815ec4ab6de68d18080f0517a5aa98ce87144e /drivers
parentb9e745bbe2562fda710d668dc9cef46e0b23049f (diff)
downloadu-boot-imx-2f0dcf2dfaca94b7a178b80ef43926f90ff1054c.zip
u-boot-imx-2f0dcf2dfaca94b7a178b80ef43926f90ff1054c.tar.gz
u-boot-imx-2f0dcf2dfaca94b7a178b80ef43926f90ff1054c.tar.bz2
ddr: fsl: fix a compile issue
When CONFIG_SYS_FSL_ERRATUM_A009801 is defined but CONFIG_SYS_FSL_ERRATUM_A008511 not defined, there is compile error that temp32 undeclared, this patch fixes it. Signed-off-by: Shaohui Xie <Shaohui.Xie@nxp.com> Signed-off-by: Gong Qianyu <Qianyu.Gong@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ddr/fsl/fsl_ddr_gen4.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/ddr/fsl/fsl_ddr_gen4.c b/drivers/ddr/fsl/fsl_ddr_gen4.c
index aaf7c02..042af09 100644
--- a/drivers/ddr/fsl/fsl_ddr_gen4.c
+++ b/drivers/ddr/fsl/fsl_ddr_gen4.c
@@ -50,8 +50,13 @@ void fsl_ddr_set_memctl_regs(const fsl_ddr_cfg_regs_t *regs,
u32 temp_sdram_cfg;
u32 total_gb_size_per_controller;
int timeout;
+#if defined(CONFIG_SYS_FSL_ERRATUM_A008511) || \
+ defined(CONFIG_SYS_FSL_ERRATUM_A009801)
+ u32 temp32;
+#endif
+
#ifdef CONFIG_SYS_FSL_ERRATUM_A008511
- u32 temp32, mr6;
+ u32 mr6;
u32 vref_seq1[3] = {0x80, 0x96, 0x16}; /* for range 1 */
u32 vref_seq2[3] = {0xc0, 0xf0, 0x70}; /* for range 2 */
u32 *vref_seq = vref_seq1;