[ARM] Move ice-dcc code into misc.c
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
committed by
Russell King
parent
a081568d70
commit
de4533a04e
@ -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
|
||||
|
Reference in New Issue
Block a user