Commit | Line | Data |
---|---|---|
4bc25650 SH |
1 | /* linux/include/asm-arm/arch-imx/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 <asm/arch/hardware.h> | |
15 | ||
16 | #ifdef CONFIG_MACH_MX31ADS | |
17 | #include <asm/arch/board-mx31ads.h> | |
ce8ffef0 SH |
18 | #endif |
19 | #ifdef CONFIG_MACH_PCM037 | |
20 | #include <asm/arch/board-pcm037.h> | |
9a4cd7a5 DM |
21 | #endif |
22 | #ifdef CONFIG_MACH_MX31LITE | |
23 | #include <asm/arch/board-mx31lite.h> | |
4bc25650 SH |
24 | #endif |
25 | ||
26 | .macro addruart,rx | |
27 | mrc p15, 0, \rx, c1, c0 | |
28 | tst \rx, #1 @ MMU enabled? | |
29 | ldreq \rx, =MXC_LL_UART_PADDR @ physical | |
30 | ldrne \rx, =MXC_LL_UART_VADDR @ virtual | |
31 | .endm | |
32 | ||
33 | .macro senduart,rd,rx | |
34 | str \rd, [\rx, #0x40] @ TXDATA | |
35 | .endm | |
36 | ||
37 | .macro waituart,rd,rx | |
38 | .endm | |
39 | ||
40 | .macro busyuart,rd,rx | |
41 | 1002: ldr \rd, [\rx, #0x98] @ SR2 | |
42 | tst \rd, #1 << 3 @ TXDC | |
43 | beq 1002b @ wait until transmit done | |
44 | .endm |