Message ID | 20180201172059.26531-1-abrodkin@synopsys.com |
---|---|
State | Rejected |
Delegated to: | Tom Rini |
Headers | show |
Series | [U-Boot] Remove more checks for CONFIG_SYS_TEXT_BASE being set | expand |
On Thu, Feb 01, 2018 at 08:20:59PM +0300, Alexey Brodkin wrote: > Now when Blackfin is gone CONFIG_SYS_TEXT_BASE is supposed to be > set for each and every board which makes checks for this macro being set > completely redundant. > > Note there're still checks for CONFIG_SYS_TEXT_BASE in quite a few board > configurations in "include/configs/XXX.h" which at some point might be > cleaned-up too. > > But at least sources are clean now. > > Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> > Cc: Masahiro Yamada <yamada.masahiro@socionext.com> > Cc: Tom Rini <trini@konsulko.com> Reviewed-by: Tom Rini <trini@konsulko.com> > @@ -620,7 +616,6 @@ static int setup_reloc(void) > return 0; > } > > -#ifdef CONFIG_SYS_TEXT_BASE > #ifdef ARM > gd->reloc_off = gd->relocaddr - (unsigned long)__image_copy_start; > #elif defined(CONFIG_M68K) Follow up that I should do, if no one else does, is remove this 'ifdef ARM' hunk. That's not set now.
On Thu, Feb 01, 2018 at 08:20:59PM +0300, Alexey Brodkin wrote: > Now when Blackfin is gone CONFIG_SYS_TEXT_BASE is supposed to be > set for each and every board which makes checks for this macro being set > completely redundant. > > Note there're still checks for CONFIG_SYS_TEXT_BASE in quite a few board > configurations in "include/configs/XXX.h" which at some point might be > cleaned-up too. > > But at least sources are clean now. > > Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> > Cc: Masahiro Yamada <yamada.masahiro@socionext.com> > Cc: Tom Rini <trini@konsulko.com> > Reviewed-by: Tom Rini <trini@konsulko.com> NAK. For x86: https://travis-ci.org/trini/u-boot/jobs/340140869 And for xtensa: https://travis-ci.org/trini/u-boot/jobs/340140899
diff --git a/arch/x86/lib/relocate.c b/arch/x86/lib/relocate.c index 114f602f7aba..352f5512a9ea 100644 --- a/arch/x86/lib/relocate.c +++ b/arch/x86/lib/relocate.c @@ -145,11 +145,7 @@ int do_elf_reloc_fixups(void) if (re_src == re_end) panic("No relocation data"); -#ifdef CONFIG_SYS_TEXT_BASE text_base = CONFIG_SYS_TEXT_BASE; -#else - panic("No CONFIG_SYS_TEXT_BASE"); -#endif #if CONFIG_IS_ENABLED(X86_64) do_elf_reloc_fixups64(text_base, size, re_src, re_end); #else diff --git a/common/autoboot.c b/common/autoboot.c index 2eef7a04cc73..3d029c35a122 100644 --- a/common/autoboot.c +++ b/common/autoboot.c @@ -272,7 +272,7 @@ static int abortboot(int bootdelay) static void process_fdt_options(const void *blob) { -#if defined(CONFIG_OF_CONTROL) && defined(CONFIG_SYS_TEXT_BASE) +#ifdef CONFIG_OF_CONTROL ulong addr; /* Add an env variable to point to a kernel payload, if available */ @@ -284,7 +284,7 @@ static void process_fdt_options(const void *blob) addr = fdtdec_get_config_int(gd->fdt_blob, "rootdisk-offset", 0); if (addr) env_set_addr("rootaddr", (void *)(CONFIG_SYS_TEXT_BASE + addr)); -#endif /* CONFIG_OF_CONTROL && CONFIG_SYS_TEXT_BASE */ +#endif /* CONFIG_OF_CONTROL */ } const char *bootdelay_process(void) diff --git a/common/board_f.c b/common/board_f.c index c6bc53e1bf05..a4f614a5322a 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -129,11 +129,7 @@ static int display_text_info(void) bss_start = (ulong)&__bss_start; bss_end = (ulong)&__bss_end; -#ifdef CONFIG_SYS_TEXT_BASE text_base = CONFIG_SYS_TEXT_BASE; -#else - text_base = CONFIG_SYS_MONITOR_BASE; -#endif debug("U-Boot code: %08lX -> %08lX BSS: -> %08lX\n", text_base, bss_start, bss_end); @@ -620,7 +616,6 @@ static int setup_reloc(void) return 0; } -#ifdef CONFIG_SYS_TEXT_BASE #ifdef ARM gd->reloc_off = gd->relocaddr - (unsigned long)__image_copy_start; #elif defined(CONFIG_M68K) @@ -631,7 +626,6 @@ static int setup_reloc(void) gd->reloc_off = gd->relocaddr - (CONFIG_SYS_TEXT_BASE + 0x400); #else gd->reloc_off = gd->relocaddr - CONFIG_SYS_TEXT_BASE; -#endif #endif memcpy(gd->new_gd, (char *)gd, sizeof(gd_t));
Now when Blackfin is gone CONFIG_SYS_TEXT_BASE is supposed to be set for each and every board which makes checks for this macro being set completely redundant. Note there're still checks for CONFIG_SYS_TEXT_BASE in quite a few board configurations in "include/configs/XXX.h" which at some point might be cleaned-up too. But at least sources are clean now. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Cc: Tom Rini <trini@konsulko.com> --- arch/x86/lib/relocate.c | 4 ---- common/autoboot.c | 4 ++-- common/board_f.c | 6 ------ 3 files changed, 2 insertions(+), 12 deletions(-)