aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/boot/compressed/misc.c
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2006-03-28 10:34:05 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-03-28 10:34:05 +0100
commitde4533a04eb4f66dbef71f59a9c118256b886823 (patch)
tree8b8681da4294bf7be9d1cde44bfbf303843ba359 /arch/arm/boot/compressed/misc.c
parenta081568d7016061ed848696984e3acf1ba0b3054 (diff)
[ARM] Move ice-dcc code into misc.c
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/boot/compressed/misc.c')
-rw-r--r--arch/arm/boot/compressed/misc.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/arch/arm/boot/compressed/misc.c b/arch/arm/boot/compressed/misc.c
index 28626ec2d28..0af3772efcb 100644
--- a/arch/arm/boot/compressed/misc.c
+++ b/arch/arm/boot/compressed/misc.c
@@ -30,7 +30,20 @@ static void putstr(const char *ptr);
#include <asm/arch/uncompress.h>
#ifdef CONFIG_DEBUG_ICEDCC
-extern void icedcc_putc(int ch);
+static void icedcc_putc(int ch)
+{
+ int status, i = 0x4000000;
+
+ do {
+ if (--i < 0)
+ return;
+
+ 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