aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-arm/arch-sa1100
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-sa1100
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-sa1100')
-rw-r--r--include/asm-arm/arch-sa1100/uncompress.h21
1 files changed, 9 insertions, 12 deletions
diff --git a/include/asm-arm/arch-sa1100/uncompress.h b/include/asm-arm/arch-sa1100/uncompress.h
index 43453501ee66..2601a77a6dda 100644
--- a/include/asm-arm/arch-sa1100/uncompress.h
+++ b/include/asm-arm/arch-sa1100/uncompress.h
@@ -17,7 +17,7 @@
17 17
18#define UART(x) (*(volatile unsigned long *)(serial_port + (x))) 18#define UART(x) (*(volatile unsigned long *)(serial_port + (x)))
19 19
20static void putstr( const char *s ) 20static void putc(int c)
21{ 21{
22 unsigned long serial_port; 22 unsigned long serial_port;
23 23
@@ -31,19 +31,16 @@ static void putstr( const char *s )
31 return; 31 return;
32 } while (0); 32 } while (0);
33 33
34 for (; *s; s++) { 34 /* wait for space in the UART's transmitter */
35 /* wait for space in the UART's transmitter */ 35 while (!(UART(UTSR1) & UTSR1_TNF))
36 while (!(UART(UTSR1) & UTSR1_TNF)); 36 barrier();
37 37
38 /* send the character out. */ 38 /* send the character out. */
39 UART(UTDR) = *s; 39 UART(UTDR) = c;
40}
40 41
41 /* if a LF, also do CR... */ 42static inline void flush(void)
42 if (*s == 10) { 43{
43 while (!(UART(UTSR1) & UTSR1_TNF));
44 UART(UTDR) = 13;
45 }
46 }
47} 44}
48 45
49/* 46/*