提交 200b7a8d 编写于 作者: T Tony Lindgren 提交者: Russell King

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 93fd03a8
backported.

Tested on omap3430.
Signed-off-by: NTony Lindgren <tony@atomide.com>
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
上级 a7b22962
...@@ -27,6 +27,14 @@ ...@@ -27,6 +27,14 @@
.macro writeb, ch, rb .macro writeb, ch, rb
mcr p14, 0, \ch, c0, c5, 0 mcr p14, 0, \ch, c0, c5, 0
.endm .endm
#elif defined(CONFIG_CPU_V7)
.macro loadsp, rb
.endm
.macro writeb, ch, rb
wait: mrc p14, 0, pc, c0, c1, 0
bcs wait
mcr p14, 0, \ch, c0, c5, 0
.endm
#elif defined(CONFIG_CPU_XSCALE) #elif defined(CONFIG_CPU_XSCALE)
.macro loadsp, rb .macro loadsp, rb
.endm .endm
......
...@@ -53,6 +53,18 @@ static void icedcc_putc(int ch) ...@@ -53,6 +53,18 @@ static void icedcc_putc(int ch)
asm("mcr p14, 0, %0, c0, c5, 0" : : "r" (ch)); asm("mcr p14, 0, %0, c0, c5, 0" : : "r" (ch));
} }
#elif defined(CONFIG_CPU_V7)
static void icedcc_putc(int ch)
{
asm(
"wait: mrc p14, 0, pc, c0, c1, 0 \n\
bcs wait \n\
mcr p14, 0, %0, c0, c5, 0 "
: : "r" (ch));
}
#elif defined(CONFIG_CPU_XSCALE) #elif defined(CONFIG_CPU_XSCALE)
static void icedcc_putc(int ch) static void icedcc_putc(int ch)
......
...@@ -49,6 +49,26 @@ ...@@ -49,6 +49,26 @@
1002: 1002:
.endm .endm
#elif defined(CONFIG_CPU_V7)
.macro addruart, rx
.endm
.macro senduart, rd, rx
mcr p14, 0, \rd, c0, c5, 0
.endm
.macro busyuart, rd, rx
busy: mrc p14, 0, pc, c0, c1, 0
bcs busy
.endm
.macro waituart, rd, rx
wait: mrc p14, 0, pc, c0, c1, 0
bcs wait
.endm
#elif defined(CONFIG_CPU_XSCALE) #elif defined(CONFIG_CPU_XSCALE)
.macro addruart, rx .macro addruart, rx
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册