summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2015-12-04 17:50:34 -0500
committerTom Rini <trini@konsulko.com>2015-12-04 17:50:34 -0500
commit9eed48c8bec98425dbd995dd72c40e9ad7a8c26b (patch)
tree187374b183ff589b43b7f8706829500ad2664dc2 /common
parenta85670e40da1ef4f299effb73c36e48d39d50106 (diff)
parent7a4fb11b85939b47738283c3a7ae7f461468e274 (diff)
Merge branch 'master' of http://git.denx.de/u-boot-sparc
Diffstat (limited to 'common')
-rw-r--r--common/board_f.c20
-rw-r--r--common/board_r.c10
2 files changed, 28 insertions, 2 deletions
diff --git a/common/board_f.c b/common/board_f.c
index b035c90ff3..8325dc333c 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -357,6 +357,20 @@ static int setup_dest_addr(void)
return 0;
}
+#if defined(CONFIG_SPARC)
+static int reserve_prom(void)
+{
+ /* defined in arch/sparc/cpu/leon?/prom.c */
+ extern void *__prom_start_reloc;
+ int size = 8192; /* page table = 2k, prom = 6k */
+ gd->relocaddr -= size;
+ __prom_start_reloc = map_sysmem(gd->relocaddr + 2048, size - 2048);
+ debug("Reserving %dk for PROM and page table at %08lx\n", size,
+ gd->relocaddr);
+ return 0;
+}
+#endif
+
#if defined(CONFIG_LOGBUFFER) && !defined(CONFIG_ALT_LB_ADDR)
static int reserve_logbuffer(void)
{
@@ -808,7 +822,8 @@ static init_fnc_t init_sequence_f[] = {
init_timebase,
#endif
#if defined(CONFIG_X86) || defined(CONFIG_ARM) || defined(CONFIG_MIPS) || \
- defined(CONFIG_BLACKFIN) || defined(CONFIG_NDS32)
+ defined(CONFIG_BLACKFIN) || defined(CONFIG_NDS32) || \
+ defined(CONFIG_SPARC)
timer_init, /* initialize timer */
#endif
#ifdef CONFIG_SYS_ALLOC_DPRAM
@@ -908,6 +923,9 @@ static init_fnc_t init_sequence_f[] = {
/* Blackfin u-boot monitor should be on top of the ram */
reserve_uboot,
#endif
+#if defined(CONFIG_SPARC)
+ reserve_prom,
+#endif
#if defined(CONFIG_LOGBUFFER) && !defined(CONFIG_ALT_LB_ADDR)
reserve_logbuffer,
#endif
diff --git a/common/board_r.c b/common/board_r.c
index a41fb547a3..3bf49fdfb3 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -66,6 +66,10 @@
DECLARE_GLOBAL_DATA_PTR;
+#if defined(CONFIG_SPARC)
+extern int prom_init(void);
+#endif
+
ulong monitor_flash_len;
__weak int board_flash_wp_on(void)
@@ -813,7 +817,8 @@ init_fnc_t init_sequence_r[] = {
initr_flash,
#endif
INIT_FUNC_WATCHDOG_RESET
-#if defined(CONFIG_PPC) || defined(CONFIG_M68K) || defined(CONFIG_X86)
+#if defined(CONFIG_PPC) || defined(CONFIG_M68K) || defined(CONFIG_X86) || \
+ defined(CONFIG_SPARC)
/* initialize higher level parts of CPU like time base and timers */
cpu_init_r,
#endif
@@ -933,6 +938,9 @@ init_fnc_t init_sequence_r[] = {
#ifdef CONFIG_PS2KBD
initr_kbd,
#endif
+#if defined(CONFIG_SPARC)
+ prom_init,
+#endif
run_main_loop,
};