]>
Commit | Line | Data |
---|---|---|
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 | */ | |
4e41db87 | 13 | #define IMX_NEEDS_DEPRECATED_SYMBOLS |
4bc25650 | 14 | |
ccc1a6f8 SH |
15 | #ifdef CONFIG_ARCH_MX1 |
16 | #include <mach/mx1.h> | |
17 | #define UART_PADDR UART1_BASE_ADDR | |
18 | #define UART_VADDR IO_ADDRESS(UART1_BASE_ADDR) | |
1553a1ec | 19 | #endif |
ccc1a6f8 | 20 | |
8c25c36f SH |
21 | #ifdef CONFIG_ARCH_MX25 |
22 | #ifdef UART_PADDR | |
23 | #error "CONFIG_DEBUG_LL is incompatible with multiple archs" | |
24 | #endif | |
25 | #include <mach/mx25.h> | |
7e688f0d EB |
26 | #define UART_PADDR MX25_UART1_BASE_ADDR |
27 | #define UART_VADDR MX25_AIPS1_IO_ADDRESS(MX25_UART1_BASE_ADDR) | |
8c25c36f SH |
28 | #endif |
29 | ||
ccc1a6f8 SH |
30 | #ifdef CONFIG_ARCH_MX2 |
31 | #ifdef UART_PADDR | |
32 | #error "CONFIG_DEBUG_LL is incompatible with multiple archs" | |
5e9145ed | 33 | #endif |
ccc1a6f8 SH |
34 | #include <mach/mx2x.h> |
35 | #define UART_PADDR UART1_BASE_ADDR | |
36 | #define UART_VADDR AIPI_IO_ADDRESS(UART1_BASE_ADDR) | |
aefa1c6e | 37 | #endif |
ccc1a6f8 SH |
38 | |
39 | #ifdef CONFIG_ARCH_MX3 | |
40 | #ifdef UART_PADDR | |
41 | #error "CONFIG_DEBUG_LL is incompatible with multiple archs" | |
8c032ec3 | 42 | #endif |
ccc1a6f8 SH |
43 | #include <mach/mx3x.h> |
44 | #define UART_PADDR UART1_BASE_ADDR | |
45 | #define UART_VADDR AIPS1_IO_ADDRESS(UART1_BASE_ADDR) | |
80eedae6 | 46 | #endif |
ccc1a6f8 | 47 | |
438caa3f AK |
48 | #ifdef CONFIG_ARCH_MX5 |
49 | #ifdef UART_PADDR | |
50 | #error "CONFIG_DEBUG_LL is incompatible with multiple archs" | |
51 | #endif | |
52 | #include <mach/mx51.h> | |
53 | #define UART_PADDR MX51_UART1_BASE_ADDR | |
54 | #define UART_VADDR MX51_AIPS1_IO_ADDRESS(MX51_UART1_BASE_ADDR) | |
55 | #endif | |
56 | ||
fd6ac7bb DT |
57 | #ifdef CONFIG_ARCH_MXC91231 |
58 | #ifdef UART_PADDR | |
59 | #error "CONFIG_DEBUG_LL is incompatible with multiple archs" | |
60 | #endif | |
61 | #include <mach/mxc91231.h> | |
62 | #define UART_PADDR MXC91231_UART2_BASE_ADDR | |
9ea07ec0 | 63 | #define UART_VADDR MXC91231_IO_ADDRESS(MXC91231_UART2_BASE_ADDR) |
fd6ac7bb | 64 | #endif |
0ea12930 JK |
65 | .macro addruart, rp, rv |
66 | ldr \rp, =UART_PADDR @ physical | |
67 | ldr \rv, =UART_VADDR @ virtual | |
4bc25650 SH |
68 | .endm |
69 | ||
70 | .macro senduart,rd,rx | |
71 | str \rd, [\rx, #0x40] @ TXDATA | |
72 | .endm | |
73 | ||
74 | .macro waituart,rd,rx | |
75 | .endm | |
76 | ||
77 | .macro busyuart,rd,rx | |
78 | 1002: ldr \rd, [\rx, #0x98] @ SR2 | |
79 | tst \rd, #1 << 3 @ TXDC | |
80 | beq 1002b @ wait until transmit done | |
81 | .endm |