From 2b025392fc92f8c05e574e88a02b1144ada8a0e6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E9=BB=84=E6=B6=9B?= Date: Wed, 6 Apr 2011 19:23:05 +0800 Subject: [PATCH] rk29: serial is based on the 16550 industry standard --- arch/arm/mach-rk29/include/mach/debug-macro.S | 15 ++------------- arch/arm/mach-rk29/include/mach/uncompress.h | 7 +++++-- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/arch/arm/mach-rk29/include/mach/debug-macro.S b/arch/arm/mach-rk29/include/mach/debug-macro.S index ad42c6e1b6bd..8637a82fde4d 100644 --- a/arch/arm/mach-rk29/include/mach/debug-macro.S +++ b/arch/arm/mach-rk29/include/mach/debug-macro.S @@ -30,16 +30,5 @@ ldrne \rx, = RK29_UART1_BASE .endm - .macro senduart,rd,rx - str \rd, [\rx, #0x00] - .endm - - .macro waituart,rd,rx - @ wait for TX_READY -1: ldr \rd, [\rx, #0x7C] - tst \rd, #0x02 - beq 1b - .endm - - .macro busyuart,rd,rx - .endm +#define UART_SHIFT 2 +#include diff --git a/arch/arm/mach-rk29/include/mach/uncompress.h b/arch/arm/mach-rk29/include/mach/uncompress.h index 250c4e7caab2..f47d232cbd34 100644 --- a/arch/arm/mach-rk29/include/mach/uncompress.h +++ b/arch/arm/mach-rk29/include/mach/uncompress.h @@ -15,13 +15,16 @@ #ifndef __ASM_ARCH_RK29_UNCOMPRESS_H +#include #include +static volatile u32 *UART = (u32 *)RK29_UART1_PHYS; + static void putc(int c) { - while (!(*(volatile u32 *) (RK29_UART1_PHYS + 0x14) & (1 << 5))) + while (!(UART[UART_LSR] & UART_LSR_THRE)) barrier(); - *(volatile u32 *) (RK29_UART1_PHYS) = c; + UART[UART_TX] = c; } static inline void flush(void) -- 2.34.1