From a081568d7016061ed848696984e3acf1ba0b3054 Mon Sep 17 00:00:00 2001 From: Russell King Date: Tue, 28 Mar 2006 10:24:33 +0100 Subject: [ARM] Fix decompressor serial IO to give CRLF not LFCR As per the corresponding change to the serial drivers, arrange for ARM decompressors to give CRLF. Move the common putstr code into misc.c such that machines only need to supply "putc" and "flush" functions. Signed-off-by: Russell King --- include/asm-arm/arch-h720x/uncompress.h | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) (limited to 'include/asm-arm/arch-h720x') diff --git a/include/asm-arm/arch-h720x/uncompress.h b/include/asm-arm/arch-h720x/uncompress.h index 9535764bcc7..18c69e0f358 100644 --- a/include/asm-arm/arch-h720x/uncompress.h +++ b/include/asm-arm/arch-h720x/uncompress.h @@ -12,22 +12,20 @@ #define LSR 0x14 #define TEMPTY 0x40 -static void putstr(const char *s) +static inline void putc(int c) { - char c; volatile unsigned char *p = (volatile unsigned char *)(IO_PHYS+0x20000); - while ( (c = *s++) != '\0') { - /* wait until transmit buffer is empty */ - while((p[LSR] & TEMPTY) == 0x0); - /* write next character */ - *p = c; - - if(c == '\n') { - while((p[LSR] & TEMPTY) == 0x0); - *p = '\r'; - } - } + /* wait until transmit buffer is empty */ + while((p[LSR] & TEMPTY) == 0x0) + barrier(); + + /* write next character */ + *p = c; +} + +static inline void flush(void) +{ } /* -- cgit v1.2.3