1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * arch/arm/include/debug/sti.S
5 * Debugging macro include header
6 * Copyright (C) 2013 STMicroelectronics (R&D) Limited.
9 #define ASC_TX_BUF_OFF 0x04
10 #define ASC_CTRL_OFF 0x0c
11 #define ASC_STA_OFF 0x14
13 #define ASC_STA_TX_FULL (1<<9)
14 #define ASC_STA_TX_EMPTY (1<<1)
17 .macro addruart, rp, rv, tmp
18 ldr \rp, =CONFIG_DEBUG_UART_PHYS @ physical base
19 ldr \rv, =CONFIG_DEBUG_UART_VIRT @ virt base
23 strb \rd, [\rx, #ASC_TX_BUF_OFF]
26 .macro waituartcts,rd,rx
29 .macro waituarttxrdy,rd,rx
30 1001: ldr \rd, [\rx, #ASC_STA_OFF]
31 tst \rd, #ASC_STA_TX_FULL
36 1001: ldr \rd, [\rx, #ASC_STA_OFF]
37 tst \rd, #ASC_STA_TX_EMPTY