]> err.no Git - linux-2.6/commitdiff
[ARM] Move ice-dcc code into misc.c
authorRussell King <rmk@dyn-67.arm.linux.org.uk>
Tue, 28 Mar 2006 09:34:05 +0000 (10:34 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Tue, 28 Mar 2006 09:34:05 +0000 (10:34 +0100)
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/boot/compressed/Makefile
arch/arm/boot/compressed/ice-dcc.S [deleted file]
arch/arm/boot/compressed/misc.c

index 35ffe0f4ece78720c15a448061e0ad55d55af235..2adc1527e0ebc9d7a3d4936b0eb4e767381e2e84 100644 (file)
@@ -50,10 +50,6 @@ ifeq ($(CONFIG_ARCH_AT91RM9200),y)
 OBJS           += head-at91rm9200.o
 endif
 
-ifeq ($(CONFIG_DEBUG_ICEDCC),y)
-OBJS            += ice-dcc.o
-endif
-
 ifeq ($(CONFIG_CPU_BIG_ENDIAN),y)
 OBJS           += big-endian.o
 endif
diff --git a/arch/arm/boot/compressed/ice-dcc.S b/arch/arm/boot/compressed/ice-dcc.S
deleted file mode 100644 (file)
index 104377a..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-       .text
-
-       .global icedcc_putc
-
-icedcc_putc:
-       mov     r2, #0x4000000
-1:
-       subs    r2, r2, #1
-       movlt   pc, r14
-       mrc     p14, 0, r1, c0, c0, 0
-       tst     r1, #2
-       bne     1b
-
-       mcr     p14, 0, r0, c1, c0, 0
-       mov     pc, r14
index 28626ec2d289804646cf61a79a0c2c8f24e0120f..0af3772efcb79c56e0e08f4659fed0292071c427 100644 (file)
@@ -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