Skip to content

Commit c633c3c

Browse files
plagniojRussell King
authored andcommitted
[ARM] 5412/1: XSCALE: add ice dcc support
SCALE: add ice dcc support Tested on the ixp425 with the ice PEEDI Ack-by: Eric Miao <eric.miao@marvell.com> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
1 parent 22b61a1 commit c633c3c

4 files changed

Lines changed: 49 additions & 1 deletion

File tree

‎arch/arm/Kconfig.debug‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ config DEBUG_ICEDCC
7777
Say Y here if you want the debug print routines to direct their
7878
output to the EmbeddedICE macrocell's DCC channel using
7979
co-processor 14. This is known to work on the ARM9 style ICE
80-
channel.
80+
channel and on the XScale with the PEEDI.
8181

8282
It does include a timeout to ensure that the system does not
8383
totally freeze when there is nothing connected to read.

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@
2727
.macro writeb, ch, rb
2828
mcr p14, 0, \ch, c0, c5, 0
2929
.endm
30+
#elif defined(CONFIG_CPU_XSCALE)
31+
.macro loadsp, rb
32+
.endm
33+
.macro writeb, ch, rb
34+
mcr p14, 0, \ch, c8, c0, 0
35+
.endm
3036
#else
3137
.macro loadsp, rb
3238
.endm

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,21 @@ static void icedcc_putc(int ch)
4646

4747
asm("mcr p14, 0, %0, c0, c5, 0" : : "r" (ch));
4848
}
49+
#elif defined(CONFIG_CPU_XSCALE)
50+
51+
static void icedcc_putc(int ch)
52+
{
53+
int status, i = 0x4000000;
54+
55+
do {
56+
if (--i < 0)
57+
return;
58+
59+
asm volatile ("mrc p14, 0, %0, c14, c0, 0" : "=r" (status));
60+
} while (status & (1 << 28));
61+
62+
asm("mcr p14, 0, %0, c8, c0, 0" : : "r" (ch));
63+
}
4964

5065
#else
5166

‎arch/arm/kernel/debug.S‎

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

52+
#elif defined(CONFIG_CPU_XSCALE)
53+
54+
.macro addruart, rx
55+
.endm
56+
57+
.macro senduart, rd, rx
58+
mcr p14, 0, \rd, c8, c0, 0
59+
.endm
60+
61+
.macro busyuart, rd, rx
62+
1001:
63+
mrc p14, 0, \rx, c14, c0, 0
64+
tst \rx, #0x10000000
65+
beq 1001b
66+
.endm
67+
68+
.macro waituart, rd, rx
69+
mov \rd, #0x10000000
70+
1001:
71+
subs \rd, \rd, #1
72+
bmi 1002f
73+
mrc p14, 0, \rx, c14, c0, 0
74+
tst \rx, #0x10000000
75+
bne 1001b
76+
1002:
77+
.endm
78+
5279
#else
5380

5481
.macro addruart, rx

0 commit comments

Comments
 (0)