diff options
| author | wdenk <wdenk> | 2003-01-11 09:48:40 +0000 | 
|---|---|---|
| committer | wdenk <wdenk> | 2003-01-11 09:48:40 +0000 | 
| commit | d0fb80c3021e15853895e9ae45ab9368d0fb52fa (patch) | |
| tree | a4e65529732e8058b15a0cef175f65312ec3eedd /cpu/mpc8xx/serial.c | |
| parent | a25f862ba8b9d8440973d0204c19fec859f953f3 (diff) | |
| download | olio-uboot-2014.01-d0fb80c3021e15853895e9ae45ab9368d0fb52fa.tar.xz olio-uboot-2014.01-d0fb80c3021e15853895e9ae45ab9368d0fb52fa.zip | |
* Restrict baudrate settings on LWMON to higher speedsLABEL_2003_01_11_1050
  when watchdog is on
* Update baudrate in bd_info when it gets changed
* Add watchdog trigger points while waiting for serial port
  (so far only 8xx -- needed on LWMON with 100ms watchdog)
* Improve command line tool to access the U-Boot's environment
  (figuration of the utility, using a config file)
Diffstat (limited to 'cpu/mpc8xx/serial.c')
| -rw-r--r-- | cpu/mpc8xx/serial.c | 33 | 
1 files changed, 15 insertions, 18 deletions
| diff --git a/cpu/mpc8xx/serial.c b/cpu/mpc8xx/serial.c index 0690300b2..2871084fc 100644 --- a/cpu/mpc8xx/serial.c +++ b/cpu/mpc8xx/serial.c @@ -24,6 +24,7 @@  #include <common.h>  #include <commproc.h>  #include <command.h> +#include <watchdog.h>  #if !defined(CONFIG_8xx_CONS_NONE)	/* No Console at all */ @@ -265,20 +266,16 @@ serial_putc(const char c)  	*/  	buf = (char *)tbdf->cbd_bufaddr; -#if 0 -	__asm__("eieio"); -	while (tbdf->cbd_sc & BD_SC_READY) -		__asm__("eieio"); -#endif  	*buf = c;  	tbdf->cbd_datlen = 1;  	tbdf->cbd_sc |= BD_SC_READY;  	__asm__("eieio"); -#if 1 -	while (tbdf->cbd_sc & BD_SC_READY) + +	while (tbdf->cbd_sc & BD_SC_READY) { +		WATCHDOG_RESET ();  		__asm__("eieio"); -#endif +	}  }  int @@ -298,8 +295,10 @@ serial_getc(void)  	/* Wait for character to show up.  	*/  	buf = (unsigned char *)rbdf->cbd_bufaddr; +  	while (rbdf->cbd_sc & BD_SC_EMPTY) -		; +		WATCHDOG_RESET (); +  	c = *buf;  	rbdf->cbd_sc |= BD_SC_EMPTY; @@ -524,20 +523,16 @@ serial_putc(const char c)  	*/  	buf = (char *)tbdf->cbd_bufaddr; -#if 0 -	__asm__("eieio"); -	while (tbdf->cbd_sc & BD_SC_READY) -		__asm__("eieio"); -#endif  	*buf = c;  	tbdf->cbd_datlen = 1;  	tbdf->cbd_sc |= BD_SC_READY;  	__asm__("eieio"); -#if 1 -	while (tbdf->cbd_sc & BD_SC_READY) + +	while (tbdf->cbd_sc & BD_SC_READY) {  		__asm__("eieio"); -#endif +		WATCHDOG_RESET (); +	}  }  int @@ -557,8 +552,10 @@ serial_getc(void)  	/* Wait for character to show up.  	*/  	buf = (unsigned char *)rbdf->cbd_bufaddr; +  	while (rbdf->cbd_sc & BD_SC_EMPTY) -		; +		WATCHDOG_RESET (); +  	c = *buf;  	rbdf->cbd_sc |= BD_SC_EMPTY; |