diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2006-03-28 10:24:33 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-03-28 10:24:33 +0100 |
commit | a081568d7016061ed848696984e3acf1ba0b3054 (patch) | |
tree | 5a6cd28d51e3c0b694499f4d0795b22a3d020eba /arch | |
parent | 3747b36eeab93d8969e86987bbc1d44971229b26 (diff) | |
download | op-kernel-dev-a081568d7016061ed848696984e3acf1ba0b3054.zip op-kernel-dev-a081568d7016061ed848696984e3acf1ba0b3054.tar.gz |
[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.c | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/arch/arm/boot/compressed/misc.c b/arch/arm/boot/compressed/misc.c index 5ab9458..28626ec 100644 --- a/arch/arm/boot/compressed/misc.c +++ b/arch/arm/boot/compressed/misc.c @@ -20,24 +20,32 @@ unsigned int __machine_arch_type; #include <linux/string.h> -#include <asm/arch/uncompress.h> - #ifdef STANDALONE_DEBUG #define putstr printf -#endif +#else -#ifdef CONFIG_DEBUG_ICEDCC -#define putstr icedcc_putstr -#define putc icedcc_putc +static void putstr(const char *ptr); +#include <linux/compiler.h> +#include <asm/arch/uncompress.h> + +#ifdef CONFIG_DEBUG_ICEDCC extern void icedcc_putc(int ch); +#define putc(ch) icedcc_putc(ch) +#define flush() do { } while (0) +#endif -static void -icedcc_putstr(const char *ptr) +static void putstr(const char *ptr) { - for (; *ptr != '\0'; ptr++) { - icedcc_putc(*ptr); + char c; + + while ((c = *ptr++) != '\0') { + if (c == '\n') + putc('\r'); + putc(c); } + + flush(); } #endif |