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