1/* 2 * xen/arch/arm/arm64/debug-cadence.S 3 * 4 * Cadence UART specific debug code 5 * 6 * Copyright (c) 2015 Xilinx Inc. 7 * Written by Edgar E. Iglesias. 8 * 9 * This program is free software; you can redistribute it and/or modify 10 * it under the terms of the GNU General Public License as published by 11 * the Free Software Foundation; either version 2 of the License, or 12 * (at your option) any later version. 13 * 14 * This program is distributed in the hope that it will be useful, 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 * GNU General Public License for more details. 18 */ 19 20#include <asm/asm_defns.h> 21#include <asm/cadence-uart.h> 22 23/* 24 * Cadence UART wait UART to be ready to transmit 25 * xb: register which contains the UART base address 26 * c: scratch register number 27 */ 28.macro early_uart_ready xb, c 291: 30 ldrh w\c, [\xb, #R_UART_SR] 31 tst w\c, #UART_SR_INTR_TFUL 32 b.ne 1b 33.endm 34 35/* 36 * Cadence UART transmit character 37 * xb: register which contains the UART base address 38 * wt: register which contains the character to transmit 39 */ 40.macro early_uart_transmit xb, wt 41 strb \wt, [\xb, #R_UART_TX] 42.endm 43 44/* 45 * Local variables: 46 * mode: ASM 47 * indent-tabs-mode: nil 48 * End: 49 */ 50