From: 黄涛 Date: Wed, 6 Apr 2011 11:23:05 +0000 (+0800) Subject: rk29: serial is based on the 16550 industry standard X-Git-Tag: firefly_0821_release~10552 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=2b025392fc92f8c05e574e88a02b1144ada8a0e6;p=firefly-linux-kernel-4.4.55.git rk29: serial is based on the 16550 industry standard --- 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)