omap3evm: fix errors caused by multiple definitions
authorSanjeev Premi <premi@ti.com>
Tue, 25 Oct 2011 06:11:33 +0000 (06:11 +0000)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Thu, 3 Nov 2011 21:56:24 +0000 (22:56 +0100)
Fix these errors when building with recently added
omap3_evm_quick_nand_config:

env_nowhere.o: In function `env_relocate_spec':
/home/premi/u-boot/common/env_nowhere.c:40: multiple definition
 of `env_relocate_spec'
env_nand.o:/home/premi/u-boot/common/env_nand.c:416: first defi
ned here
env_nowhere.o: In function `env_get_char_spec':
/home/premi/u-boot/common/env_nowhere.c:44: multiple definition
 of `env_get_char_spec'
env_nand.o:/home/premi/u-boot/common/env_nand.c:77: first defin
ed here
env_nowhere.o: In function `env_init':
/home/premi/u-boot/common/env_nowhere.c:54: multiple definition
 of `env_init'
env_nand.o:/home/premi/u-boot/common/env_nand.c:144: first defi
ned here
env_nowhere.o: In function `env_relocate_spec':
/home/premi/u-boot/common/env_nowhere.c:40: multiple definition
 of `env_ptr'
env_nand.o:/home/premi/u-boot/common/env_nand.c:77: first defin
ed here

Signed-off-by: Sanjeev Premi <premi@ti.com>
Cc: Sandeep Paulraj <s-paulraj@ti.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
include/configs/omap3_evm_common.h

index 93da772c174041931dd38e8789839bd483b541d2..54aa7a78588dc6210d73d5f497509f5ce6ad0b52 100644 (file)
 
 #define CONFIG_NAND_OMAP_GPMC
 #define GPMC_NAND_ECC_LP_x16_LAYOUT
-#define CONFIG_ENV_IS_IN_NAND
 #define CONFIG_ENV_OFFSET              SMNAND_ENV_OFFSET
 #elif defined(CONFIG_CMD_ONENAND)
 #define CONFIG_SYS_FLASH_BASE          PISMO1_ONEN_BASE
 #define CONFIG_SYS_ONENAND_BASE                ONENAND_MAP
+#endif
 
+#if !defined(CONFIG_ENV_IS_NOWHERE)
+#if defined(CONFIG_CMD_NAND)
+#define CONFIG_ENV_IS_IN_NAND
+#elif defined(CONFIG_CMD_ONENAND)
 #define CONFIG_ENV_IS_IN_ONENAND
 #define CONFIG_ENV_OFFSET              ONENAND_ENV_OFFSET
 #endif
+#endif /* CONFIG_ENV_IS_NOWHERE */
 
 #define CONFIG_ENV_ADDR                        CONFIG_ENV_OFFSET