diff options
author | Wolfgang Denk <wd@pollux.denx.de> | 2006-05-09 13:46:55 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@pollux.denx.de> | 2006-05-09 13:46:55 +0200 |
commit | 1cfefe8cb6e1bb43f6509c0aee254e2908d42f21 (patch) | |
tree | eba45129d65b83452d281514802f3895aa4f283e /cpu/mcf52x2/cpu_init.c | |
parent | 67a94685225b289fb3344cf00fefa91fd93f24ae (diff) | |
parent | 78b123cd69d485887f33ebd33ba1f9b27f8e6916 (diff) |
Merge with /home/m8/git/u-boot
Diffstat (limited to 'cpu/mcf52x2/cpu_init.c')
-rw-r--r-- | cpu/mcf52x2/cpu_init.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/cpu/mcf52x2/cpu_init.c b/cpu/mcf52x2/cpu_init.c index 350c431dba4..d33adc2dcbb 100644 --- a/cpu/mcf52x2/cpu_init.c +++ b/cpu/mcf52x2/cpu_init.c @@ -24,6 +24,11 @@ #include <common.h> #include <watchdog.h> +#ifdef CONFIG_M5271 +#include <asm/m5271.h> +#include <asm/immap_5271.h> +#endif + #ifdef CONFIG_M5272 #include <asm/m5272.h> #include <asm/immap_5272.h> @@ -38,6 +43,38 @@ #include <asm/m5249.h> #endif +#if defined(CONFIG_M5271) +void cpu_init_f (void) +{ +#ifndef CONFIG_WATCHDOG + /* Disable the watchdog if we aren't using it */ + mbar_writeShort(MCF_WTM_WCR, 0); +#endif + + /* Set clockspeed to 100MHz */ + mbar_writeShort(MCF_FMPLL_SYNCR, + MCF_FMPLL_SYNCR_MFD(0) | MCF_FMPLL_SYNCR_RFD(0)); + while (!mbar_readByte(MCF_FMPLL_SYNSR) & MCF_FMPLL_SYNSR_LOCK); + + /* Enable UART pins */ + mbar_writeShort(MCF_GPIO_PAR_UART, MCF_GPIO_PAR_UART_U0TXD | + MCF_GPIO_PAR_UART_U0RXD | + MCF_GPIO_PAR_UART_U1RXD_UART1 | + MCF_GPIO_PAR_UART_U1TXD_UART1); + + /* Enable Ethernet pins */ + mbar_writeByte(MCF_GPIO_PAR_FECI2C, CFG_FECI2C); +} + +/* + * initialize higher level parts of CPU like timers + */ +int cpu_init_r (void) +{ + return (0); +} +#endif + #if defined(CONFIG_M5272) /* * Breath some life into the CPU... |