blob: a9cac368bfe69f184c85ce7058ec29cfe10c83a2 [file] [log] [blame]
Russell Kinga09e64f2008-08-05 16:14:15 +01001/* arch/arm/mach-aaec2000/include/mach/debug-macro.S
2 *
3 * Debugging macro include header
4 *
5 * Copyright (c) 2005 Nicolas Bellido Y Ortega
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11
12#include "hardware.h"
Tony Lindgren4e6d4882010-02-01 23:26:53 +010013 .macro addruart, rx, tmp
Russell Kinga09e64f2008-08-05 16:14:15 +010014 mrc p15, 0, \rx, c1, c0
15 tst \rx, #1 @ MMU enabled?
16 moveq \rx, #0x80000000 @ physical
17 movne \rx, #io_p2v(0x80000000) @ virtual
18 orr \rx, \rx, #0x00000800
19 .endm
20
21 .macro senduart,rd,rx
22 str \rd, [\rx, #0]
23 .endm
24
25 .macro busyuart,rd,rx
261002: ldr \rd, [\rx, #0x10]
27 tst \rd, #(1 << 7)
28 beq 1002b
29 .endm
30
31 .macro waituart,rd,rx
32#if 0
331001: ldr \rd, [\rx, #0x10]
34 tst \rd, #(1 << 5)
35 beq 1001b
36#endif
37 .endm