Stephen Boyd | 650e3f0 | 2011-11-08 10:33:03 -0800 | [diff] [blame^] | 1 | /* |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 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 | |
| 17 | #include <mach/hardware.h> |
| 18 | #include <mach/msm_iomap.h> |
| 19 | |
Nicolas Pitre | 639da5e | 2011-08-31 22:55:46 -0400 | [diff] [blame] | 20 | .macro addruart, rp, rv, tmp |
Stephen Boyd | 650e3f0 | 2011-11-08 10:33:03 -0800 | [diff] [blame^] | 21 | #ifdef MSM_DEBUG_UART_PHYS |
Jeremy Kerr | 0ea1293 | 2010-07-06 18:30:06 +0800 | [diff] [blame] | 22 | ldr \rp, =MSM_DEBUG_UART_PHYS |
| 23 | ldr \rv, =MSM_DEBUG_UART_BASE |
Stephen Boyd | 650e3f0 | 2011-11-08 10:33:03 -0800 | [diff] [blame^] | 24 | #endif |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 25 | .endm |
| 26 | |
| 27 | .macro senduart,rd,rx |
Brian Swetland | bcc0f6a | 2008-09-10 14:00:53 -0700 | [diff] [blame] | 28 | teq \rx, #0 |
| 29 | strne \rd, [\rx, #0x0C] |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 30 | .endm |
| 31 | |
| 32 | .macro waituart,rd,rx |
| 33 | @ wait for TX_READY |
Pavel Machek | 6339f66 | 2009-11-02 11:48:29 +0100 | [diff] [blame] | 34 | 1001: ldr \rd, [\rx, #0x08] |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 35 | tst \rd, #0x04 |
Pavel Machek | 6339f66 | 2009-11-02 11:48:29 +0100 | [diff] [blame] | 36 | beq 1001b |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 37 | .endm |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 38 | |
| 39 | .macro busyuart,rd,rx |
| 40 | .endm |