summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNishanth Menon <nm@ti.com>2009-10-13 12:47:39 -0400
committerTom Rix <Tom.Rix@windriver.com>2009-10-18 16:52:54 -0500
commit4e0539d2696992a5e32643a0c831e870cfe9a036 (patch)
treed6b2c468e47f4941c5a3b8ac6b2a3ba0fdadf3e7
parent73db0c71da365a2d101878ae3aeb8ff3545a1828 (diff)
downloadu-boot-4e0539d2696992a5e32643a0c831e870cfe9a036.tar.gz
u-boot-4e0539d2696992a5e32643a0c831e870cfe9a036.tar.xz
u-boot-4e0539d2696992a5e32643a0c831e870cfe9a036.zip
OMAP3: fix warnings when NAND/ONENAND is not used
Fix build warnings by putting specific used variables under required #ifdefs for removing: mem.c:227: warning: unused variable 'f_sec' mem.c:226: warning: unused variable 'f_off' mem.c:225: warning: unused variable 'size' mem.c:224: warning: unused variable 'base' mem.c:222: warning: unused variable 'gpmc_config' Signed-off-by: Nishanth Menon <nm@ti.com>
-rw-r--r--cpu/arm_cortexa8/omap3/mem.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/cpu/arm_cortexa8/omap3/mem.c b/cpu/arm_cortexa8/omap3/mem.c
index b4dec39881..5b41ccbae5 100644
--- a/cpu/arm_cortexa8/omap3/mem.c
+++ b/cpu/arm_cortexa8/omap3/mem.c
@@ -218,12 +218,16 @@ void enable_gpmc_cs_config(u32 *gpmc_config, struct gpmc_cs *cs, u32 base,
void gpmc_init(void)
{
/* putting a blanket check on GPMC based on ZeBu for now */
- u32 *gpmc_config = NULL;
gpmc_cfg = (struct gpmc *)GPMC_BASE;
+#if defined(CONFIG_CMD_NAND) || defined(CONFIG_CMD_ONENAND)
+ u32 *gpmc_config = NULL;
u32 base = 0;
u32 size = 0;
+#if defined(CONFIG_ENV_IS_IN_NAND) || defined(CONFIG_ENV_IS_IN_ONENAND)
u32 f_off = CONFIG_SYS_MONITOR_LEN;
u32 f_sec = 0;
+#endif
+#endif
u32 config = 0;
/* global settings */