aboutsummaryrefslogtreecommitdiff
path: root/common/board_f.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/board_f.c')
-rw-r--r--common/board_f.c41
1 files changed, 7 insertions, 34 deletions
diff --git a/common/board_f.c b/common/board_f.c
index 3df4efeeff..5f1711181c 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -36,9 +36,7 @@
#include <post.h>
#include <relocate.h>
#include <serial.h>
-#ifdef CONFIG_SPL
#include <spl.h>
-#endif
#include <status_led.h>
#include <sysreset.h>
#include <timer.h>
@@ -46,12 +44,6 @@
#include <video.h>
#include <watchdog.h>
#include <asm/cache.h>
-#ifdef CONFIG_MACH_TYPE
-#include <asm/mach-types.h>
-#endif
-#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>
@@ -59,18 +51,7 @@
#include <linux/errno.h>
#include <linux/log2.h>
-/*
- * Pointer to initial global data area
- *
- * Here we initialize it if needed.
- */
-#ifdef XTRN_DECLARE_GLOBAL_DATA_PTR
-#undef XTRN_DECLARE_GLOBAL_DATA_PTR
-#define XTRN_DECLARE_GLOBAL_DATA_PTR /* empty = allocate here */
-DECLARE_GLOBAL_DATA_PTR = (gd_t *)(CONFIG_SYS_INIT_GD_ADDR);
-#else
DECLARE_GLOBAL_DATA_PTR;
-#endif
/*
* TODO(sjg@chromium.org): IMO this code should be
@@ -357,6 +338,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);
@@ -384,17 +370,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
@@ -635,10 +612,6 @@ int setup_bdinfo(void)
bd->bi_sramsize = CONFIG_SYS_SRAM_SIZE; /* size of SRAM */
}
-#ifdef CONFIG_MACH_TYPE
- bd->bi_arch_number = CONFIG_MACH_TYPE; /* board id for Linux */
-#endif
-
return arch_setup_bdinfo();
}