summaryrefslogtreecommitdiff
path: root/lib_ppc
diff options
context:
space:
mode:
Diffstat (limited to 'lib_ppc')
-rw-r--r--lib_ppc/board.c11
-rw-r--r--lib_ppc/cache.c3
-rw-r--r--lib_ppc/time.c4
3 files changed, 13 insertions, 5 deletions
diff --git a/lib_ppc/board.c b/lib_ppc/board.c
index c617049..eb67942 100644
--- a/lib_ppc/board.c
+++ b/lib_ppc/board.c
@@ -30,6 +30,9 @@
#ifdef CONFIG_8xx
#include <mpc8xx.h>
#endif
+#ifdef CONFIG_5xx
+#include <mpc5xx.h>
+#endif
#if (CONFIG_COMMANDS & CFG_CMD_IDE)
#include <ide.h>
#endif
@@ -160,12 +163,15 @@ static void syscalls_init (void)
*addr++ |= NR_SYSCALLS >> 16;
*addr++ |= NR_SYSCALLS & 0xFFFF;
+#ifndef CONFIG_5XX
flush_cache (0x0C00, 0x10);
-
+#endif
/* Initialize syscalls stack pointer */
addr = (ulong *) 0xCFC;
*addr = (ulong)addr;
+#ifndef CONFIG_5xx
flush_cache ((ulong)addr, 0x10);
+#endif
}
/*
@@ -199,7 +205,6 @@ static int init_baudrate (void)
gd->baudrate = (i > 0)
? (int) simple_strtoul (tmp, NULL, 10)
: CONFIG_BAUDRATE;
-
return (0);
}
@@ -496,7 +501,7 @@ void board_init_f (ulong bootflag)
bd->bi_sramsize = 0; /* FIXME */ /* size of SRAM memory */
#endif
-#if defined(CONFIG_8xx) || defined(CONFIG_8260)
+#if defined(CONFIG_8xx) || defined(CONFIG_8260) || defined(CONFIG_5xx)
bd->bi_immr_base = CFG_IMMR; /* base of IMMR register */
#endif
diff --git a/lib_ppc/cache.c b/lib_ppc/cache.c
index bec092e..a81ab5e 100644
--- a/lib_ppc/cache.c
+++ b/lib_ppc/cache.c
@@ -23,8 +23,10 @@
#include <common.h>
+
void flush_cache (ulong start_addr, ulong size)
{
+#ifndef CONFIG_5xx
ulong addr, end_addr = start_addr + size;
if (CFG_CACHELINE_SIZE) {
@@ -44,4 +46,5 @@ void flush_cache (ulong start_addr, ulong size)
}
asm ("sync"); /* Always flush prefetch queue in any case */
asm ("isync");
+#endif
}
diff --git a/lib_ppc/time.c b/lib_ppc/time.c
index 5165abb..3b3c50e 100644
--- a/lib_ppc/time.c
+++ b/lib_ppc/time.c
@@ -80,7 +80,7 @@ unsigned long ticks2usec(unsigned long ticks)
int init_timebase (void)
{
-#ifdef CONFIG_8xx
+#if defined(CONFIG_5xx) || defined(CONFIG_8xx)
volatile immap_t *immap = (immap_t *) CFG_IMMR;
/* unlock */
@@ -90,7 +90,7 @@ int init_timebase (void)
/* reset */
asm ("li 3,0 ; mttbu 3 ; mttbl 3 ;");
-#ifdef CONFIG_8xx
+#if defined(CONFIG_5xx) || defined(CONFIG_8xx)
/* enable */
immap->im_sit.sit_tbscr |= TBSCR_TBE;
#endif