summaryrefslogtreecommitdiff
path: root/arch/arm/cpu/armv7/sunxi/board.c
diff options
context:
space:
mode:
authorChen-Yu Tsai <wens@csie.org>2014-10-22 16:47:47 +0800
committerHans de Goede <hdegoede@redhat.com>2014-10-24 09:35:39 +0200
commitc757a50bd12b4f4f1c44a7cc42354918e8d60cd7 (patch)
treef7041a6dc6cbb8bc45372c633bc978a54becdf68 /arch/arm/cpu/armv7/sunxi/board.c
parent472ed0641e73ea5c5b80f9bfa804bfe0f89eca69 (diff)
ARM: sunxi: Add support for using R_UART as console
The A23 only has UART0 muxed with MMC0. Some of the boards we encountered expose R_UART as a set of pads. Add support for R_UART so we can have a console while using mmc. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Acked-by: Ian Campbell <ijc@hellion.org.uk>
Diffstat (limited to 'arch/arm/cpu/armv7/sunxi/board.c')
-rw-r--r--arch/arm/cpu/armv7/sunxi/board.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv7/sunxi/board.c b/arch/arm/cpu/armv7/sunxi/board.c
index 134a19874e..06eb6768e8 100644
--- a/arch/arm/cpu/armv7/sunxi/board.c
+++ b/arch/arm/cpu/armv7/sunxi/board.c
@@ -75,6 +75,10 @@ int gpio_init(void)
sunxi_gpio_set_cfgpin(SUNXI_GPG(3), SUN5I_GPG3_UART1_TX);
sunxi_gpio_set_cfgpin(SUNXI_GPG(4), SUN5I_GPG4_UART1_RX);
sunxi_gpio_set_pull(SUNXI_GPG(4), SUNXI_GPIO_PULL_UP);
+#elif CONFIG_CONS_INDEX == 5 && defined(CONFIG_SUN8I)
+ sunxi_gpio_set_cfgpin(SUNXI_GPL(2), SUN8I_GPL2_R_UART_TX);
+ sunxi_gpio_set_cfgpin(SUNXI_GPL(3), SUN8I_GPL3_R_UART_RX);
+ sunxi_gpio_set_pull(SUNXI_GPL(3), SUNXI_GPIO_PULL_UP);
#else
#error Unsupported console port number. Please fix pin mux settings in board.c
#endif