1/* 2 * xen/arch/arm/arm32/debug-exynos4210.inc 3 * 4 * Exynos 5 specific debug code 5 * 6 * Copyright (c) 2013 Citrix Systems. 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 as published by 10 * the Free Software Foundation; either version 2 of the License, or 11 * (at your option) any later version. 12 * 13 * This program is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU General Public License for more details. 17 */ 18 19#include <asm/exynos4210-uart.h> 20 21/* 22 * Exynos 5 UART wait UART to be ready to transmit 23 * rb: register which contains the UART base address 24 * rc: scratch register 25 */ 26.macro early_uart_ready rb rc 271: 28 ldr \rc, [\rb, #UTRSTAT] /* <- UTRSTAT (Flag register) */ 29 tst \rc, #UTRSTAT_TXFE /* Check BUSY bit */ 30 beq 1b /* Wait for the UART to be ready */ 31.endm 32 33/* 34 * Exynos 5 UART transmit character 35 * rb: register which contains the UART base address 36 * rt: register which contains the character to transmit 37 */ 38.macro early_uart_transmit rb rt 39 str \rt, [\rb, #UTXH] /* -> UTXH (Data Register) */ 40.endm 41 42/* 43 * Local variables: 44 * mode: ASM 45 * indent-tabs-mode: nil 46 * End: 47 */ 48