From 4af099bda90fe602aff96b2fd914fca89f320c5c Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Tue, 9 May 2006 13:49:12 +0200 Subject: [PATCH] Fix watchdog issues for ColdFire boards. --- CHANGELOG | 16 +++++++++------- cpu/mcf52x2/serial.c | 5 ++++- drivers/cfi_flash.c | 5 +++++ 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 7eb8ede998..0a52639ddc 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,11 +2,13 @@ Changes since U-Boot 1.1.4: ====================================================================== +* Fix watchdog issues for ColdFire boards. + * Add M5271EVB board support. * Make R5200 specific low level initialization board conditional. -* Update CPU target identification strings for Coldfire family. +* Update CPU target identification strings for ColdFire family. * Update register definitions for MCF5271. @@ -21,7 +23,7 @@ Changes since U-Boot 1.1.4: - Removed MPC8349ADS port - Added PCI support to MPC8349ADS - reworked memory map to allow mapping of all regions with BATs - Patch by Kumar Gala 20 Apr 2006 + Patch by Kumar Gala, 20 Apr 2006 * Coding Style cleanup @@ -1813,7 +1815,7 @@ Changes for U-Boot 1.1.3: - use -mtune=xscale and -march=armv5 options for PXA * Patch by Florian Schlote, 08 Sep 2004: - Add support for SenTec-COBRA5272-board (Coldfire). + Add support for SenTec-COBRA5272-board (ColdFire). * Patch by Gleb Natapov, 07 Sep 2004: mpc824x: set PCI latency timer to a sane value @@ -1871,7 +1873,7 @@ Changes for U-Boot 1.1.2: * Patch by Stefan Roese, 16 Dez 2004: - ext2fs support added - Tundra universe support added - - Coldfire MCF5249 support added (no preloader needed!) + - ColdFire MCF5249 support added (no preloader needed!) - MCF5249 board TASREG added - PPC boards added: APC405, CPCI405DT, CPCI750, G2000, HH405, VOM405, WUH405 @@ -2193,7 +2195,7 @@ Changes for U-Boot 1.1.2: * Fix NSCU config; add ethernet wakeup code. -* Add link for preloader for Motorola Coldfire to README.m68k +* Add link for preloader for Motorola ColdFire to README.m68k * Patch by Michael Bendzick, 12 Jul 2004: fix output formatting in drivers/cfi_flash.c @@ -3140,7 +3142,7 @@ Changes for U-Boot 1.1.0: * Some code cleanup * Patch by Josef Baumgartner, 10 Feb 2004: - Fixes for Coldfire port + Fixes for ColdFire port * Patch by Brad Kemp, 11 Feb 2004: Fix CFI flash driver problems @@ -3406,7 +3408,7 @@ Changes for U-Boot 1.0.1: - 4xx: removed spurious MII error messages on "mii info" command. * Patch by Bernhard Kuhn, 28 Nov 2003: - add support for Coldfire CPU + add support for ColdFire CPU add support for Motorola M5272C3 and M5282EVB boards * Patch by Pierre Aubert, 24 Nov 2003: diff --git a/cpu/mcf52x2/serial.c b/cpu/mcf52x2/serial.c index 1cde1b6883..c66bdef768 100644 --- a/cpu/mcf52x2/serial.c +++ b/cpu/mcf52x2/serial.c @@ -23,6 +23,7 @@ #include #include +#include #include @@ -174,7 +175,9 @@ void serial_puts (const char *s) { } int serial_getc(void) { - while(!rs_is_char()); + while(!rs_is_char()) + WATCHDOG_RESET(); + return rs_get_char(); } diff --git a/drivers/cfi_flash.c b/drivers/cfi_flash.c index 2e3748081e..37172379b9 100644 --- a/drivers/cfi_flash.c +++ b/drivers/cfi_flash.c @@ -45,6 +45,7 @@ /* #define DEBUG */ #include +#include #include #include #include @@ -1307,6 +1308,10 @@ static int flash_write_cfiword (flash_info_t * info, ulong dest, if (flag) enable_interrupts (); +#if defined(CONFIG_MCF52x2) + WATCHDOG_RESET(); +#endif + return flash_full_status_check (info, find_sector (info, dest), info->write_tout, "write"); } -- 2.25.1