blob: db1f22830d645d6ca86e6fef2e01411ebdf60728 [file] [log] [blame]
Stephen Boyd650e3f02011-11-08 10:33:03 -08001/*
Russell Kinga09e64f2008-08-05 16:14:15 +01002 *
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
17#include <mach/hardware.h>
18#include <mach/msm_iomap.h>
19
Nicolas Pitre639da5e2011-08-31 22:55:46 -040020 .macro addruart, rp, rv, tmp
Stephen Boyd650e3f02011-11-08 10:33:03 -080021#ifdef MSM_DEBUG_UART_PHYS
Jeremy Kerr0ea12932010-07-06 18:30:06 +080022 ldr \rp, =MSM_DEBUG_UART_PHYS
23 ldr \rv, =MSM_DEBUG_UART_BASE
Stephen Boyd650e3f02011-11-08 10:33:03 -080024#endif
Russell Kinga09e64f2008-08-05 16:14:15 +010025 .endm
26
27 .macro senduart,rd,rx
Brian Swetlandbcc0f6a2008-09-10 14:00:53 -070028 teq \rx, #0
29 strne \rd, [\rx, #0x0C]
Russell Kinga09e64f2008-08-05 16:14:15 +010030 .endm
31
32 .macro waituart,rd,rx
33 @ wait for TX_READY
Pavel Machek6339f662009-11-02 11:48:29 +0100341001: ldr \rd, [\rx, #0x08]
Russell Kinga09e64f2008-08-05 16:14:15 +010035 tst \rd, #0x04
Pavel Machek6339f662009-11-02 11:48:29 +010036 beq 1001b
Russell Kinga09e64f2008-08-05 16:14:15 +010037 .endm
Russell Kinga09e64f2008-08-05 16:14:15 +010038
39 .macro busyuart,rd,rx
40 .endm