summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2007-07-12 11:19:09 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2007-07-12 11:19:09 +0200
commitfa9807573b02dda3e9eb5262ffc42fb0fd8b059e (patch)
treef0fb282754301a2fd6a9f3265df711845ecd846c /arch
parente48e2cdf256396b920e47d6ce41d081a57d0678e (diff)
downloadbarebox-fa9807573b02dda3e9eb5262ffc42fb0fd8b059e.tar.gz
barebox-fa9807573b02dda3e9eb5262ffc42fb0fd8b059e.tar.xz
consolidate cpu_init_*
Diffstat (limited to 'arch')
-rw-r--r--arch/ppc/lib/board.c3
-rw-r--r--arch/ppc/mach-mpc5xxx/cpu_init.c12
2 files changed, 5 insertions, 10 deletions
diff --git a/arch/ppc/lib/board.c b/arch/ppc/lib/board.c
index efea254a74..9ade2dac8e 100644
--- a/arch/ppc/lib/board.c
+++ b/arch/ppc/lib/board.c
@@ -64,9 +64,6 @@ void board_init_r (ulong end_of_ram)
*/
trap_init (0);
- /* initialize higher level parts of CPU like time base and timers */
- cpu_init_r ();
-
/*
* Enable Interrupts
*/
diff --git a/arch/ppc/mach-mpc5xxx/cpu_init.c b/arch/ppc/mach-mpc5xxx/cpu_init.c
index 303e248ce5..44aed8ad6f 100644
--- a/arch/ppc/mach-mpc5xxx/cpu_init.c
+++ b/arch/ppc/mach-mpc5xxx/cpu_init.c
@@ -24,6 +24,7 @@
#include <common.h>
#include <asm/arch/mpc5xxx.h>
#include <types.h>
+#include <reloc.h>
/*
* Breath some life into the CPU...
@@ -31,10 +32,12 @@
* Set up the memory map,
* initialize a bunch of registers.
*/
-void cpu_init_f (void)
+int cpu_init(void)
{
unsigned long addecr = (1 << 25); /* Boot_CS */
+ early_init();
+
#if defined(CFG_RAMBOOT) && defined(CONFIG_MGT5100)
addecr |= (1 << 22); /* SDRAM enable */
#endif
@@ -175,13 +178,7 @@ void cpu_init_f (void)
*(vu_long *)(MPC5XXX_XLBARB + 0x40) &= ~(1 << 31);
# endif
#endif /* CONFIG_MPC5200 */
-}
-/*
- * initialize higher level parts of CPU like time base and timers
- */
-int cpu_init_r (void)
-{
/* mask all interrupts */
#if defined(CONFIG_MGT5100)
*(vu_long *)MPC5XXX_ICTL_PER_MASK = 0xfffffc00;
@@ -195,3 +192,4 @@ int cpu_init_r (void)
return 0;
}
+