]> bbs.cooldavid.org Git - net-next-2.6.git/blob - arch/arm/plat-tcc/include/mach/debug-macro.S
97537845df64f314abf35c3493b2ccd39c60bb47
[net-next-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,rx,tmp
13                 mrc     p15, 0, \rx, c1, c0
14                 tst     \rx, #1                 @ MMU enabled?
15                 moveq   \rx, #0x90000000        @ physical base address
16                 movne   \rx, #0xF1000000        @ virtual base
17                 orr     \rx, \rx, #0x00007000   @ UART0
18                 .endm
19
20                 .macro  senduart,rd,rx
21                 strb    \rd, [\rx, #0x44]
22                 .endm
23
24                 .macro  waituart,rd,rx
25                 .endm
26
27                 .macro  busyuart,rd,rx
28 1001:
29                 ldr \rd, [\rx, #0x14]
30                 tst \rd, #0x20
31
32                 beq 1001b
33                 .endm