Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
[linux-2.6-block.git] / arch / arm / plat-mxc / include / mach / debug-macro.S
CommitLineData
a09e64fb 1/* arch/arm/mach-imx/include/mach/debug-macro.S
4bc25650
SH
2 *
3 * Debugging macro include header
4 *
5 * Copyright (C) 1994-1999 Russell King
6 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12 */
13
a09e64fb 14#include <mach/hardware.h>
4bc25650
SH
15
16#ifdef CONFIG_MACH_MX31ADS
a09e64fb 17#include <mach/board-mx31ads.h>
ce8ffef0
SH
18#endif
19#ifdef CONFIG_MACH_PCM037
a09e64fb 20#include <mach/board-pcm037.h>
9a4cd7a5
DM
21#endif
22#ifdef CONFIG_MACH_MX31LITE
a09e64fb 23#include <mach/board-mx31lite.h>
4bc25650 24#endif
80eedae6 25#ifdef CONFIG_MACH_MX27ADS
a09e64fb 26#include <mach/board-mx27ads.h>
7e5e9f54
JB
27#endif
28#ifdef CONFIG_MACH_PCM038
a09e64fb 29#include <mach/board-pcm038.h>
1553a1ec
FE
30#endif
31#ifdef CONFIG_MACH_MX31_3DS
32#include <mach/board-mx31pdk.h>
80eedae6 33#endif
4bc25650
SH
34 .macro addruart,rx
35 mrc p15, 0, \rx, c1, c0
36 tst \rx, #1 @ MMU enabled?
37 ldreq \rx, =MXC_LL_UART_PADDR @ physical
38 ldrne \rx, =MXC_LL_UART_VADDR @ virtual
39 .endm
40
41 .macro senduart,rd,rx
42 str \rd, [\rx, #0x40] @ TXDATA
43 .endm
44
45 .macro waituart,rd,rx
46 .endm
47
48 .macro busyuart,rd,rx
491002: ldr \rd, [\rx, #0x98] @ SR2
50 tst \rd, #1 << 3 @ TXDC
51 beq 1002b @ wait until transmit done
52 .endm