]> Git Repo - linux.git/blob - arch/arm/include/debug/meson.S
Linux 6.14-rc3
[linux.git] / arch / arm / include / debug / meson.S
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * Copyright (C) 2014 Carlo Caione
4  * Carlo Caione <[email protected]>
5  */
6
7 #define MESON_AO_UART_WFIFO             0x0
8 #define MESON_AO_UART_STATUS            0xc
9
10 #define MESON_AO_UART_TX_FIFO_EMPTY     (1 << 22)
11 #define MESON_AO_UART_TX_FIFO_FULL      (1 << 21)
12
13         .macro  addruart, rp, rv, tmp
14         ldr     \rp, =(CONFIG_DEBUG_UART_PHYS)          @ physical
15         ldr     \rv, =(CONFIG_DEBUG_UART_VIRT)          @ virtual
16         .endm
17
18         .macro  senduart,rd,rx
19         str     \rd, [\rx, #MESON_AO_UART_WFIFO]
20         .endm
21
22         .macro  busyuart,rd,rx
23 1002:   ldr     \rd, [\rx, #MESON_AO_UART_STATUS]
24         tst     \rd, #MESON_AO_UART_TX_FIFO_EMPTY
25         beq     1002b
26         .endm
27
28         .macro  waituartcts,rd,rx
29         .endm
30
31         .macro  waituarttxrdy,rd,rx
32 1001:   ldr     \rd, [\rx, #MESON_AO_UART_STATUS]
33         tst     \rd, #MESON_AO_UART_TX_FIFO_FULL
34         bne     1001b
35         .endm
This page took 0.027822 seconds and 4 git commands to generate.