1*385f02b1SJosh Cartwright/* 2*385f02b1SJosh Cartwright * Debugging macro include header 3*385f02b1SJosh Cartwright * 4*385f02b1SJosh Cartwright * Copyright (C) 2011 Xilinx 5*385f02b1SJosh Cartwright * 6*385f02b1SJosh Cartwright * This software is licensed under the terms of the GNU General Public 7*385f02b1SJosh Cartwright * License version 2, as published by the Free Software Foundation, and 8*385f02b1SJosh Cartwright * may be copied, distributed, and modified under those terms. 9*385f02b1SJosh Cartwright * 10*385f02b1SJosh Cartwright * This program is distributed in the hope that it will be useful, 11*385f02b1SJosh Cartwright * but WITHOUT ANY WARRANTY; without even the implied warranty of 12*385f02b1SJosh Cartwright * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13*385f02b1SJosh Cartwright * GNU General Public License for more details. 14*385f02b1SJosh Cartwright */ 15*385f02b1SJosh Cartwright 16*385f02b1SJosh Cartwright#include <mach/zynq_soc.h> 17*385f02b1SJosh Cartwright#include <mach/uart.h> 18*385f02b1SJosh Cartwright 19*385f02b1SJosh Cartwright .macro addruart, rp, rv, tmp 20*385f02b1SJosh Cartwright ldr \rp, =LL_UART_PADDR @ physical 21*385f02b1SJosh Cartwright ldr \rv, =LL_UART_VADDR @ virtual 22*385f02b1SJosh Cartwright .endm 23*385f02b1SJosh Cartwright 24*385f02b1SJosh Cartwright .macro senduart,rd,rx 25*385f02b1SJosh Cartwright str \rd, [\rx, #UART_FIFO_OFFSET] @ TXDATA 26*385f02b1SJosh Cartwright .endm 27*385f02b1SJosh Cartwright 28*385f02b1SJosh Cartwright .macro waituart,rd,rx 29*385f02b1SJosh Cartwright .endm 30*385f02b1SJosh Cartwright 31*385f02b1SJosh Cartwright .macro busyuart,rd,rx 32*385f02b1SJosh Cartwright1002: ldr \rd, [\rx, #UART_SR_OFFSET] @ get status register 33*385f02b1SJosh Cartwright tst \rd, #UART_SR_TXFULL @ 34*385f02b1SJosh Cartwright bne 1002b @ wait if FIFO is full 35*385f02b1SJosh Cartwright .endm 36