summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorRajeshwari Shinde <rajeshwari.s@samsung.com>2013-07-04 12:29:16 +0530
committerMinkyu Kang <mk7.kang@samsung.com>2013-07-05 17:06:55 +0900
commit198a40b9f64d3c08b0303dd346ff4addca4c7e88 (patch)
treefce90ceea84304ba082cb45e0d049205d85539a2 /arch
parent6e50e5ca0221c014a9c9e4b63bb4bc8a35d2e826 (diff)
downloadu-boot-imx-198a40b9f64d3c08b0303dd346ff4addca4c7e88.zip
u-boot-imx-198a40b9f64d3c08b0303dd346ff4addca4c7e88.tar.gz
u-boot-imx-198a40b9f64d3c08b0303dd346ff4addca4c7e88.tar.bz2
EXYNOS4210: Configure GPIO for uart
This patch configures the gpio values for UART on Origen and SMDKV310 using pinmux Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com> Acked-by: Simon Glass <sjg@chromium.org> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/cpu/armv7/exynos/pinmux.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv7/exynos/pinmux.c b/arch/arm/cpu/armv7/exynos/pinmux.c
index bd499b4..2042062 100644
--- a/arch/arm/cpu/armv7/exynos/pinmux.c
+++ b/arch/arm/cpu/armv7/exynos/pinmux.c
@@ -408,9 +408,49 @@ static int exynos4_mmc_config(int peripheral, int flags)
return 0;
}
+static void exynos4_uart_config(int peripheral)
+{
+ struct exynos4_gpio_part1 *gpio1 =
+ (struct exynos4_gpio_part1 *)samsung_get_base_gpio_part1();
+ struct s5p_gpio_bank *bank;
+ int i, start, count;
+
+ switch (peripheral) {
+ case PERIPH_ID_UART0:
+ bank = &gpio1->a0;
+ start = 0;
+ count = 4;
+ break;
+ case PERIPH_ID_UART1:
+ bank = &gpio1->a0;
+ start = 4;
+ count = 4;
+ break;
+ case PERIPH_ID_UART2:
+ bank = &gpio1->a1;
+ start = 0;
+ count = 4;
+ break;
+ case PERIPH_ID_UART3:
+ bank = &gpio1->a1;
+ start = 4;
+ count = 2;
+ break;
+ }
+ for (i = start; i < start + count; i++) {
+ s5p_gpio_set_pull(bank, i, GPIO_PULL_NONE);
+ s5p_gpio_cfg_pin(bank, i, GPIO_FUNC(0x2));
+ }
+}
static int exynos4_pinmux_config(int peripheral, int flags)
{
switch (peripheral) {
+ case PERIPH_ID_UART0:
+ case PERIPH_ID_UART1:
+ case PERIPH_ID_UART2:
+ case PERIPH_ID_UART3:
+ exynos4_uart_config(peripheral);
+ break;
case PERIPH_ID_I2C0:
case PERIPH_ID_I2C1:
case PERIPH_ID_I2C2: