Linux 5.7.7
[linux/fpc-iii.git] / arch / arm / include / debug / vt8500.S
blob8dc1df2d91b859926978cb9313b30fa4235764c9
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /* 
3  * Debugging macro include header
4  *
5  *  Copyright (C) 2010 Alexey Charkov <alchark@gmail.com>
6  *    Moved from arch/arm/mach-vt8500/include/mach/debug-macro.S
7  *    Minor changes for readability.
8  */
10 #define DEBUG_LL_PHYS_BASE              0xD8000000
11 #define DEBUG_LL_VIRT_BASE              0xF8000000
12 #define DEBUG_LL_UART_OFFSET            0x00200000
14 #if defined(CONFIG_DEBUG_VT8500_UART0)
15         .macro  addruart, rp, rv, tmp
16         mov     \rp,      #DEBUG_LL_UART_OFFSET
17         orr     \rv, \rp, #DEBUG_LL_VIRT_BASE
18         orr     \rp, \rp, #DEBUG_LL_PHYS_BASE
19         .endm
21         .macro  senduart,rd,rx
22         strb    \rd, [\rx, #0]
23         .endm
25         .macro  busyuart,rd,rx
26 1001:   ldr     \rd, [\rx, #0x1c]
27         ands    \rd, \rd, #0x2
28         bne     1001b
29         .endm
31         .macro  waituart,rd,rx
32         .endm
34 #endif