xref: /openbmc/linux/arch/arm/include/debug/vt8500.S (revision 8e20ba2e)
1/* SPDX-License-Identifier: GPL-2.0-only */
2/*
3 * Debugging macro include header
4 *
5 *  Copyright (C) 2010 Alexey Charkov <alchark@gmail.com>
6 *    Moved from arch/arm/mach-vt8500/include/mach/debug-macro.S
7 *    Minor changes for readability.
8 */
9
10#define DEBUG_LL_PHYS_BASE		0xD8000000
11#define DEBUG_LL_VIRT_BASE		0xF8000000
12#define DEBUG_LL_UART_OFFSET		0x00200000
13
14#if defined(CONFIG_DEBUG_VT8500_UART0)
15	.macro	addruart, rp, rv, tmp
16	mov	\rp,      #DEBUG_LL_UART_OFFSET
17	orr	\rv, \rp, #DEBUG_LL_VIRT_BASE
18	orr	\rp, \rp, #DEBUG_LL_PHYS_BASE
19	.endm
20
21	.macro	senduart,rd,rx
22	strb	\rd, [\rx, #0]
23	.endm
24
25	.macro	busyuart,rd,rx
261001:	ldr	\rd, [\rx, #0x1c]
27	ands	\rd, \rd, #0x2
28	bne	1001b
29	.endm
30
31	.macro	waituart,rd,rx
32	.endm
33
34#endif
35