1 From a9d4390c6d27e737887388ccbb48f3767f9f89ef Mon Sep 17 00:00:00 2001
2 From: John Crispin <blogic@openwrt.org>
3 Date: Fri, 24 Jan 2014 17:01:17 +0100
4 Subject: [PATCH 209/215] MIPS: ralink: add MT7621 early_printk support
6 Signed-off-by: John Crispin <blogic@openwrt.org>
8 arch/mips/ralink/early_printk.c | 10 +++++++---
9 1 file changed, 7 insertions(+), 3 deletions(-)
11 --- a/arch/mips/ralink/early_printk.c
12 +++ b/arch/mips/ralink/early_printk.c
15 #ifdef CONFIG_SOC_RT288X
16 #define EARLY_UART_BASE 0x300c00
17 +#elif defined(CONFIG_SOC_MT7621)
18 +#define EARLY_UART_BASE 0x1E000c00
20 #define EARLY_UART_BASE 0x10000c00
22 @@ -40,9 +42,15 @@ static inline u32 uart_r32(unsigned reg)
24 void prom_putchar(unsigned char ch)
26 +#ifdef CONFIG_SOC_MT7621
27 + uart_w32(ch, UART_TX);
28 + while ((uart_r32(0x14) & UART_LSR_THRE) == 0)
31 while ((uart_r32(UART_REG_LSR) & UART_LSR_THRE) == 0)
33 uart_w32(ch, UART_REG_TX);
34 while ((uart_r32(UART_REG_LSR) & UART_LSR_THRE) == 0)