From a077ac13d03c8cde646ddab30b03ec0f8b753e1e Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Wed, 2 Aug 2023 11:09:43 -0400 Subject: Kconfigs: Correct default of "0" on hex type entries It is not a parse error to have a default value of "0" for a "hex" type entry, instead of "0x0". However, "0" and "0x0" are not treated the same even by the tools themselves. Correct this by changing the default value from "0" to "0x0" for all hex type questions that had the incorrect default. Fix one instance (in two configs) of a default of "0" being used on a hex question to be "0x0". Remove the cases where a defconfig had set a value of "0x0" to be used as the default had been "0". Signed-off-by: Tom Rini Reviewed-by: Simon Glass --- env/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'env') diff --git a/env/Kconfig b/env/Kconfig index 13e32104b4c..54203faa89e 100644 --- a/env/Kconfig +++ b/env/Kconfig @@ -571,7 +571,7 @@ config ENV_OFFSET default 0xE0000 if ARCH_ZYNQ default 0x1E00000 if ARCH_ZYNQMP default 0x7F40000 if ARCH_VERSAL || ARCH_VERSAL_NET - default 0 if ARC + default 0x0 if ARC default 0x140000 if ARCH_AT91 default 0x260000 if ARCH_OMAP2PLUS default 0x1080000 if MICROBLAZE && ENV_IS_IN_SPI_FLASH @@ -583,7 +583,7 @@ config ENV_OFFSET_REDUND depends on (ENV_IS_IN_EEPROM || ENV_IS_IN_MMC || ENV_IS_IN_NAND || \ ENV_IS_IN_SPI_FLASH) && SYS_REDUNDAND_ENVIRONMENT default 0x10C0000 if MICROBLAZE - default 0 + default 0x0 help Offset from the start of the device (or partition) of the redundant environment location. -- cgit v1.2.3 From a28cc807fa3abbd3602982c88f1c419c80a7e8b8 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Wed, 6 Sep 2023 23:29:53 +0200 Subject: cmd: nvedit: Remove unused NEEDS_MANUAL_RELOC code bits The last user of the NEEDS_MANUAL_RELOC has been removed in commit 26af162ac8f8 ("arch: m68k: Implement relocation") Remove now unused NEEDS_MANUAL_RELOC code. Signed-off-by: Marek Vasut --- env/common.c | 1 - 1 file changed, 1 deletion(-) (limited to 'env') diff --git a/env/common.c b/env/common.c index 0ecdb248a08..4cf2dadc694 100644 --- a/env/common.c +++ b/env/common.c @@ -429,7 +429,6 @@ int env_export(env_t *env_out) void env_relocate(void) { #if defined(CONFIG_NEEDS_MANUAL_RELOC) - env_reloc(); env_fix_drivers(); env_htab.change_ok += gd->reloc_off; #endif -- cgit v1.2.3 From decbc8184430b1a7ede088d438868563ce783165 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Wed, 6 Sep 2023 23:29:57 +0200 Subject: env: Remove unused NEEDS_MANUAL_RELOC code bits The last user of the NEEDS_MANUAL_RELOC has been removed in commit 26af162ac8f8 ("arch: m68k: Implement relocation") Remove now unused NEEDS_MANUAL_RELOC code. Signed-off-by: Marek Vasut --- env/callback.c | 12 ------------ env/common.c | 4 ---- env/env.c | 23 ----------------------- 3 files changed, 39 deletions(-) (limited to 'env') diff --git a/env/callback.c b/env/callback.c index 638a02b28f7..98ddba035ea 100644 --- a/env/callback.c +++ b/env/callback.c @@ -9,10 +9,6 @@ #include #include -#if defined(CONFIG_NEEDS_MANUAL_RELOC) -DECLARE_GLOBAL_DATA_PTR; -#endif - /* * Look up a callback function pointer by name */ @@ -71,11 +67,7 @@ void env_callback_init(struct env_entry *var_entry) if (!ret && strlen(callback_name)) { clbkp = find_env_callback(callback_name); if (clbkp != NULL) -#if defined(CONFIG_NEEDS_MANUAL_RELOC) - var_entry->callback = clbkp->callback + gd->reloc_off; -#else var_entry->callback = clbkp->callback; -#endif } } @@ -112,11 +104,7 @@ static int set_callback(const char *name, const char *value, void *priv) /* assign the requested callback */ clbkp = find_env_callback(value); if (clbkp != NULL) -#if defined(CONFIG_NEEDS_MANUAL_RELOC) - ep->callback = clbkp->callback + gd->reloc_off; -#else ep->callback = clbkp->callback; -#endif } } diff --git a/env/common.c b/env/common.c index 4cf2dadc694..21045a7eb33 100644 --- a/env/common.c +++ b/env/common.c @@ -428,10 +428,6 @@ int env_export(env_t *env_out) void env_relocate(void) { -#if defined(CONFIG_NEEDS_MANUAL_RELOC) - env_fix_drivers(); - env_htab.change_ok += gd->reloc_off; -#endif if (gd->env_valid == ENV_INVALID) { #if defined(CONFIG_ENV_IS_NOWHERE) || defined(CONFIG_SPL_BUILD) /* Environment not changable */ diff --git a/env/env.c b/env/env.c index 2aa52c98f8f..bae3f6482ae 100644 --- a/env/env.c +++ b/env/env.c @@ -14,29 +14,6 @@ DECLARE_GLOBAL_DATA_PTR; -#if defined(CONFIG_NEEDS_MANUAL_RELOC) -void env_fix_drivers(void) -{ - struct env_driver *drv; - const int n_ents = ll_entry_count(struct env_driver, env_driver); - struct env_driver *entry; - - drv = ll_entry_start(struct env_driver, env_driver); - for (entry = drv; entry != drv + n_ents; entry++) { - if (entry->name) - entry->name += gd->reloc_off; - if (entry->load) - entry->load += gd->reloc_off; - if (entry->save) - entry->save += gd->reloc_off; - if (entry->erase) - entry->erase += gd->reloc_off; - if (entry->init) - entry->init += gd->reloc_off; - } -} -#endif - static struct env_driver *_env_driver_lookup(enum env_location loc) { struct env_driver *drv; -- cgit v1.2.3 From 1e94b46f73cedcebbff73799203f3266c5b28d90 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 14 Sep 2023 18:21:46 -0600 Subject: common: Drop linux/printk.h from common header This old patch was marked as deferred. Bring it back to life, to continue towards the removal of common.h Move this out of the common header and include it only where needed. Signed-off-by: Simon Glass --- env/common.c | 1 + 1 file changed, 1 insertion(+) (limited to 'env') diff --git a/env/common.c b/env/common.c index 21045a7eb33..eb1a9137953 100644 --- a/env/common.c +++ b/env/common.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include -- cgit v1.2.3