Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
awilliam
GitHub Repository: awilliam/linux-vfio
Path: blob/master/arch/arm/mach-msm/include/mach/debug-macro.S
17466 views
1
/* arch/arm/mach-msm7200/include/mach/debug-macro.S
2
*
3
* Copyright (C) 2007 Google, Inc.
4
* Author: Brian Swetland <[email protected]>
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
18
19
#include <mach/hardware.h>
20
#include <mach/msm_iomap.h>
21
22
#if defined(CONFIG_HAS_MSM_DEBUG_UART_PHYS) && !defined(CONFIG_MSM_DEBUG_UART_NONE)
23
.macro addruart, rp, rv
24
ldr \rp, =MSM_DEBUG_UART_PHYS
25
ldr \rv, =MSM_DEBUG_UART_BASE
26
.endm
27
28
.macro senduart,rd,rx
29
teq \rx, #0
30
strne \rd, [\rx, #0x0C]
31
.endm
32
33
.macro waituart,rd,rx
34
@ wait for TX_READY
35
1001: ldr \rd, [\rx, #0x08]
36
tst \rd, #0x04
37
beq 1001b
38
.endm
39
#else
40
.macro addruart, rp, rv
41
mov \rv, #0xff000000
42
orr \rv, \rv, #0x00f00000
43
.endm
44
45
.macro senduart,rd,rx
46
.endm
47
48
.macro waituart,rd,rx
49
.endm
50
#endif
51
52
.macro busyuart,rd,rx
53
.endm
54
55