[U-Boot] [PATCH 4/5] OMAP3: fix warnings when NAND/ONENAND is not used
Nishanth Menon
nm at ti.com
Wed Oct 7 04:17:58 CEST 2009
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 at ti.com>
Cc: David B <david-b at pacbell.net>
Cc: Vikram Pandita <vikram.pandita at ti.com>
Cc: Richard Woodruff <r-woodruff2 at ti.com>
Cc: Sandeep Paulraj <s-paulraj at ti.com>
Cc: Tom Rix <tom.rix at windriver.com>
Cc: Dirk Behme <dirk.behme at googlemail.com>
---
cpu/arm_cortexa8/omap3/mem.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/cpu/arm_cortexa8/omap3/mem.c b/cpu/arm_cortexa8/omap3/mem.c
index 8d64478..e93343c 100644
--- a/cpu/arm_cortexa8/omap3/mem.c
+++ b/cpu/arm_cortexa8/omap3/mem.c
@@ -219,12 +219,16 @@ void enable_gpmc_cs_config(const 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 */
--
1.6.0.4
More information about the U-Boot
mailing list