xref: /linux/arch/arm/include/debug/asm9260.S (revision cbecf716ca618fd44feda6bd9a64a8179d031fc5)
1d2912cb1SThomas Gleixner/* SPDX-License-Identifier: GPL-2.0-only */
2d5bd4e8dSOleksij Rempel/* Debugging macro include header
3d5bd4e8dSOleksij Rempel *
4d5bd4e8dSOleksij Rempel *  Copyright (C) 1994-1999 Russell King
5d5bd4e8dSOleksij Rempel *  Moved from linux/arch/arm/kernel/debug.S by Ben Dooks
6d5bd4e8dSOleksij Rempel *  Modified for ASM9260 by Oleksij Remepl <linux@rempel-privat.de>
7d5bd4e8dSOleksij Rempel */
8d5bd4e8dSOleksij Rempel
9d5bd4e8dSOleksij Rempel		.macro	addruart, rp, rv, tmp
10d5bd4e8dSOleksij Rempel		ldr	\rp, = CONFIG_DEBUG_UART_PHYS
11d5bd4e8dSOleksij Rempel		ldr	\rv, = CONFIG_DEBUG_UART_VIRT
12d5bd4e8dSOleksij Rempel		.endm
13d5bd4e8dSOleksij Rempel
14*2c50a570SLinus Walleij		.macro	waituarttxrdy,rd,rx
15*2c50a570SLinus Walleij		.endm
16*2c50a570SLinus Walleij
17*2c50a570SLinus Walleij		.macro	waituartcts,rd,rx
18d5bd4e8dSOleksij Rempel		.endm
19d5bd4e8dSOleksij Rempel
20d5bd4e8dSOleksij Rempel		.macro	senduart,rd,rx
21d5bd4e8dSOleksij Rempel		str	\rd, [\rx, #0x50]	@ TXDATA
22d5bd4e8dSOleksij Rempel		.endm
23d5bd4e8dSOleksij Rempel
24d5bd4e8dSOleksij Rempel		.macro	busyuart,rd,rx
25d5bd4e8dSOleksij Rempel1002:		ldr	\rd, [\rx, #0x60]	@ STAT
26d5bd4e8dSOleksij Rempel		tst	\rd, #1 << 27		@ TXEMPTY
27d5bd4e8dSOleksij Rempel		beq	1002b			@ wait until transmit done
28d5bd4e8dSOleksij Rempel		.endm
29