diff options
Diffstat (limited to 'arch/arm/kernel/debug.S')
| -rw-r--r-- | arch/arm/kernel/debug.S | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/arch/arm/kernel/debug.S b/arch/arm/kernel/debug.S index a5747e58a9dc..5617566477b4 100644 --- a/arch/arm/kernel/debug.S +++ b/arch/arm/kernel/debug.S | |||
| @@ -21,6 +21,36 @@ | |||
| 21 | 21 | ||
| 22 | #if defined(CONFIG_DEBUG_ICEDCC) | 22 | #if defined(CONFIG_DEBUG_ICEDCC) |
| 23 | @@ debug using ARM EmbeddedICE DCC channel | 23 | @@ debug using ARM EmbeddedICE DCC channel |
| 24 | |||
| 25 | #if defined(CONFIG_CPU_V6) | ||
| 26 | |||
| 27 | .macro addruart, rx | ||
| 28 | .endm | ||
| 29 | |||
| 30 | .macro senduart, rd, rx | ||
| 31 | mcr p14, 0, \rd, c0, c5, 0 | ||
| 32 | .endm | ||
| 33 | |||
| 34 | .macro busyuart, rd, rx | ||
| 35 | 1001: | ||
| 36 | mrc p14, 0, \rx, c0, c1, 0 | ||
| 37 | tst \rx, #0x20000000 | ||
| 38 | beq 1001b | ||
| 39 | .endm | ||
| 40 | |||
| 41 | .macro waituart, rd, rx | ||
| 42 | mov \rd, #0x2000000 | ||
| 43 | 1001: | ||
| 44 | subs \rd, \rd, #1 | ||
| 45 | bmi 1002f | ||
| 46 | mrc p14, 0, \rx, c0, c1, 0 | ||
| 47 | tst \rx, #0x20000000 | ||
| 48 | bne 1001b | ||
| 49 | 1002: | ||
| 50 | .endm | ||
| 51 | |||
| 52 | #else | ||
| 53 | |||
| 24 | .macro addruart, rx | 54 | .macro addruart, rx |
| 25 | .endm | 55 | .endm |
| 26 | 56 | ||
| @@ -46,9 +76,12 @@ | |||
| 46 | bne 1001b | 76 | bne 1001b |
| 47 | 1002: | 77 | 1002: |
| 48 | .endm | 78 | .endm |
| 79 | |||
| 80 | #endif /* CONFIG_CPU_V6 */ | ||
| 81 | |||
| 49 | #else | 82 | #else |
| 50 | #include <asm/arch/debug-macro.S> | 83 | #include <asm/arch/debug-macro.S> |
| 51 | #endif | 84 | #endif /* CONFIG_DEBUG_ICEDCC */ |
| 52 | 85 | ||
| 53 | /* | 86 | /* |
| 54 | * Useful debugging routines | 87 | * Useful debugging routines |
