blob: 6489d1ffe3c82ba5410c01456db92d8f3a0c5819 [file] [log] [blame]
Russell King4baa9922008-08-02 10:55:55 +01001/* arch/arm/include/asm/hardware/debug-pl01x.S
Russell King71dccd02006-03-16 20:50:34 +00002 *
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 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11 *
12*/
13#include <linux/amba/serial.h>
14
15 .macro senduart,rd,rx
16 strb \rd, [\rx, #UART01x_DR]
17 .endm
18
19 .macro waituart,rd,rx
201001: ldr \rd, [\rx, #UART01x_FR]
Ben Dooks1eff66b2013-02-06 18:25:36 +000021 ARM_BE8( rev \rd, \rd )
Russell King71dccd02006-03-16 20:50:34 +000022 tst \rd, #UART01x_FR_TXFF
23 bne 1001b
24 .endm
25
26 .macro busyuart,rd,rx
271001: ldr \rd, [\rx, #UART01x_FR]
Ben Dooks1eff66b2013-02-06 18:25:36 +000028 ARM_BE8( rev \rd, \rd )
Russell King71dccd02006-03-16 20:50:34 +000029 tst \rd, #UART01x_FR_BUSY
30 bne 1001b
31 .endm