7662f736e42be770b3e91d5b1ab5976696f0bf6e
[linux-2.6.git] / arch / arm / plat-tcc / include / mach / debug-macro.S
1 /*
2  * Copyright (C) 1994-1999 Russell King
3  * Copyright (C) 2008-2009 Telechips
4  * Copyright (C) 2009 Hans J. Koch <hjk@linutronix.de>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation.
9  *
10  */
11
12                 .macro  addruart, rp, rv
13                 moveq   \rp, #0x90000000        @ physical base address
14                 movne   \rv, #0xF1000000        @ virtual base
15                 orr     \rp, \rp, #0x00007000   @ UART0
16                 orr     \rv, \rv, #0x00007000   @ UART0
17                 .endm
18
19                 .macro  senduart,rd,rx
20                 strb    \rd, [\rx, #0x44]
21                 .endm
22
23                 .macro  waituart,rd,rx
24                 .endm
25
26                 .macro  busyuart,rd,rx
27 1001:
28                 ldr \rd, [\rx, #0x14]
29                 tst \rd, #0x20
30
31                 beq 1001b
32                 .endm