1 --- a/arch/mips/ath79/early_printk.c
2 +++ b/arch/mips/ath79/early_printk.c
3 @@ -56,6 +56,46 @@ static void prom_putchar_dummy(unsigned
7 +static void prom_enable_uart(u32 id)
9 + void __iomem *gpio_base;
14 + case REV_ID_MAJOR_AR71XX:
15 + uart_en = AR71XX_GPIO_FUNC_UART_EN;
18 + case REV_ID_MAJOR_AR7240:
19 + case REV_ID_MAJOR_AR7241:
20 + case REV_ID_MAJOR_AR7242:
21 + uart_en = AR724X_GPIO_FUNC_UART_EN;
24 + case REV_ID_MAJOR_AR913X:
25 + uart_en = AR913X_GPIO_FUNC_UART_EN;
28 + case REV_ID_MAJOR_AR9330:
29 + case REV_ID_MAJOR_AR9331:
30 + uart_en = AR933X_GPIO_FUNC_UART_EN;
33 + case REV_ID_MAJOR_AR9341:
34 + case REV_ID_MAJOR_AR9342:
35 + case REV_ID_MAJOR_AR9344:
41 + gpio_base = (void __iomem *)(KSEG1ADDR(AR71XX_GPIO_BASE));
42 + t = __raw_readl(gpio_base + AR71XX_GPIO_REG_FUNC);
44 + __raw_writel(t, gpio_base + AR71XX_GPIO_REG_FUNC);
47 static void prom_putchar_init(void)
50 @@ -84,8 +124,10 @@ static void prom_putchar_init(void)
53 _prom_putchar = prom_putchar_dummy;
58 + prom_enable_uart(id);
61 void prom_putchar(unsigned char ch)