[omap]: switch the am335x-evmsk to the new wlcore bindings
[openwrt.git] / target / linux / ramips / patches-3.10 / 0503-MIPS-ralink-add-MT7621-early_printk-support.patch
1 From 643e61b22155cd95ae6e18e57da50acd120da091 Mon Sep 17 00:00:00 2001
2 From: John Crispin <blogic@openwrt.org>
3 Date: Mon, 2 Dec 2013 16:11:33 +0100
4 Subject: [PATCH 503/507] MIPS: ralink: add MT7621 early_printk support
5
6 Signed-off-by: John Crispin <blogic@openwrt.org>
7 ---
8  arch/mips/ralink/early_printk.c |   10 +++++++---
9  1 file changed, 7 insertions(+), 3 deletions(-)
10
11 --- a/arch/mips/ralink/early_printk.c
12 +++ b/arch/mips/ralink/early_printk.c
13 @@ -13,6 +13,8 @@
14  
15  #ifdef CONFIG_SOC_RT288X
16  #define EARLY_UART_BASE         0x300c00
17 +#elif defined(CONFIG_SOC_MT7621)
18 +#define EARLY_UART_BASE         0x1E000c00
19  #else
20  #define EARLY_UART_BASE         0x10000c00
21  #endif
22 @@ -40,9 +42,13 @@ static inline u32 uart_r32(unsigned reg)
23  
24  void prom_putchar(unsigned char ch)
25  {
26 -       while ((uart_r32(UART_REG_LSR) & UART_LSR_THRE) == 0)
27 +#ifdef CONFIG_SOC_MT7621
28 +       uart_w32(ch, UART_TX);
29 +       while ((uart_r32(0x14) & UART_LSR_THRE) == 0)
30                 ;
31 -       uart_w32(ch, UART_REG_TX);
32 +#else
33         while ((uart_r32(UART_REG_LSR) & UART_LSR_THRE) == 0)
34                 ;
35 +       uart_w32(ch, UART_REG_TX);
36 +#endif
37  }