1/*
2 * arch/arm/mach-prima2/include/mach/debug-macro.S
3 *
4 * Copyright (c) 2011 Cambridge Silicon Radio Limited, a CSR plc group company.
5 *
6 * Licensed under GPLv2 or later.
7 */
8
9#include <mach/hardware.h>
10#include <mach/uart.h>
11
12	.macro	addruart, rp, rv, tmp
13	ldr	\rp, =SIRFSOC_UART1_PA_BASE		@ physical
14	ldr	\rv, =SIRFSOC_UART1_VA_BASE		@ virtual
15	.endm
16
17	.macro	senduart,rd,rx
18	str	\rd, [\rx, #SIRFSOC_UART_TXFIFO_DATA]
19	.endm
20
21	.macro	busyuart,rd,rx
22	.endm
23
24	.macro	waituart,rd,rx
251001:	ldr	\rd, [\rx, #SIRFSOC_UART_TXFIFO_STATUS]
26	tst	\rd, #SIRFSOC_UART1_TXFIFO_EMPTY
27	beq	1001b
28	.endm
29
30