Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1/* SPDX-License-Identifier: GPL-2.0-only */
2/*
3 * Debugging macro include header
4 *
5 * Copyright (C) 1994-1999 Russell King
6 * Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
7*/
8
9#define UART_DATA 0
10#define UART_FLAG 0x18
11#define UART_FLAG_BUSY (1 << 3)
12
13 .macro addruart, rp, rv, tmp
14 ldr \rp, =CONFIG_DEBUG_UART_PHYS
15 ldr \rv, =CONFIG_DEBUG_UART_VIRT
16 .endm
17
18 .macro senduart,rd,rx
19 str \rd, [\rx, #UART_DATA]
20 .endm
21
22 .macro busyuart,rd,rx
231002: ldr \rd, [\rx, #UART_FLAG]
24 tst \rd, #UART_FLAG_BUSY
25 bne 1002b
26 .endm
27
28 .macro waituart,rd,rx
291001: ldr \rd, [\rx, #UART_FLAG]
30 tst \rd, #UART_FLAG_BUSY
31 bne 1001b
32 .endm