diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2006-03-28 04:24:33 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-03-28 04:24:33 -0500 |
commit | a081568d7016061ed848696984e3acf1ba0b3054 (patch) | |
tree | 5a6cd28d51e3c0b694499f4d0795b22a3d020eba /include/asm-arm/arch-rpc | |
parent | 3747b36eeab93d8969e86987bbc1d44971229b26 (diff) |
[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 <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'include/asm-arm/arch-rpc')
-rw-r--r-- | include/asm-arm/arch-rpc/uncompress.h | 27 |
1 files changed, 14 insertions, 13 deletions
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); | |||
67 | /* | 67 | /* |
68 | * This does not append a newline | 68 | * This does not append a newline |
69 | */ | 69 | */ |
70 | static void putstr(const char *s) | 70 | static void putc(int c) |
71 | { | 71 | { |
72 | extern void ll_write_char(char *, char c, char white); | 72 | extern void ll_write_char(char *, char c, char white); |
73 | int x,y; | 73 | int x,y; |
74 | unsigned char c; | ||
75 | char *ptr; | 74 | char *ptr; |
76 | 75 | ||
77 | x = params->video_x; | 76 | x = params->video_x; |
78 | y = params->video_y; | 77 | y = params->video_y; |
79 | 78 | ||
80 | while ( ( c = *(unsigned char *)s++ ) != '\0' ) { | 79 | if (c == '\n') { |
81 | if ( c == '\n' ) { | 80 | if (++y >= video_num_lines) |
81 | y--; | ||
82 | } else if (c == '\r') { | ||
83 | x = 0; | ||
84 | } else { | ||
85 | ptr = VIDMEM + ((y*video_num_columns*params->bytes_per_char_v+x)*bytes_per_char_h); | ||
86 | ll_write_char(ptr, c, white); | ||
87 | if (++x >= video_num_columns) { | ||
82 | x = 0; | 88 | x = 0; |
83 | if ( ++y >= video_num_lines ) { | 89 | if ( ++y >= video_num_lines ) { |
84 | y--; | 90 | y--; |
85 | } | 91 | } |
86 | } else { | ||
87 | ptr = VIDMEM + ((y*video_num_columns*params->bytes_per_char_v+x)*bytes_per_char_h); | ||
88 | ll_write_char(ptr, c, white); | ||
89 | if ( ++x >= video_num_columns ) { | ||
90 | x = 0; | ||
91 | if ( ++y >= video_num_lines ) { | ||
92 | y--; | ||
93 | } | ||
94 | } | ||
95 | } | 92 | } |
96 | } | 93 | } |
97 | 94 | ||
@@ -99,6 +96,10 @@ static void putstr(const char *s) | |||
99 | params->video_y = y; | 96 | params->video_y = y; |
100 | } | 97 | } |
101 | 98 | ||
99 | static inline void flush(void) | ||
100 | { | ||
101 | } | ||
102 | |||
102 | static void error(char *x); | 103 | static void error(char *x); |
103 | 104 | ||
104 | /* | 105 | /* |