[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] xen/arm: Use define instead of hardcoded value in debug-pl011
commit c10b492064ad83d6db8d576014cdcbe73f028e50 Author: Julien Grall <julien.grall@xxxxxxxxxx> AuthorDate: Thu Aug 1 17:09:27 2013 +0100 Commit: Ian Campbell <ian.campbell@xxxxxxxxxx> CommitDate: Mon Aug 5 10:23:15 2013 +0100 xen/arm: Use define instead of hardcoded value in debug-pl011 Signed-off-by: Julien Grall <julien.grall@xxxxxxxxxx> Reviewed-by: Tim Deegan <tim@xxxxxxx> --- xen/arch/arm/arm32/debug-pl011.inc | 18 ++++++++++-------- xen/include/asm-arm/pl011-uart.h | 1 + 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/xen/arch/arm/arm32/debug-pl011.inc b/xen/arch/arm/arm32/debug-pl011.inc index 8b085b8..6a64dbf 100644 --- a/xen/arch/arm/arm32/debug-pl011.inc +++ b/xen/arch/arm/arm32/debug-pl011.inc @@ -16,19 +16,21 @@ * GNU General Public License for more details. */ +#include <asm/pl011-uart.h> + /* PL011 UART initialization * rb: register which contains the UART base address * rc: scratch register 1 * rd: scratch register 2 (unused here) */ .macro early_uart_init rb, rc, rd mov \rc, #(7372800 / EARLY_PRINTK_BAUD % 16) - str \rc, [\rb, #0x28] /* -> UARTFBRD (Baud divisor fraction) */ + str \rc, [\rb, #FBRD] /* -> UARTFBRD (Baud divisor fraction) */ mov \rc, #(7372800 / EARLY_PRINTK_BAUD / 16) - str \rc, [\rb, #0x24] /* -> UARTIBRD (Baud divisor integer) */ + str \rc, [\rb, #IBRD] /* -> UARTIBRD (Baud divisor integer) */ mov \rc, #0x60 /* 8n1 */ - str \rc, [\rb, #0x2C] /* -> UARTLCR_H (Line control) */ - ldr \rc, =0x00000301 /* RXE | TXE | UARTEN */ - str \rc, [\rb, #0x30] /* -> UARTCR (Control Register) */ + str \rc, [\rb, #LCR_H] /* -> UARTLCR_H (Line control) */ + ldr \rc, =(RXE | TXE | UARTEN) /* RXE | TXE | UARTEN */ + str \rc, [\rb, #CR] /* -> UARTCR (Control Register) */ .endm /* PL011 UART wait UART to be ready to transmit @@ -36,8 +38,8 @@ * rc: scratch register */ .macro early_uart_ready rb, rc 1: - ldr \rc, [\rb, #0x18] /* <- UARTFR (Flag register) */ - tst \rc, #0x8 /* Check BUSY bit */ + ldr \rc, [\rb, #FR] /* <- UARTFR (Flag register) */ + tst \rc, #BUSY /* Check BUSY bit */ bne 1b /* Wait for the UART to be ready */ .endm @@ -45,7 +47,7 @@ * rb: register which contains the UART base address * rt: register which contains the character to transmit */ .macro early_uart_transmit rb, rt - str \rt, [\rb] /* -> UARTDR (Data Register) */ + str \rt, [\rb, #DR] /* -> UARTDR (Data Register) */ .endm /* diff --git a/xen/include/asm-arm/pl011-uart.h b/xen/include/asm-arm/pl011-uart.h index 8c4edd4..3332c51 100644 --- a/xen/include/asm-arm/pl011-uart.h +++ b/xen/include/asm-arm/pl011-uart.h @@ -45,6 +45,7 @@ /* FR bits */ #define TXFE (1<<7) /* TX FIFO empty */ #define RXFE (1<<4) /* RX FIFO empty */ +#define BUSY (1<<3) /* Transmit is not complete */ /* LCR_H bits */ #define SPS (1<<7) /* Stick parity select */ -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |