[ARM] Move ice-dcc code into misc.c

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

authored by

Russell King and committed by
Russell King
de4533a0 a081568d

+14 -22
-4
arch/arm/boot/compressed/Makefile
··· 50 OBJS += head-at91rm9200.o 51 endif 52 53 - ifeq ($(CONFIG_DEBUG_ICEDCC),y) 54 - OBJS += ice-dcc.o 55 - endif 56 - 57 ifeq ($(CONFIG_CPU_BIG_ENDIAN),y) 58 OBJS += big-endian.o 59 endif
··· 50 OBJS += head-at91rm9200.o 51 endif 52 53 ifeq ($(CONFIG_CPU_BIG_ENDIAN),y) 54 OBJS += big-endian.o 55 endif
-17
arch/arm/boot/compressed/ice-dcc.S
··· 1 - 2 - 3 - .text 4 - 5 - .global icedcc_putc 6 - 7 - icedcc_putc: 8 - mov r2, #0x4000000 9 - 1: 10 - subs r2, r2, #1 11 - movlt pc, r14 12 - mrc p14, 0, r1, c0, c0, 0 13 - tst r1, #2 14 - bne 1b 15 - 16 - mcr p14, 0, r0, c1, c0, 0 17 - mov pc, r14
···
+14 -1
arch/arm/boot/compressed/misc.c
··· 30 #include <asm/arch/uncompress.h> 31 32 #ifdef CONFIG_DEBUG_ICEDCC 33 - extern void icedcc_putc(int ch); 34 #define putc(ch) icedcc_putc(ch) 35 #define flush() do { } while (0) 36 #endif
··· 30 #include <asm/arch/uncompress.h> 31 32 #ifdef CONFIG_DEBUG_ICEDCC 33 + static void icedcc_putc(int ch) 34 + { 35 + int status, i = 0x4000000; 36 + 37 + do { 38 + if (--i < 0) 39 + return; 40 + 41 + asm("mrc p14, 0, %0, c0, c0, 0" : "=r" (status)); 42 + } while (status & 2); 43 + 44 + asm("mcr p15, 0, %0, c1, c0, 0" : : "r" (ch)); 45 + } 46 + 47 #define putc(ch) icedcc_putc(ch) 48 #define flush() do { } while (0) 49 #endif