summaryrefslogtreecommitdiff
path: root/common/board_f.c
diff options
context:
space:
mode:
authorOvidiu Panait <ovpanait@gmail.com>2022-09-13 21:31:28 +0300
committerTom Rini <trini@konsulko.com>2022-10-07 04:05:17 +0300
commitd63fc99435f462cbef5e062cb5f18711c947bf01 (patch)
tree8b62c9301b30f4257185baa38ff431351b7d7aa4 /common/board_f.c
parent85e68ae001d4449f02e6ce99b91e160bd94eb69c (diff)
downloadu-boot-d63fc99435f462cbef5e062cb5f18711c947bf01.tar.xz
common/board_f: introduce arch_setup_dest_addr()
In order to move ppc-specific code out of setup_dest_addr(), provide an arch-specific variant arch_setup_dest_addr(), that can be used by architecture code to fix up the initial reloc address. It is called at the end of setup_dest_addr() initcall and the default implementation is a nop stub. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Ovidiu Panait <ovpanait@gmail.com>
Diffstat (limited to 'common/board_f.c')
-rw-r--r--common/board_f.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/common/board_f.c b/common/board_f.c
index 5201ed30cf..82b5828d28 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -46,9 +46,6 @@
#include <video.h>
#include <watchdog.h>
#include <asm/cache.h>
-#if defined(CONFIG_MP) && defined(CONFIG_PPC)
-#include <asm/mp.h>
-#endif
#include <asm/global_data.h>
#include <asm/io.h>
#include <asm/sections.h>
@@ -343,6 +340,11 @@ __weak phys_size_t board_get_usable_ram_top(phys_size_t total_size)
return gd->ram_top;
}
+__weak int arch_setup_dest_addr(void)
+{
+ return 0;
+}
+
static int setup_dest_addr(void)
{
debug("Monitor len: %08lX\n", gd->mon_len);
@@ -370,17 +372,8 @@ static int setup_dest_addr(void)
gd->ram_top = board_get_usable_ram_top(gd->mon_len);
gd->relocaddr = gd->ram_top;
debug("Ram top: %08llX\n", (unsigned long long)gd->ram_top);
-#if defined(CONFIG_MP) && (defined(CONFIG_MPC86xx) || defined(CONFIG_E500))
- /*
- * We need to make sure the location we intend to put secondary core
- * boot code is reserved and not used by any part of u-boot
- */
- if (gd->relocaddr > determine_mp_bootpg(NULL)) {
- gd->relocaddr = determine_mp_bootpg(NULL);
- debug("Reserving MP boot page to %08lx\n", gd->relocaddr);
- }
-#endif
- return 0;
+
+ return arch_setup_dest_addr();
}
#ifdef CONFIG_PRAM