MOXA linux-2.6.x / linux-2.6.19-uc1 from UC-7110-LX-BOOTLOADER-1.9_VERSION-4.2.tgz
[linux-2.6.19-moxart.git] / include / asm-arm / arch-ks8695 / debug-macro.S
blob0b341c2007bdb4959d2182e8fc2796efe7364ca9
1 /*
2  * linux/include/asm-arm/arch-ks8695/debug-macro.S
3  *
4  * Debugging macro include header
5  *
6  *  Copyright (C) 1994-1999 Russell King
7  *  Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
8  *  (C) Copyright 2006 Greg Ungerer <gerg@snapgear.com>
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License version 2 as
12  * published by the Free Software Foundation.
13  */
15 .macro addruart,rx
16         mrc     p15, 0, \rx, c1, c0
17         tst     \rx, #1                 @ MMU enabled?
18         moveq   \rx, #0x03000000        @ 0x03ffe000
19         orreq   \rx, \rx, #0x00ff0000
20         movne   \rx, #0xff000000        @ 0xff00e000
21         orr     \rx, \rx, #0x0000e000
22 .endm
24 .macro senduart,rd,rx
25         str     \rd, [\rx, #0x4]
26 .endm
28 .macro waituart,rd,rx
29 1:      ldr     \rd, [\rx, #0x14]
30         and     \rd, \rd, #0x40         @ check TEMT bit
31         teq     \rd, #0x40
32         bne     1b
33 .endm
35 .macro busyuart,rd,rx
36 .endm