From eacbd317757327e8e7f018f5701c950429c4c6ae Mon Sep 17 00:00:00 2001 From: "Zachary P. Landau" Date: Thu, 26 Jan 2006 17:35:56 -0500 Subject: Add support for Freescale M5271 processor --- cpu/mcf52x2/cpu.c | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'cpu/mcf52x2/cpu.c') diff --git a/cpu/mcf52x2/cpu.c b/cpu/mcf52x2/cpu.c index 32a524f7e7..302832bd43 100644 --- a/cpu/mcf52x2/cpu.c +++ b/cpu/mcf52x2/cpu.c @@ -25,6 +25,11 @@ #include #include +#ifdef CONFIG_M5271 +#include +#include +#endif + #ifdef CONFIG_M5272 #include #include @@ -38,6 +43,41 @@ #include #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[]) { -- cgit From b75ef85f42f75206a9a2c278c042e911c92ea28c Mon Sep 17 00:00:00 2001 From: Marian Balakowicz Date: Tue, 9 May 2006 11:45:31 +0200 Subject: Update CPU target identification strings for Coldfire family. --- cpu/mcf52x2/cpu.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'cpu/mcf52x2/cpu.c') diff --git a/cpu/mcf52x2/cpu.c b/cpu/mcf52x2/cpu.c index 302832bd43..e6e5d9bee9 100644 --- a/cpu/mcf52x2/cpu.c +++ b/cpu/mcf52x2/cpu.c @@ -46,7 +46,9 @@ #ifdef CONFIG_M5271 int checkcpu (void) { - puts ("CPU: MOTOROLA Coldfire MCF5271\n"); + char buf[32]; + + printf ("CPU: Freescale Coldfire MCF5271 at %s MHz\n", strmhz(buf, CFG_CLK)); return 0; } @@ -71,7 +73,6 @@ int watchdog_disable (void) int watchdog_init (void) { - mbar_writeShort(MCF_WTM_WCNTR, CONFIG_WATCHDOG_TIMEOUT); mbar_writeShort(MCF_WTM_WCR, MCF_WTM_WCR_EN); return (0); } @@ -106,12 +107,12 @@ int checkcpu(void) { case 0x4: suf = "3K75N"; break; default: suf = NULL; - printf ("MOTOROLA MCF5272 (Mask:%01x)\n", msk); + printf ("Freescale MCF5272 (Mask:%01x)\n", msk); break; } if (suf) - printf ("MOTOROLA MCF5272 %s\n", suf); + printf ("Freescale MCF5272 %s\n", suf); return 0; }; @@ -157,7 +158,7 @@ int watchdog_init (void) #ifdef CONFIG_M5282 int checkcpu (void) { - puts ("CPU: MOTOROLA Coldfire MCF5282\n"); + puts ("CPU: Freescale Coldfire MCF5282\n"); return 0; } @@ -171,7 +172,7 @@ int checkcpu (void) { char buf[32]; - printf ("CPU: MOTOROLA Coldfire MCF5249 at %s MHz\n", strmhz(buf, CFG_CLK)); + printf ("CPU: Freescale Coldfire MCF5249 at %s MHz\n", strmhz(buf, CFG_CLK)); return 0; } -- cgit