Add i.MX25 support
[deliverable/linux.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 #ifdef CONFIG_ARCH_MX1
15 #include <mach/mx1.h>
16 #define UART_PADDR UART1_BASE_ADDR
17 #define UART_VADDR IO_ADDRESS(UART1_BASE_ADDR)
18 #endif
19
20 #ifdef CONFIG_ARCH_MX25
21 #ifdef UART_PADDR
22 #error "CONFIG_DEBUG_LL is incompatible with multiple archs"
23 #endif
24 #include <mach/mx25.h>
25 #define UART_PADDR UART1_BASE_ADDR
26 #define UART_VADDR MX25_AIPS1_IO_ADDRESS(UART1_BASE_ADDR)
27 #endif
28
29 #ifdef CONFIG_ARCH_MX2
30 #ifdef UART_PADDR
31 #error "CONFIG_DEBUG_LL is incompatible with multiple archs"
32 #endif
33 #include <mach/mx2x.h>
34 #define UART_PADDR UART1_BASE_ADDR
35 #define UART_VADDR AIPI_IO_ADDRESS(UART1_BASE_ADDR)
36 #endif
37
38 #ifdef CONFIG_ARCH_MX3
39 #ifdef UART_PADDR
40 #error "CONFIG_DEBUG_LL is incompatible with multiple archs"
41 #endif
42 #include <mach/mx3x.h>
43 #define UART_PADDR UART1_BASE_ADDR
44 #define UART_VADDR AIPS1_IO_ADDRESS(UART1_BASE_ADDR)
45 #endif
46
47 .macro addruart,rx
48 mrc p15, 0, \rx, c1, c0
49 tst \rx, #1 @ MMU enabled?
50 ldreq \rx, =UART_PADDR @ physical
51 ldrne \rx, =UART_VADDR @ virtual
52 .endm
53
54 .macro senduart,rd,rx
55 str \rd, [\rx, #0x40] @ TXDATA
56 .endm
57
58 .macro waituart,rd,rx
59 .endm
60
61 .macro busyuart,rd,rx
62 1002: ldr \rd, [\rx, #0x98] @ SR2
63 tst \rd, #1 << 3 @ TXDC
64 beq 1002b @ wait until transmit done
65 .endm
This page took 0.033099 seconds and 5 git commands to generate.