Commit | Line | Data |
---|---|---|
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 |
4e6d488a | 23 | .macro addruart, rx, tmp |
3042102a BS |
24 | @ see if the MMU is enabled and select appropriate base address |
25 | mrc p15, 0, \rx, c1, c0 | |
26 | tst \rx, #1 | |
6339f669 PM |
27 | ldreq \rx, =MSM_DEBUG_UART_PHYS |
28 | ldrne \rx, =MSM_DEBUG_UART_BASE | |
3042102a BS |
29 | .endm |
30 | ||
31 | .macro senduart,rd,rx | |
bcc0f6af BS |
32 | teq \rx, #0 |
33 | strne \rd, [\rx, #0x0C] | |
3042102a BS |
34 | .endm |
35 | ||
36 | .macro waituart,rd,rx | |
37 | @ wait for TX_READY | |
6339f669 | 38 | 1001: ldr \rd, [\rx, #0x08] |
3042102a | 39 | tst \rd, #0x04 |
6339f669 PM |
40 | beq 1001b |
41 | .endm | |
42 | #else | |
4e6d488a | 43 | .macro addruart, rx, tmp |
6339f669 PM |
44 | .endm |
45 | ||
46 | .macro senduart,rd,rx | |
47 | .endm | |
48 | ||
49 | .macro waituart,rd,rx | |
3042102a | 50 | .endm |
6339f669 | 51 | #endif |
3042102a BS |
52 | |
53 | .macro busyuart,rd,rx | |
54 | .endm |