Skip to content

Commit 200b7a8

Browse files
tmlindRussell King
authored andcommitted
ARM: 5884/1: arm: Fix DCC console for v7
Without this patch arch/arm/compressed/head.S defaults to generic DCC code that does not work for v7. For more information on the v7 DCC, see Cortex-A8 TRM "12.11.1 Debug communications channel". To use it with post 2.6.33-rc1 or later, you need to have: CONFIG_DEBUG_LL=y ONFIG_DEBUG_ICEDCC=y CONFIG_EARLY_PRINTK=y Earlier kernels need commit 93fd03a backported. Tested on omap3430. Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
1 parent a7b2296 commit 200b7a8

3 files changed

Lines changed: 40 additions & 0 deletions

File tree

‎arch/arm/boot/compressed/head.S‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,14 @@
2727
.macro writeb, ch, rb
2828
mcr p14, 0, \ch, c0, c5, 0
2929
.endm
30+
#elif defined(CONFIG_CPU_V7)
31+
.macro loadsp, rb
32+
.endm
33+
.macro writeb, ch, rb
34+
wait: mrc p14, 0, pc, c0, c1, 0
35+
bcs wait
36+
mcr p14, 0, \ch, c0, c5, 0
37+
.endm
3038
#elif defined(CONFIG_CPU_XSCALE)
3139
.macro loadsp, rb
3240
.endm

‎arch/arm/boot/compressed/misc.c‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,18 @@ static void icedcc_putc(int ch)
5353

5454
asm("mcr p14, 0, %0, c0, c5, 0" : : "r" (ch));
5555
}
56+
57+
#elif defined(CONFIG_CPU_V7)
58+
59+
static void icedcc_putc(int ch)
60+
{
61+
asm(
62+
"wait: mrc p14, 0, pc, c0, c1, 0 \n\
63+
bcs wait \n\
64+
mcr p14, 0, %0, c0, c5, 0 "
65+
: : "r" (ch));
66+
}
67+
5668
#elif defined(CONFIG_CPU_XSCALE)
5769

5870
static void icedcc_putc(int ch)

‎arch/arm/kernel/debug.S‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,26 @@
4949
1002:
5050
.endm
5151

52+
#elif defined(CONFIG_CPU_V7)
53+
54+
.macro addruart, rx
55+
.endm
56+
57+
.macro senduart, rd, rx
58+
mcr p14, 0, \rd, c0, c5, 0
59+
.endm
60+
61+
.macro busyuart, rd, rx
62+
busy: mrc p14, 0, pc, c0, c1, 0
63+
bcs busy
64+
.endm
65+
66+
.macro waituart, rd, rx
67+
wait: mrc p14, 0, pc, c0, c1, 0
68+
bcs wait
69+
70+
.endm
71+
5272
#elif defined(CONFIG_CPU_XSCALE)
5373

5474
.macro addruart, rx

0 commit comments

Comments
 (0)