aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-arm/arch-h720x
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2006-03-28 04:24:33 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-03-28 04:24:33 -0500
commita081568d7016061ed848696984e3acf1ba0b3054 (patch)
tree5a6cd28d51e3c0b694499f4d0795b22a3d020eba /include/asm-arm/arch-h720x
parent3747b36eeab93d8969e86987bbc1d44971229b26 (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-h720x')
-rw-r--r--include/asm-arm/arch-h720x/uncompress.h24
1 files changed, 11 insertions, 13 deletions
diff --git a/include/asm-arm/arch-h720x/uncompress.h b/include/asm-arm/arch-h720x/uncompress.h
index 9535764bcc71..18c69e0f3585 100644
--- a/include/asm-arm/arch-h720x/uncompress.h
+++ b/include/asm-arm/arch-h720x/uncompress.h
@@ -12,22 +12,20 @@
12#define LSR 0x14 12#define LSR 0x14
13#define TEMPTY 0x40 13#define TEMPTY 0x40
14 14
15static void putstr(const char *s) 15static inline void putc(int c)
16{ 16{
17 char c;
18 volatile unsigned char *p = (volatile unsigned char *)(IO_PHYS+0x20000); 17 volatile unsigned char *p = (volatile unsigned char *)(IO_PHYS+0x20000);
19 18
20 while ( (c = *s++) != '\0') { 19 /* wait until transmit buffer is empty */
21 /* wait until transmit buffer is empty */ 20 while((p[LSR] & TEMPTY) == 0x0)
22 while((p[LSR] & TEMPTY) == 0x0); 21 barrier();
23 /* write next character */ 22
24 *p = c; 23 /* write next character */
25 24 *p = c;
26 if(c == '\n') { 25}
27 while((p[LSR] & TEMPTY) == 0x0); 26
28 *p = '\r'; 27static inline void flush(void)
29 } 28{
30 }
31} 29}
32 30
33/* 31/*