uboot-sunxi: refresh patches
[openwrt/openwrt.git] / package / boot / uboot-sunxi / patches / 101-sun6i-support-console-on-UART2.patch
1 From c058dfb69136d62f88ae8b121104bdb7ce2df03f Mon Sep 17 00:00:00 2001
2 From: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
3 Date: Tue, 16 Jun 2015 10:53:11 +0200
4 Subject: ARM: sun6i: Support console on UART2 (GPG6/GPG7)
5
6
7 --- a/arch/arm/mach-sunxi/board.c
8 +++ b/arch/arm/mach-sunxi/board.c
9 @@ -124,6 +124,10 @@ static int gpio_init(void)
10 sunxi_gpio_set_cfgpin(SUNXI_GPG(3), SUN5I_GPG_UART1);
11 sunxi_gpio_set_cfgpin(SUNXI_GPG(4), SUN5I_GPG_UART1);
12 sunxi_gpio_set_pull(SUNXI_GPG(4), SUNXI_GPIO_PULL_UP);
13 +#elif CONFIG_CONS_INDEX == 3 && defined(CONFIG_MACH_SUN6I)
14 + sunxi_gpio_set_cfgpin(SUNXI_GPG(6), SUN6I_GPG_UART2);
15 + sunxi_gpio_set_cfgpin(SUNXI_GPG(7), SUN6I_GPG_UART2);
16 + sunxi_gpio_set_pull(SUNXI_GPG(7), SUNXI_GPIO_PULL_UP);
17 #elif CONFIG_CONS_INDEX == 3 && defined(CONFIG_MACH_SUN8I)
18 sunxi_gpio_set_cfgpin(SUNXI_GPB(0), SUN8I_GPB_UART2);
19 sunxi_gpio_set_cfgpin(SUNXI_GPB(1), SUN8I_GPB_UART2);
20 --- a/include/configs/sunxi-common.h
21 +++ b/include/configs/sunxi-common.h
22 @@ -256,6 +256,8 @@ extern int soft_i2c_gpio_scl;
23 #endif
24 #elif CONFIG_CONS_INDEX == 2 && defined(CONFIG_MACH_SUN5I)
25 #define OF_STDOUT_PATH "/soc@01c00000/serial@01c28400:115200"
26 +#elif CONFIG_CONS_INDEX == 3 && defined(CONFIG_MACH_SUN6I)
27 +#define OF_STDOUT_PATH "/soc@01c00000/serial@01c28800:115200"
28 #elif CONFIG_CONS_INDEX == 3 && defined(CONFIG_MACH_SUN8I)
29 #define OF_STDOUT_PATH "/soc@01c00000/serial@01c28800:115200"
30 #elif CONFIG_CONS_INDEX == 5 && defined(CONFIG_MACH_SUN8I)