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.c | |
parent | 76544f80e476a7a0cc3a0bbce853354f2c6a61e2 (diff) | |
parent | f8c3b4f310a36e19d00d0f87fb37587abb65621d (diff) | |
download | u-boot-imx-7a635e004ec12bd2a0bae9f90fbb5769b524a42e.zip u-boot-imx-7a635e004ec12bd2a0bae9f90fbb5769b524a42e.tar.gz u-boot-imx-7a635e004ec12bd2a0bae9f90fbb5769b524a42e.tar.bz2 |
Add support for Freescale M5271: Merge with /work/u-boot.mcf5271
Diffstat (limited to 'cpu/mcf52x2/cpu.c')
-rw-r--r-- | cpu/mcf52x2/cpu.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/cpu/mcf52x2/cpu.c b/cpu/mcf52x2/cpu.c index 32a524f..302832b 100644 --- a/cpu/mcf52x2/cpu.c +++ b/cpu/mcf52x2/cpu.c @@ -25,6 +25,11 @@ #include <watchdog.h> #include <command.h> +#ifdef CONFIG_M5271 +#include <asm/immap_5271.h> +#include <asm/m5271.h> +#endif + #ifdef CONFIG_M5272 #include <asm/immap_5272.h> #include <asm/m5272.h> @@ -38,6 +43,41 @@ #include <asm/m5249.h> #endif +#ifdef CONFIG_M5271 +int checkcpu (void) +{ + puts ("CPU: MOTOROLA Coldfire MCF5271\n"); + return 0; +} + +int do_reset (cmd_tbl_t *cmdtp, bd_t *bd, int flag, int argc, char *argv[]) { + mbar_writeByte(MCF_RCM_RCR, + MCF_RCM_RCR_SOFTRST | MCF_RCM_RCR_FRCRSTOUT); + return 0; +}; + +#if defined(CONFIG_WATCHDOG) +void watchdog_reset (void) +{ + mbar_writeShort(MCF_WTM_WSR, 0x5555); + mbar_writeShort(MCF_WTM_WSR, 0xAAAA); +} + +int watchdog_disable (void) +{ + mbar_writeShort(MCF_WTM_WCR, 0); + return (0); +} + +int watchdog_init (void) +{ + mbar_writeShort(MCF_WTM_WCNTR, CONFIG_WATCHDOG_TIMEOUT); + mbar_writeShort(MCF_WTM_WCR, MCF_WTM_WCR_EN); + return (0); +} +#endif /* #ifdef CONFIG_WATCHDOG */ + +#endif #ifdef CONFIG_M5272 int do_reset (cmd_tbl_t *cmdtp, bd_t *bd, int flag, int argc, char *argv[]) { |