From cee64386de621e42c3d25062272a2047dc782f7e Mon Sep 17 00:00:00 2001 From: Russell King Date: Tue, 28 Mar 2006 10:34:05 +0100 Subject: [PATCH] --- yaml --- r: 24534 b: refs/heads/master c: de4533a04eb4f66dbef71f59a9c118256b886823 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/arm/boot/compressed/Makefile | 4 ---- trunk/arch/arm/boot/compressed/ice-dcc.S | 17 ----------------- trunk/arch/arm/boot/compressed/misc.c | 15 ++++++++++++++- 4 files changed, 15 insertions(+), 23 deletions(-) delete mode 100644 trunk/arch/arm/boot/compressed/ice-dcc.S diff --git a/[refs] b/[refs] index a2ef9fb7efa3..114c89217f8b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a081568d7016061ed848696984e3acf1ba0b3054 +refs/heads/master: de4533a04eb4f66dbef71f59a9c118256b886823 diff --git a/trunk/arch/arm/boot/compressed/Makefile b/trunk/arch/arm/boot/compressed/Makefile index 35ffe0f4ece7..2adc1527e0eb 100644 --- a/trunk/arch/arm/boot/compressed/Makefile +++ b/trunk/arch/arm/boot/compressed/Makefile @@ -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/trunk/arch/arm/boot/compressed/ice-dcc.S b/trunk/arch/arm/boot/compressed/ice-dcc.S deleted file mode 100644 index 104377a199bb..000000000000 --- a/trunk/arch/arm/boot/compressed/ice-dcc.S +++ /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 diff --git a/trunk/arch/arm/boot/compressed/misc.c b/trunk/arch/arm/boot/compressed/misc.c index 28626ec2d289..0af3772efcb7 100644 --- a/trunk/arch/arm/boot/compressed/misc.c +++ b/trunk/arch/arm/boot/compressed/misc.c @@ -30,7 +30,20 @@ static void putstr(const char *ptr); #include #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