summaryrefslogtreecommitdiff
path: root/arch/arm/boot/compressed/misc.c
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2006-09-20 12:03:34 (GMT)
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-09-25 09:36:09 (GMT)
commit7d95ded91149564100a3181d341361aedcfd5bf5 (patch)
tree5be7882a7cc3f3c646f12c2c60cb7a689d46d0ba /arch/arm/boot/compressed/misc.c
parentbaf97ce6eda5891ee45fae9c1b06db855bb697e1 (diff)
downloadlinux-fsl-qoriq-7d95ded91149564100a3181d341361aedcfd5bf5.tar.xz
[ARM] 3838/1: ARM: DCC debug console support for ARM11
Adds support for CONFIG_DEBUG_ICEDCC for ARM11. Tested on ARM1136 (OMAP2420). Signed-off-by: Tony Lindgren <tony@atomide.com> 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.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/arm/boot/compressed/misc.c b/arch/arm/boot/compressed/misc.c
index ace3fb58..283891c 100644
--- a/arch/arm/boot/compressed/misc.c
+++ b/arch/arm/boot/compressed/misc.c
@@ -30,6 +30,25 @@ static void putstr(const char *ptr);
#include <asm/arch/uncompress.h>
#ifdef CONFIG_DEBUG_ICEDCC
+
+#ifdef CONFIG_CPU_V6
+
+static void icedcc_putc(int ch)
+{
+ int status, i = 0x4000000;
+
+ do {
+ if (--i < 0)
+ return;
+
+ asm volatile ("mrc p14, 0, %0, c0, c1, 0" : "=r" (status));
+ } while (status & (1 << 29));
+
+ asm("mcr p14, 0, %0, c0, c5, 0" : : "r" (ch));
+}
+
+#else
+
static void icedcc_putc(int ch)
{
int status, i = 0x4000000;
@@ -44,6 +63,8 @@ static void icedcc_putc(int ch)
asm("mcr p14, 0, %0, c1, c0, 0" : : "r" (ch));
}
+#endif
+
#define putc(ch) icedcc_putc(ch)
#define flush() do { } while (0)
#endif