diff options
| author | Paul Mackerras <paulus@samba.org> | 2006-03-29 13:24:50 +1100 |
|---|---|---|
| committer | Paul Mackerras <paulus@samba.org> | 2006-03-29 13:24:50 +1100 |
| commit | bac30d1a78d0f11c613968fc8b351a91ed465386 (patch) | |
| tree | e52f3c876522a2f6047a6ec1c27df2e8a79486b8 /arch/arm/boot/compressed/misc.c | |
| parent | e8222502ee6157e2713da9e0792c21f4ad458d50 (diff) | |
| parent | ca9ba4471c1203bb6e759b76e83167fec54fe590 (diff) | |
Merge ../linux-2.6
Diffstat (limited to 'arch/arm/boot/compressed/misc.c')
| -rw-r--r-- | arch/arm/boot/compressed/misc.c | 41 |
1 files changed, 31 insertions, 10 deletions
diff --git a/arch/arm/boot/compressed/misc.c b/arch/arm/boot/compressed/misc.c index 5ab94584baee..0af3772efcb7 100644 --- a/arch/arm/boot/compressed/misc.c +++ b/arch/arm/boot/compressed/misc.c @@ -20,24 +20,45 @@ unsigned int __machine_arch_type; #include <linux/string.h> -#include <asm/arch/uncompress.h> - #ifdef STANDALONE_DEBUG #define putstr printf -#endif +#else + +static void putstr(const char *ptr); + +#include <linux/compiler.h> +#include <asm/arch/uncompress.h> #ifdef CONFIG_DEBUG_ICEDCC -#define putstr icedcc_putstr -#define putc icedcc_putc +static void icedcc_putc(int ch) +{ + int status, i = 0x4000000; -extern void icedcc_putc(int ch); + do { + if (--i < 0) + return; -static void -icedcc_putstr(const char *ptr) + asm("mrc p14, 0, %0, c0, c0, 0" : "=r" (status)); + } while (status & 2); + + asm("mcr p15, 0, %0, c1, c0, 0" : : "r" (ch)); +} + +#define putc(ch) icedcc_putc(ch) +#define flush() do { } while (0) +#endif + +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 |
