From 65cc0e2a65d2c9f107b2f42db6396d9ade6c5ad8 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Wed, 16 Nov 2022 13:10:41 -0500 Subject: global: Move remaining CONFIG_SYS_* to CFG_SYS_* The rest of the unmigrated CONFIG symbols in the CONFIG_SYS namespace do not easily transition to Kconfig. In many cases they likely should come from the device tree instead. Move these out of CONFIG namespace and in to CFG namespace. Signed-off-by: Tom Rini Reviewed-by: Simon Glass --- tools/envcrc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tools/envcrc.c') diff --git a/tools/envcrc.c b/tools/envcrc.c index bce77902476..a021c785aee 100644 --- a/tools/envcrc.c +++ b/tools/envcrc.c @@ -23,13 +23,13 @@ #if defined(CONFIG_ENV_IS_IN_FLASH) # ifndef CONFIG_ENV_ADDR -# define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + CONFIG_ENV_OFFSET) +# define CONFIG_ENV_ADDR (CFG_SYS_FLASH_BASE + CONFIG_ENV_OFFSET) # endif # ifndef CONFIG_ENV_OFFSET -# define CONFIG_ENV_OFFSET (CONFIG_ENV_ADDR - CONFIG_SYS_FLASH_BASE) +# define CONFIG_ENV_OFFSET (CONFIG_ENV_ADDR - CFG_SYS_FLASH_BASE) # endif # if !defined(CONFIG_ENV_ADDR_REDUND) && defined(CONFIG_ENV_OFFSET_REDUND) -# define CONFIG_ENV_ADDR_REDUND (CONFIG_SYS_FLASH_BASE + CONFIG_ENV_OFFSET_REDUND) +# define CONFIG_ENV_ADDR_REDUND (CFG_SYS_FLASH_BASE + CONFIG_ENV_OFFSET_REDUND) # endif # ifndef CONFIG_ENV_SIZE # define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE -- cgit v1.2.3 From 6bd2372094ab4827547ec0d3e5a258b72810cafd Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Fri, 2 Dec 2022 16:42:17 -0500 Subject: env: Rework ENV_IS_EMBEDDED and related logic slightly - Drop CONFIG_BUILD_ENVCRC as this is never set directly but instead means ENV_IS_EMBEDDED, so reference that in code and rename the Makefile usage to BUILD_ENVCRC. - Remove extra-$(CONFIG_ENV_IS_EMBEDDED) line as it could never be true, and likely why there is an extra- line for CONFIG_ENV_IS_IN_FLASH (the only use case today of embedded environments). - With these slight changes we can then see that using the calculated symbol of ENV_IS_EMBEDDED is the right thing to use in any code which needs to know this situation and can remove CONFIG_ENV_IS_EMBEDDED entirely. Signed-off-by: Tom Rini --- tools/envcrc.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'tools/envcrc.c') diff --git a/tools/envcrc.c b/tools/envcrc.c index a021c785aee..550f31038bd 100644 --- a/tools/envcrc.c +++ b/tools/envcrc.c @@ -40,10 +40,6 @@ # endif #endif /* CONFIG_ENV_IS_IN_FLASH */ -#if defined(ENV_IS_EMBEDDED) && !defined(CONFIG_BUILD_ENVCRC) -# define CONFIG_BUILD_ENVCRC -#endif - #ifdef CONFIG_SYS_REDUNDAND_ENVIRONMENT # define ENV_HEADER_SIZE (sizeof(uint32_t) + 1) #else @@ -53,17 +49,17 @@ #define ENV_SIZE (CONFIG_ENV_SIZE - ENV_HEADER_SIZE) -#ifdef CONFIG_BUILD_ENVCRC +#ifdef ENV_IS_EMBEDDED # include extern unsigned int env_size; extern env_t embedded_environment; -#endif /* CONFIG_BUILD_ENVCRC */ +#endif /* ENV_IS_EMBEDDED */ extern uint32_t crc32(uint32_t, const unsigned char *, unsigned int); int main (int argc, char **argv) { -#ifdef CONFIG_BUILD_ENVCRC +#ifdef ENV_IS_EMBEDDED unsigned char pad = 0x00; uint32_t crc; unsigned char *envptr = (unsigned char *)&embedded_environment, -- cgit v1.2.3