]> git.sur5r.net Git - u-boot/commitdiff
mx28evk: Fix warning when CONFIG_ENV_IS_IN_SPI_FLASH is selected
authorFabio Estevam <fabio.estevam@freescale.com>
Tue, 10 Jun 2014 03:03:57 +0000 (00:03 -0300)
committerStefano Babic <sbabic@denx.de>
Tue, 17 Jun 2014 14:39:09 +0000 (16:39 +0200)
When building a target with CONFIG_ENV_IS_IN_SPI_FLASH the following
warning is seen:

include/configs/mx28evk.h:73:0: warning: "CONFIG_ENV_SIZE" redefined [enabled by default]

Protect the definition of CONFIG_ENV_SIZE to avoid the warning.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
include/configs/mx28evk.h

index 9b9124ac14101d8835a0e42013b400b0f244bd8e..9daa0bf540060ecdbde69496015a8a18a0949659 100644 (file)
 #define CONFIG_SYS_SDRAM_BASE          PHYS_SDRAM_1
 
 /* Environment */
+#ifndef CONFIG_ENV_IS_IN_SPI_FLASH
 #define CONFIG_ENV_SIZE                        (16 * 1024)
+#else
+#define CONFIG_ENV_SIZE                        (4 * 1024)
+#endif
 #define CONFIG_ENV_OVERWRITE
 
 /* Environment is in MMC */
@@ -70,7 +74,6 @@
 /* Environemnt is in SPI flash */
 #if defined(CONFIG_CMD_SF) && defined(CONFIG_ENV_IS_IN_SPI_FLASH)
 #define CONFIG_SYS_REDUNDAND_ENVIRONMENT
-#define CONFIG_ENV_SIZE                        0x1000          /* 4KB */
 #define CONFIG_ENV_OFFSET              0x40000         /* 256K */
 #define CONFIG_ENV_OFFSET_REDUND       (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
 #define CONFIG_ENV_SECT_SIZE           0x1000