aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/boot
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2006-09-20 08:03:34 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-09-25 05:36:09 -0400
commit7d95ded91149564100a3181d341361aedcfd5bf5 (patch)
tree5be7882a7cc3f3c646f12c2c60cb7a689d46d0ba /arch/arm/boot
parentbaf97ce6eda5891ee45fae9c1b06db855bb697e1 (diff)
[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')
-rw-r--r--arch/arm/boot/compressed/head.S10
-rw-r--r--arch/arm/boot/compressed/misc.c21
2 files changed, 31 insertions, 0 deletions
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S
index 987c44160496..75df1f764a10 100644
--- a/arch/arm/boot/compressed/head.S
+++ b/arch/arm/boot/compressed/head.S
@@ -20,11 +20,21 @@
20#ifdef DEBUG 20#ifdef DEBUG
21 21
22#if defined(CONFIG_DEBUG_ICEDCC) 22#if defined(CONFIG_DEBUG_ICEDCC)
23
24#ifdef CONFIG_CPU_V6
25 .macro loadsp, rb
26 .endm
27 .macro writeb, ch, rb
28 mcr p14, 0, \ch, c0, c5, 0
29 .endm
30#else
23 .macro loadsp, rb 31 .macro loadsp, rb
24 .endm 32 .endm
25 .macro writeb, ch, rb 33 .macro writeb, ch, rb
26 mcr p14, 0, \ch, c0, c1, 0 34 mcr p14, 0, \ch, c0, c1, 0
27 .endm 35 .endm
36#endif
37
28#else 38#else
29 39
30#include <asm/arch/debug-macro.S> 40#include <asm/arch/debug-macro.S>
diff --git a/arch/arm/boot/compressed/misc.c b/arch/arm/boot/compressed/misc.c
index ace3fb5835d9..283891c736c4 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);
30#include <asm/arch/uncompress.h> 30#include <asm/arch/uncompress.h>
31 31
32#ifdef CONFIG_DEBUG_ICEDCC 32#ifdef CONFIG_DEBUG_ICEDCC
33
34#ifdef CONFIG_CPU_V6
35
36static void icedcc_putc(int ch)
37{
38 int status, i = 0x4000000;
39
40 do {
41 if (--i < 0)
42 return;
43
44 asm volatile ("mrc p14, 0, %0, c0, c1, 0" : "=r" (status));
45 } while (status & (1 << 29));
46
47 asm("mcr p14, 0, %0, c0, c5, 0" : : "r" (ch));
48}
49
50#else
51
33static void icedcc_putc(int ch) 52static void icedcc_putc(int ch)
34{ 53{
35 int status, i = 0x4000000; 54 int status, i = 0x4000000;
@@ -44,6 +63,8 @@ static void icedcc_putc(int ch)
44 asm("mcr p14, 0, %0, c1, c0, 0" : : "r" (ch)); 63 asm("mcr p14, 0, %0, c1, c0, 0" : : "r" (ch));
45} 64}
46 65
66#endif
67
47#define putc(ch) icedcc_putc(ch) 68#define putc(ch) icedcc_putc(ch)
48#define flush() do { } while (0) 69#define flush() do { } while (0)
49#endif 70#endif