Commit 0a9e4e772123fe3e2bb499d7d2160c4cfd8a3a8d
Committed by
Wolfgang Denk
1 parent
02c9aa1d41
Exists in
master
and in
54 other branches
unify {CONFIG_,}ENV_IS_EMBEDDED
Some boards have fallen out of sync by defining CONFIG_ENV_IS_EMBEDDED manually. While it is useful to have this available to the build system, let's do it automatically rather than forcing people to opt into it. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Albin Tonnerre <albin.tonnerre@free-electrons.com> Signed-off-by: Wolfgang Denk <wd@denx.de>
Showing 14 changed files with 28 additions and 19 deletions Side-by-side Diff
- include/configs/M52277EVB.h
- include/configs/M5235EVB.h
- include/configs/M5272C3.h
- include/configs/M5275EVB.h
- include/configs/M5329EVB.h
- include/configs/M5373EVB.h
- include/configs/M54451EVB.h
- include/configs/M54455EVB.h
- include/configs/M5475EVB.h
- include/configs/M5485EVB.h
- include/configs/OXC.h
- include/configs/cobra5272.h
- include/configs/pcu_e.h
- include/environment.h
include/configs/M52277EVB.h
include/configs/M5235EVB.h
... | ... | @@ -222,7 +222,6 @@ |
222 | 222 | * Environment is embedded in u-boot in the second sector of the flash |
223 | 223 | */ |
224 | 224 | #define CONFIG_ENV_IS_IN_FLASH 1 |
225 | -#define CONFIG_ENV_IS_EMBEDDED 1 | |
226 | 225 | #ifdef NORFLASH_PS32BIT |
227 | 226 | # define CONFIG_ENV_OFFSET (0x8000) |
228 | 227 | # define CONFIG_ENV_SIZE 0x4000 |
include/configs/M5272C3.h
include/configs/M5275EVB.h
include/configs/M5329EVB.h
... | ... | @@ -231,7 +231,6 @@ |
231 | 231 | #define CONFIG_ENV_OFFSET 0x4000 |
232 | 232 | #define CONFIG_ENV_SECT_SIZE 0x2000 |
233 | 233 | #define CONFIG_ENV_IS_IN_FLASH 1 |
234 | -#define CONFIG_ENV_IS_EMBEDDED 1 | |
235 | 234 | |
236 | 235 | /*----------------------------------------------------------------------- |
237 | 236 | * Cache Configuration |
include/configs/M5373EVB.h
... | ... | @@ -231,7 +231,6 @@ |
231 | 231 | #define CONFIG_ENV_OFFSET 0x4000 |
232 | 232 | #define CONFIG_ENV_SECT_SIZE 0x2000 |
233 | 233 | #define CONFIG_ENV_IS_IN_FLASH 1 |
234 | -#define CONFIG_ENV_IS_EMBEDDED 1 | |
235 | 234 | |
236 | 235 | /*----------------------------------------------------------------------- |
237 | 236 | * Cache Configuration |
include/configs/M54451EVB.h
include/configs/M54455EVB.h
include/configs/M5475EVB.h
... | ... | @@ -280,7 +280,6 @@ |
280 | 280 | #define CONFIG_ENV_OFFSET 0x2000 |
281 | 281 | #define CONFIG_ENV_SECT_SIZE 0x2000 |
282 | 282 | #define CONFIG_ENV_IS_IN_FLASH 1 |
283 | -#define CONFIG_ENV_IS_EMBEDDED 1 | |
284 | 283 | |
285 | 284 | /*----------------------------------------------------------------------- |
286 | 285 | * Cache Configuration |
include/configs/M5485EVB.h
... | ... | @@ -266,7 +266,6 @@ |
266 | 266 | #define CONFIG_ENV_OFFSET 0x2000 |
267 | 267 | #define CONFIG_ENV_SECT_SIZE 0x2000 |
268 | 268 | #define CONFIG_ENV_IS_IN_FLASH 1 |
269 | -#define CONFIG_ENV_IS_EMBEDDED 1 | |
270 | 269 | |
271 | 270 | /*----------------------------------------------------------------------- |
272 | 271 | * Cache Configuration |
include/configs/OXC.h
... | ... | @@ -196,7 +196,6 @@ |
196 | 196 | #define CONFIG_ENV_IS_IN_FLASH 1 |
197 | 197 | #define CONFIG_ENV_ADDR 0xFFF30000 /* Offset of Environment Sector */ |
198 | 198 | #define CONFIG_ENV_SIZE 0x00010000 /* Total Size of Environment Sector */ |
199 | -#define CONFIG_ENV_IS_EMBEDDED 1 /* short-cut compile-time test */ | |
200 | 199 | #define CONFIG_ENV_OVERWRITE 1 /* Allow modifying the environment */ |
201 | 200 | |
202 | 201 | /* |
include/configs/cobra5272.h
include/configs/pcu_e.h
... | ... | @@ -231,7 +231,6 @@ |
231 | 231 | #define CONFIG_ENV_SIZE 0x2000 /* Total Size of Environment */ |
232 | 232 | #define CONFIG_ENV_ADDR 0xFFFFE000 /* Address of Environment Sector */ |
233 | 233 | #define CONFIG_ENV_SECT_SIZE 0x2000 /* use the top-most 8k boot sector */ |
234 | -#define CONFIG_ENV_IS_EMBEDDED 1 /* short-cut compile-time test */ | |
235 | 234 | #else |
236 | 235 | /* Final version: environment in EEPROM */ |
237 | 236 | #define CONFIG_ENV_IS_IN_EEPROM 1 |
include/environment.h
... | ... | @@ -67,6 +67,10 @@ |
67 | 67 | # if defined(CONFIG_ENV_ADDR_REDUND) || defined(CONFIG_ENV_OFFSET_REDUND) |
68 | 68 | # define CONFIG_SYS_REDUNDAND_ENVIRONMENT 1 |
69 | 69 | # endif |
70 | +# ifdef CONFIG_ENV_IS_EMBEDDED | |
71 | +# error "do not define CONFIG_ENV_IS_EMBEDDED in your board config" | |
72 | +# error "it is calculated automatically for you" | |
73 | +# endif | |
70 | 74 | #endif /* CONFIG_ENV_IS_IN_FLASH */ |
71 | 75 | |
72 | 76 | #if defined(CONFIG_ENV_IS_IN_NAND) |
... | ... | @@ -79,9 +83,6 @@ |
79 | 83 | # ifdef CONFIG_ENV_OFFSET_REDUND |
80 | 84 | # define CONFIG_SYS_REDUNDAND_ENVIRONMENT |
81 | 85 | # endif |
82 | -# ifdef CONFIG_ENV_IS_EMBEDDED | |
83 | -# define ENV_IS_EMBEDDED 1 | |
84 | -# endif | |
85 | 86 | #endif /* CONFIG_ENV_IS_IN_NAND */ |
86 | 87 | |
87 | 88 | #if defined(CONFIG_ENV_IS_IN_MG_DISK) |
88 | 89 | |
... | ... | @@ -91,10 +92,31 @@ |
91 | 92 | # ifndef CONFIG_ENV_SIZE |
92 | 93 | # error "Need to define CONFIG_ENV_SIZE when using CONFIG_ENV_IS_IN_MG_DISK" |
93 | 94 | # endif |
94 | -# ifdef CONFIG_ENV_IS_EMBEDDED | |
95 | -# error "CONFIG_ENV_IS_EMBEDDED not supported when using CONFIG_ENV_IS_IN_MG_DISK" | |
96 | -# endif | |
97 | 95 | #endif /* CONFIG_ENV_IS_IN_MG_DISK */ |
96 | + | |
97 | +/* Embedded env is only supported for some flash types */ | |
98 | +#ifdef CONFIG_ENV_IS_EMBEDDED | |
99 | +# if !defined(CONFIG_ENV_IS_IN_FLASH) && \ | |
100 | + !defined(CONFIG_ENV_IS_IN_NAND) && \ | |
101 | + !defined(CONFIG_ENV_IS_IN_ONENAND) | |
102 | +# error "CONFIG_ENV_IS_EMBEDDED not supported for your flash type" | |
103 | +# endif | |
104 | +#endif | |
105 | + | |
106 | +/* | |
107 | + * For the flash types where embedded env is supported, but it cannot be | |
108 | + * calculated automatically (i.e. NAND), take the board opt-in. | |
109 | + */ | |
110 | +#if defined(CONFIG_ENV_IS_EMBEDDED) && !defined(ENV_IS_EMBEDDED) | |
111 | +# define ENV_IS_EMBEDDED 1 | |
112 | +#endif | |
113 | + | |
114 | +/* The build system likes to know if the env is embedded */ | |
115 | +#ifdef DO_DEPS_ONLY | |
116 | +# ifdef ENV_IS_EMBEDDED | |
117 | +# define CONFIG_ENV_IS_EMBEDDED | |
118 | +# endif | |
119 | +#endif | |
98 | 120 | |
99 | 121 | #include "compiler.h" |
100 | 122 |