diff options
| author | Marian Balakowicz <m8@semihalf.com> | 2006-04-27 19:12:19 +0200 |
|---|---|---|
| committer | Marian Balakowicz <m8@semihalf.com> | 2006-04-27 19:12:19 +0200 |
| commit | 7a635e004ec12bd2a0bae9f90fbb5769b524a42e (patch) | |
| tree | 9c0b3d146c12454e95395411094d420bc5b4a3d3 /cpu/mcf52x2/cpu_init.c | |
| parent | 76544f80e476a7a0cc3a0bbce853354f2c6a61e2 (diff) | |
| parent | f8c3b4f310a36e19d00d0f87fb37587abb65621d (diff) | |
| download | olio-uboot-2014.01-7a635e004ec12bd2a0bae9f90fbb5769b524a42e.tar.xz olio-uboot-2014.01-7a635e004ec12bd2a0bae9f90fbb5769b524a42e.zip | |
Add support for Freescale M5271: Merge with /work/u-boot.mcf5271
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 350c431db..d33adc2dc 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... |