diff options
Diffstat (limited to 'arch/arm/boot/compressed/debug.S')
-rw-r--r-- | arch/arm/boot/compressed/debug.S | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/arch/arm/boot/compressed/debug.S b/arch/arm/boot/compressed/debug.S index 6e8382d5b7a4..5392ee63338f 100644 --- a/arch/arm/boot/compressed/debug.S +++ b/arch/arm/boot/compressed/debug.S | |||
@@ -1,6 +1,8 @@ | |||
1 | #include <linux/linkage.h> | 1 | #include <linux/linkage.h> |
2 | #include <asm/assembler.h> | 2 | #include <asm/assembler.h> |
3 | 3 | ||
4 | #ifndef CONFIG_DEBUG_SEMIHOSTING | ||
5 | |||
4 | #include CONFIG_DEBUG_LL_INCLUDE | 6 | #include CONFIG_DEBUG_LL_INCLUDE |
5 | 7 | ||
6 | ENTRY(putc) | 8 | ENTRY(putc) |
@@ -10,3 +12,29 @@ ENTRY(putc) | |||
10 | busyuart r3, r1 | 12 | busyuart r3, r1 |
11 | mov pc, lr | 13 | mov pc, lr |
12 | ENDPROC(putc) | 14 | ENDPROC(putc) |
15 | |||
16 | #else | ||
17 | |||
18 | ENTRY(putc) | ||
19 | adr r1, 1f | ||
20 | ldmia r1, {r2, r3} | ||
21 | add r2, r2, r1 | ||
22 | ldr r1, [r2, r3] | ||
23 | strb r0, [r1] | ||
24 | mov r0, #0x03 @ SYS_WRITEC | ||
25 | ARM( svc #0x123456 ) | ||
26 | THUMB( svc #0xab ) | ||
27 | mov pc, lr | ||
28 | .align 2 | ||
29 | 1: .word _GLOBAL_OFFSET_TABLE_ - . | ||
30 | .word semi_writec_buf(GOT) | ||
31 | ENDPROC(putc) | ||
32 | |||
33 | .bss | ||
34 | .global semi_writec_buf | ||
35 | .type semi_writec_buf, %object | ||
36 | semi_writec_buf: | ||
37 | .space 4 | ||
38 | .size semi_writec_buf, 4 | ||
39 | |||
40 | #endif | ||