From: Sanjeev Premi Date: Tue, 25 Oct 2011 06:11:33 +0000 (+0000) Subject: omap3evm: fix errors caused by multiple definitions X-Git-Tag: v2011.12-rc1~228^2~45 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=edc633ea7707fef933e4ce6b380c15c16572d607;p=u-boot omap3evm: fix errors caused by multiple definitions 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 Cc: Sandeep Paulraj Signed-off-by: Sandeep Paulraj --- diff --git a/include/configs/omap3_evm_common.h b/include/configs/omap3_evm_common.h index 93da772c17..54aa7a7858 100644 --- a/include/configs/omap3_evm_common.h +++ b/include/configs/omap3_evm_common.h @@ -239,15 +239,20 @@ #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