Merge branch 'fixes' of git://git.armlinux.org.uk/~rmk/linux-arm
[muen/linux.git] / arch / arm / boot / compressed / debug.S
1 #include <linux/linkage.h>
2 #include <asm/assembler.h>
3
4 #ifndef CONFIG_DEBUG_SEMIHOSTING
5
6 #include CONFIG_DEBUG_LL_INCLUDE
7
8 ENTRY(putc)
9         addruart r1, r2, r3
10         waituart r3, r1
11         senduart r0, r1
12         busyuart r3, r1
13         mov      pc, lr
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 #ifdef CONFIG_CPU_V7M
27  THUMB( bkpt    #0xab           )
28 #else
29  THUMB( svc     #0xab           )
30 #endif
31         mov     pc, lr
32         .align  2
33 1:      .word   _GLOBAL_OFFSET_TABLE_ - .
34         .word   semi_writec_buf(GOT)
35 ENDPROC(putc)
36
37         .bss
38         .global semi_writec_buf
39         .type   semi_writec_buf, %object
40 semi_writec_buf:
41         .space  4
42         .size   semi_writec_buf, 4
43
44 #endif