]> bbs.cooldavid.org Git - net-next-2.6.git/blame - arch/arm/mach-msm/include/mach/debug-macro.S
arm: return both physical and virtual addresses from addruart
[net-next-2.6.git] / arch / arm / mach-msm / include / mach / debug-macro.S
CommitLineData
a09e64fb 1/* arch/arm/mach-msm7200/include/mach/debug-macro.S
3042102a
BS
2 *
3 * Copyright (C) 2007 Google, Inc.
4 * Author: Brian Swetland <swetland@google.com>
5 *
6 * This software is licensed under the terms of the GNU General Public
7 * License version 2, as published by the Free Software Foundation, and
8 * may be copied, distributed, and modified under those terms.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 */
16
6339f669
PM
17
18
a09e64fb
RK
19#include <mach/hardware.h>
20#include <mach/msm_iomap.h>
3042102a 21
46fe5f29 22#ifdef CONFIG_HAS_MSM_DEBUG_UART_PHYS
0ea12930
JK
23 .macro addruart, rp, rv
24 ldr \rp, =MSM_DEBUG_UART_PHYS
25 ldr \rv, =MSM_DEBUG_UART_BASE
3042102a
BS
26 .endm
27
28 .macro senduart,rd,rx
bcc0f6af
BS
29 teq \rx, #0
30 strne \rd, [\rx, #0x0C]
3042102a
BS
31 .endm
32
33 .macro waituart,rd,rx
34 @ wait for TX_READY
6339f669 351001: ldr \rd, [\rx, #0x08]
3042102a 36 tst \rd, #0x04
6339f669
PM
37 beq 1001b
38 .endm
3042102a
BS
39
40 .macro busyuart,rd,rx
41 .endm
0ea12930 42#endif