]> bbs.cooldavid.org Git - net-next-2.6.git/blob - arch/arm/plat-mxc/include/mach/debug-macro.S
57d3e3fccc6d37f187b24f865f409434601eb09f
[net-next-2.6.git] / arch / arm / plat-mxc / include / mach / debug-macro.S
1 /* arch/arm/mach-imx/include/mach/debug-macro.S
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
14 #include <mach/hardware.h>
15
16 #ifdef CONFIG_MACH_MX31ADS
17 #include <mach/board-mx31ads.h>
18 #endif
19 #ifdef CONFIG_MACH_PCM037
20 #include <mach/board-pcm037.h>
21 #endif
22 #ifdef CONFIG_MACH_MX31LITE
23 #include <mach/board-mx31lite.h>
24 #endif
25 #ifdef CONFIG_MACH_MX27ADS
26 #include <mach/board-mx27ads.h>
27 #endif
28 #ifdef CONFIG_MACH_MX21ADS
29 #include <mach/board-mx21ads.h>
30 #endif
31 #ifdef CONFIG_MACH_PCM038
32 #include <mach/board-pcm038.h>
33 #endif
34 #ifdef CONFIG_MACH_MX31_3DS
35 #include <mach/board-mx31pdk.h>
36 #endif
37 #ifdef CONFIG_MACH_QONG
38 #include <mach/board-qong.h>
39 #endif
40 #ifdef CONFIG_MACH_PCM043
41 #include <mach/board-pcm043.h>
42 #endif
43 #ifdef CONFIG_MACH_MX27_3DS
44 #include <mach/board-mx27pdk.h>
45 #endif
46 #ifdef CONFIG_MACH_ARMADILLO5X0
47 #include <mach/board-armadillo5x0.h>
48 #endif
49                 .macro  addruart,rx
50                 mrc     p15, 0, \rx, c1, c0
51                 tst     \rx, #1                 @ MMU enabled?
52                 ldreq   \rx, =MXC_LL_UART_PADDR @ physical
53                 ldrne   \rx, =MXC_LL_UART_VADDR @ virtual
54                 .endm
55
56                 .macro  senduart,rd,rx
57                 str     \rd, [\rx, #0x40]       @ TXDATA
58                 .endm
59
60                 .macro  waituart,rd,rx
61                 .endm
62
63                 .macro  busyuart,rd,rx
64 1002:           ldr     \rd, [\rx, #0x98]       @ SR2
65                 tst     \rd, #1 << 3            @ TXDC
66                 beq     1002b                   @ wait until transmit done
67                 .endm