1 /* arch/arm/mach-imx/include/mach/debug-macro.S
3 * Debugging macro include header
5 * Copyright (C) 1994-1999 Russell King
6 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
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.
13 #include <mach/hardware.h>
15 #ifdef CONFIG_ARCH_MX1
16 #define UART_PADDR MX1_UART1_BASE_ADDR
19 #ifdef CONFIG_ARCH_MX25
21 #error "CONFIG_DEBUG_LL is incompatible with multiple archs"
23 #define UART_PADDR MX25_UART1_BASE_ADDR
26 #ifdef CONFIG_ARCH_MX2
28 #error "CONFIG_DEBUG_LL is incompatible with multiple archs"
30 #define UART_PADDR MX2x_UART1_BASE_ADDR
33 #ifdef CONFIG_ARCH_MX3
35 #error "CONFIG_DEBUG_LL is incompatible with multiple archs"
37 #define UART_PADDR MX3x_UART1_BASE_ADDR
40 #ifdef CONFIG_ARCH_MX5
42 #error "CONFIG_DEBUG_LL is incompatible with multiple archs"
44 #define UART_PADDR MX51_UART1_BASE_ADDR
47 #ifdef CONFIG_ARCH_MXC91231
49 #error "CONFIG_DEBUG_LL is incompatible with multiple archs"
51 #define UART_PADDR MXC91231_UART2_BASE_ADDR
54 #define UART_VADDR IMX_IO_ADDRESS(UART_PADDR)
56 .macro addruart, rp, rv
57 ldr \rp, =UART_PADDR @ physical
58 ldr \rv, =UART_VADDR @ virtual
62 str \rd, [\rx, #0x40] @ TXDATA
69 1002: ldr \rd, [\rx, #0x98] @ SR2
70 tst \rd, #1 << 3 @ TXDC
71 beq 1002b @ wait until transmit done