blob: 5c3cc29688ab6df97e3002df05748a951b8036ae [file] [log] [blame]
Eric Miao49cbe782009-01-20 14:15:18 +08001/* arch/arm/mach-mmp/include/mach/debug-macro.S
2 *
3 * Debugging macro include header
4 *
5 * Copied from arch/arm/mach-pxa/include/mach/debug.S
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11
Haojian Zhuangfa4cd2a2012-08-10 23:49:41 +080012#if defined(CONFIG_DEBUG_MMP_UART2)
13#define MMP_UART_OFFSET 0x00017000
14#elif defined(CONFIG_DEBUG_MMP_UART3)
15#define MMP_UART_OFFSET 0x00018000
16#else
17#error "Select uart for DEBUG_LL"
18#endif
19
Eric Miao49cbe782009-01-20 14:15:18 +080020#include <mach/addr-map.h>
21
Nicolas Pitre639da5e2011-08-31 22:55:46 -040022 .macro addruart, rp, rv, tmp
Jeremy Kerr0ea12932010-07-06 18:30:06 +080023 ldr \rp, =APB_PHYS_BASE @ physical
24 ldr \rv, =APB_VIRT_BASE @ virtual
Haojian Zhuangfa4cd2a2012-08-10 23:49:41 +080025 orr \rp, \rp, #MMP_UART_OFFSET
26 orr \rv, \rv, #MMP_UART_OFFSET
Eric Miao49cbe782009-01-20 14:15:18 +080027 .endm
28
29#define UART_SHIFT 2
30#include <asm/hardware/debug-8250.S>