Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 36615
b: refs/heads/master
c: 7d95ded
h: refs/heads/master
i:
  36613: e9dbf14
  36611: c1eb94d
  36607: 5f6cd71
v: v3
  • Loading branch information
Tony Lindgren authored and Russell King committed Sep 25, 2006
1 parent 0ae3ec8 commit 14d387d
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: baf97ce6eda5891ee45fae9c1b06db855bb697e1
refs/heads/master: 7d95ded91149564100a3181d341361aedcfd5bf5
10 changes: 10 additions & 0 deletions trunk/arch/arm/boot/compressed/head.S
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,21 @@
#ifdef DEBUG

#if defined(CONFIG_DEBUG_ICEDCC)

#ifdef CONFIG_CPU_V6
.macro loadsp, rb
.endm
.macro writeb, ch, rb
mcr p14, 0, \ch, c0, c5, 0
.endm
#else
.macro loadsp, rb
.endm
.macro writeb, ch, rb
mcr p14, 0, \ch, c0, c1, 0
.endm
#endif

#else

#include <asm/arch/debug-macro.S>
Expand Down
21 changes: 21 additions & 0 deletions trunk/arch/arm/boot/compressed/misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand Down
35 changes: 34 additions & 1 deletion trunk/arch/arm/kernel/debug.S
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,36 @@

#if defined(CONFIG_DEBUG_ICEDCC)
@@ debug using ARM EmbeddedICE DCC channel

#if defined(CONFIG_CPU_V6)

.macro addruart, rx
.endm

.macro senduart, rd, rx
mcr p14, 0, \rd, c0, c5, 0
.endm

.macro busyuart, rd, rx
1001:
mrc p14, 0, \rx, c0, c1, 0
tst \rx, #0x20000000
beq 1001b
.endm

.macro waituart, rd, rx
mov \rd, #0x2000000
1001:
subs \rd, \rd, #1
bmi 1002f
mrc p14, 0, \rx, c0, c1, 0
tst \rx, #0x20000000
bne 1001b
1002:
.endm

#else

.macro addruart, rx
.endm

Expand All @@ -46,9 +76,12 @@
bne 1001b
1002:
.endm

#endif /* CONFIG_CPU_V6 */

#else
#include <asm/arch/debug-macro.S>
#endif
#endif /* CONFIG_DEBUG_ICEDCC */

/*
* Useful debugging routines
Expand Down

0 comments on commit 14d387d

Please sign in to comment.