X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Farm%2Fboot%2Fcompressed%2Fmisc.c;h=5ab94584baee6a46839e58819a9b443422c2a923;hb=987b0145d94eecf292d8b301228356f44611ab7c;hp=ace3fb5835d9278833a0c539b8fff0b74e8af885;hpb=f7ed79d23a47594e7834d66a8f14449796d4f3e6;p=linux-2.6.git diff --git a/arch/arm/boot/compressed/misc.c b/arch/arm/boot/compressed/misc.c index ace3fb583..5ab94584b 100644 --- a/arch/arm/boot/compressed/misc.c +++ b/arch/arm/boot/compressed/misc.c @@ -20,45 +20,24 @@ unsigned int __machine_arch_type; #include +#include + #ifdef STANDALONE_DEBUG #define putstr printf -#else - -static void putstr(const char *ptr); - -#include -#include +#endif #ifdef CONFIG_DEBUG_ICEDCC -static void icedcc_putc(int ch) -{ - int status, i = 0x4000000; +#define putstr icedcc_putstr +#define putc icedcc_putc - do { - if (--i < 0) - return; +extern void icedcc_putc(int ch); - asm volatile ("mrc p14, 0, %0, c0, c0, 0" : "=r" (status)); - } while (status & 2); - - asm("mcr p14, 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) +static void +icedcc_putstr(const char *ptr) { - char c; - - while ((c = *ptr++) != '\0') { - if (c == '\n') - putc('\r'); - putc(c); + for (; *ptr != '\0'; ptr++) { + icedcc_putc(*ptr); } - - flush(); } #endif