Merge tag 'usb-5.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
[linux/fpc-iii.git] / arch / arm / include / debug / pl01x.S
blob0c7bfa4c10dbf855f7e9574513ee595c79c9e765
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /* arch/arm/include/debug/pl01x.S
3  *
4  * Debugging macro include header
5  *
6  *  Copyright (C) 1994-1999 Russell King
7  *  Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
8 */
9 #include <linux/amba/serial.h>
11 #ifdef CONFIG_DEBUG_ZTE_ZX
12 #undef UART01x_DR
13 #undef UART01x_FR
14 #define UART01x_DR     0x04
15 #define UART01x_FR     0x14
16 #endif
18 #ifdef CONFIG_DEBUG_UART_PHYS
19                 .macro  addruart, rp, rv, tmp
20                 ldr     \rp, =CONFIG_DEBUG_UART_PHYS
21                 ldr     \rv, =CONFIG_DEBUG_UART_VIRT
22                 .endm
23 #endif
25                 .macro  senduart,rd,rx
26                 strb    \rd, [\rx, #UART01x_DR]
27                 .endm
29                 .macro  waituartcts,rd,rx
30                 .endm
32                 .macro  waituarttxrdy,rd,rx
33 1001:           ldr     \rd, [\rx, #UART01x_FR]
34  ARM_BE8(       rev     \rd, \rd )
35                 tst     \rd, #UART01x_FR_TXFF
36                 bne     1001b
37                 .endm
39                 .macro  busyuart,rd,rx
40 1001:           ldr     \rd, [\rx, #UART01x_FR]
41  ARM_BE8(       rev     \rd, \rd )
42                 tst     \rd, #UART01x_FR_BUSY
43                 bne     1001b
44                 .endm