aboutsummaryrefslogtreecommitdiffstats
path: root/arch
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 /arch
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 'arch')
-rw-r--r--arch/arm/boot/compressed/misc.c28
1 files changed, 18 insertions, 10 deletions
diff --git a/arch/arm/boot/compressed/misc.c b/arch/arm/boot/compressed/misc.c
index 5ab94584baee..28626ec2d289 100644
--- a/arch/arm/boot/compressed/misc.c
+++ b/arch/arm/boot/compressed/misc.c
@@ -20,24 +20,32 @@ unsigned int __machine_arch_type;
20 20
21#include <linux/string.h> 21#include <linux/string.h>
22 22
23#include <asm/arch/uncompress.h>
24
25#ifdef STANDALONE_DEBUG 23#ifdef STANDALONE_DEBUG
26#define putstr printf 24#define putstr printf
27#endif 25#else
28 26
29#ifdef CONFIG_DEBUG_ICEDCC 27static void putstr(const char *ptr);
30#define putstr icedcc_putstr
31#define putc icedcc_putc
32 28
29#include <linux/compiler.h>
30#include <asm/arch/uncompress.h>
31
32#ifdef CONFIG_DEBUG_ICEDCC
33extern void icedcc_putc(int ch); 33extern void icedcc_putc(int ch);
34#define putc(ch) icedcc_putc(ch)
35#define flush() do { } while (0)
36#endif
34 37
35static void 38static void putstr(const char *ptr)
36icedcc_putstr(const char *ptr)
37{ 39{
38 for (; *ptr != '\0'; ptr++) { 40 char c;
39 icedcc_putc(*ptr); 41
42 while ((c = *ptr++) != '\0') {
43 if (c == '\n')
44 putc('\r');
45 putc(c);
40 } 46 }
47
48 flush();
41} 49}
42 50
43#endif 51#endif