diff options
Diffstat (limited to 'arch/arm/boot/compressed/misc.c')
-rw-r--r-- | arch/arm/boot/compressed/misc.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/arm/boot/compressed/misc.c b/arch/arm/boot/compressed/misc.c index ace3fb5835d9..283891c736c4 100644 --- a/arch/arm/boot/compressed/misc.c +++ b/arch/arm/boot/compressed/misc.c | |||
@@ -30,6 +30,25 @@ static void putstr(const char *ptr); | |||
30 | #include <asm/arch/uncompress.h> | 30 | #include <asm/arch/uncompress.h> |
31 | 31 | ||
32 | #ifdef CONFIG_DEBUG_ICEDCC | 32 | #ifdef CONFIG_DEBUG_ICEDCC |
33 | |||
34 | #ifdef CONFIG_CPU_V6 | ||
35 | |||
36 | static void icedcc_putc(int ch) | ||
37 | { | ||
38 | int status, i = 0x4000000; | ||
39 | |||
40 | do { | ||
41 | if (--i < 0) | ||
42 | return; | ||
43 | |||
44 | asm volatile ("mrc p14, 0, %0, c0, c1, 0" : "=r" (status)); | ||
45 | } while (status & (1 << 29)); | ||
46 | |||
47 | asm("mcr p14, 0, %0, c0, c5, 0" : : "r" (ch)); | ||
48 | } | ||
49 | |||
50 | #else | ||
51 | |||
33 | static void icedcc_putc(int ch) | 52 | static void icedcc_putc(int ch) |
34 | { | 53 | { |
35 | int status, i = 0x4000000; | 54 | int status, i = 0x4000000; |
@@ -44,6 +63,8 @@ static void icedcc_putc(int ch) | |||
44 | asm("mcr p14, 0, %0, c1, c0, 0" : : "r" (ch)); | 63 | asm("mcr p14, 0, %0, c1, c0, 0" : : "r" (ch)); |
45 | } | 64 | } |
46 | 65 | ||
66 | #endif | ||
67 | |||
47 | #define putc(ch) icedcc_putc(ch) | 68 | #define putc(ch) icedcc_putc(ch) |
48 | #define flush() do { } while (0) | 69 | #define flush() do { } while (0) |
49 | #endif | 70 | #endif |