Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6
[pandora-kernel.git] / arch / arm / plat-stmp3xxx / include / mach / debug-macro.S
1 /*
2  * Debugging macro include header
3  *
4  * Embedded Alley Solutions, Inc <source@embeddedalley.com>
5  *
6  * Copyright 2008 Freescale Semiconductor, Inc. All Rights Reserved.
7  * Copyright 2008 Embedded Alley Solutions, Inc All Rights Reserved.
8  */
9
10 /*
11  * The code contained herein is licensed under the GNU General Public
12  * License. You may obtain a copy of the GNU General Public License
13  * Version 2 or later at the following locations:
14  *
15  * http://www.opensource.org/licenses/gpl-license.html
16  * http://www.gnu.org/copyleft/gpl.html
17  */
18
19                 .macro  addruart, rp, rv
20                 mov     \rp,      #0x00070000
21                 add     \rv, \rp, #0xf0000000   @ virtual base
22                 add     \rp, \rp, #0x80000000   @ physical base
23                 .endm
24
25                 .macro  senduart,rd,rx
26                 strb    \rd, [\rx, #0]          @ data register at 0
27                 .endm
28
29                 .macro  waituart,rd,rx
30 1001:           ldr     \rd, [\rx, #0x18]       @ UARTFLG
31                 tst     \rd, #1 << 5            @ UARTFLGUTXFF - 1 when full
32                 bne     1001b
33                 .endm
34
35                 .macro  busyuart,rd,rx
36 1001:           ldr     \rd, [\rx, #0x18]       @ UARTFLG
37                 tst     \rd, #1 << 3            @ UARTFLGUBUSY - 1 when busy
38                 bne     1001b
39                 .endm