1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Copyright (C) 2014 Alexander Shiyan <shc_work@mail.ru>
6 #ifndef CONFIG_DEBUG_CLPS711X_UART2
7 #define CLPS711X_UART_PADDR (0x80000000 + 0x0000)
8 #define CLPS711X_UART_VADDR (0xfeff4000 + 0x0000)
10 #define CLPS711X_UART_PADDR (0x80000000 + 0x1000)
11 #define CLPS711X_UART_VADDR (0xfeff4000 + 0x1000)
14 #define SYSFLG (0x0140)
15 #define SYSFLG_UBUSY (1 << 11)
16 #define UARTDR (0x0480)
18 .macro addruart, rp, rv, tmp
19 ldr \rv, =CLPS711X_UART_VADDR
20 ldr \rp, =CLPS711X_UART_PADDR
23 .macro waituartcts,rd,rx
26 .macro waituarttxrdy,rd,rx
30 str \rd, [\rx, #UARTDR]
34 1001: ldr \rd, [\rx, #SYSFLG]
35 tst \rd, #SYSFLG_UBUSY