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-rpc/uncompress.h | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'include/asm-arm/arch-rpc') diff --git a/include/asm-arm/arch-rpc/uncompress.h b/include/asm-arm/arch-rpc/uncompress.h index 43035fec64d2..06231ede54e5 100644 --- a/include/asm-arm/arch-rpc/uncompress.h +++ b/include/asm-arm/arch-rpc/uncompress.h @@ -67,31 +67,28 @@ extern __attribute__((pure)) struct param_struct *params(void); /* * This does not append a newline */ -static void putstr(const char *s) +static void putc(int c) { extern void ll_write_char(char *, char c, char white); int x,y; - unsigned char c; char *ptr; x = params->video_x; y = params->video_y; - while ( ( c = *(unsigned char *)s++ ) != '\0' ) { - if ( c == '\n' ) { + if (c == '\n') { + if (++y >= video_num_lines) + y--; + } else if (c == '\r') { + x = 0; + } else { + ptr = VIDMEM + ((y*video_num_columns*params->bytes_per_char_v+x)*bytes_per_char_h); + ll_write_char(ptr, c, white); + if (++x >= video_num_columns) { x = 0; if ( ++y >= video_num_lines ) { y--; } - } else { - ptr = VIDMEM + ((y*video_num_columns*params->bytes_per_char_v+x)*bytes_per_char_h); - ll_write_char(ptr, c, white); - if ( ++x >= video_num_columns ) { - x = 0; - if ( ++y >= video_num_lines ) { - y--; - } - } } } @@ -99,6 +96,10 @@ static void putstr(const char *s) params->video_y = y; } +static inline void flush(void) +{ +} + static void error(char *x); /* -- cgit v1.2.3