Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 1 | /* arch/arm/mach-msm7200/include/mach/debug-macro.S |
| 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 | |
| 20 | .macro addruart,rx |
| 21 | @ see if the MMU is enabled and select appropriate base address |
| 22 | mrc p15, 0, \rx, c1, c0 |
| 23 | tst \rx, #1 |
| 24 | ldreq \rx, =MSM_UART1_PHYS |
Brian Swetland | bcc0f6a | 2008-09-10 14:00:53 -0700 | [diff] [blame] | 25 | movne \rx, #0 |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 26 | .endm |
| 27 | |
| 28 | .macro senduart,rd,rx |
Brian Swetland | bcc0f6a | 2008-09-10 14:00:53 -0700 | [diff] [blame] | 29 | teq \rx, #0 |
| 30 | strne \rd, [\rx, #0x0C] |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 31 | .endm |
| 32 | |
| 33 | .macro waituart,rd,rx |
| 34 | @ wait for TX_READY |
Brian Swetland | bcc0f6a | 2008-09-10 14:00:53 -0700 | [diff] [blame] | 35 | teq \rx, #0 |
| 36 | bne 2f |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 37 | 1: ldr \rd, [\rx, #0x08] |
| 38 | tst \rd, #0x04 |
| 39 | beq 1b |
Brian Swetland | bcc0f6a | 2008-09-10 14:00:53 -0700 | [diff] [blame] | 40 | 2: |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 41 | .endm |
| 42 | |
| 43 | .macro busyuart,rd,rx |
| 44 | .endm |