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.
14 #include <asm/assembler.h>
18 * FIXME: This is a copy of IMX_IO_P2V in hardware.h, and needs to
19 * stay sync with that. It's hard to maintain, and should be fixed
20 * globally for multi-platform build to use a fixed virtual address
21 * for low-level debug uart port across platforms.
23 #define IMX_IO_P2V(x) ( \
24 (((x) & 0x80000000) >> 7) | \
26 (((x) & 0x50000000) >> 6) + \
27 (((x) & 0x0b000000) >> 4) + \
28 (((x) & 0x000fffff))))
30 #define UART_VADDR IMX_IO_P2V(UART_PADDR)
32 .macro addruart, rp, rv, tmp
33 ldr \rp, =UART_PADDR @ physical
34 ldr \rv, =UART_VADDR @ virtual
39 str \rd, [\rx, #0x40] @ TXDATA
46 1002: ldr \rd, [\rx, #0x98] @ SR2
48 tst \rd, #1 << 3 @ TXDC
49 beq 1002b @ wait until transmit done