Path: blob/master/arch/arm/mach-ks8695/include/mach/debug-macro.S
15159 views
/*1* arch/arm/mach-ks8695/include/mach/debug-macro.S2*3* Copyright (C) 2006 Ben Dooks <[email protected]>4* Copyright (C) 2006 Simtec Electronics5*6* KS8695 - Debug macros7*8* This program is free software; you can redistribute it and/or modify9* it under the terms of the GNU General Public License version 2 as10* published by the Free Software Foundation.11*/1213#include <mach/hardware.h>14#include <mach/regs-uart.h>1516.macro addruart, rp, rv17ldr \rp, =KS8695_UART_PA @ physical base address18ldr \rv, =KS8695_UART_VA @ virtual base address19.endm2021.macro senduart, rd, rx22str \rd, [\rx, #KS8695_URTH] @ Write to Transmit Holding Register23.endm2425.macro busyuart, rd, rx261001: ldr \rd, [\rx, #KS8695_URLS] @ Read Line Status Register27tst \rd, #URLS_URTE @ Holding & Shift registers empty?28beq 1001b29.endm3031.macro waituart, rd, rx321001: ldr \rd, [\rx, #KS8695_URLS] @ Read Line Status Register33tst \rd, #URLS_URTHRE @ Holding Register empty?34beq 1001b35.endm363738