aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-tegra/board-seaboard-pinmux.c
diff options
context:
space:
mode:
authorPeter De Schrijver <pdeschrijver@nvidia.com>2011-10-12 07:53:03 -0400
committerOlof Johansson <olof@lixom.net>2011-10-13 18:04:53 -0400
commite146245453986974a294d91d691481da8b61696b (patch)
treec980efb20eaee91b62984448657b893ab4f544ce /arch/arm/mach-tegra/board-seaboard-pinmux.c
parent48f2eceefb9d1b79e4c37795d2121933fcbc34f5 (diff)
arm/tegra: prepare Seaboard pinmux code for derived boards
This patch splits out the common part of pinmux and GPIO initialization for seaboard and derived boards. This code is based on work done by Jong Kim <jongk@nvidia.com>. Signed-off-by: Peter De Schrijver <pdeschrijver@nvidia.com> Acked-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/mach-tegra/board-seaboard-pinmux.c')
-rw-r--r--arch/arm/mach-tegra/board-seaboard-pinmux.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/arch/arm/mach-tegra/board-seaboard-pinmux.c b/arch/arm/mach-tegra/board-seaboard-pinmux.c
index 9c0f6d7527b..841e4672b52 100644
--- a/arch/arm/mach-tegra/board-seaboard-pinmux.c
+++ b/arch/arm/mach-tegra/board-seaboard-pinmux.c
@@ -1,5 +1,6 @@
1/* 1/*
2 * Copyright (C) 2010 NVIDIA Corporation 2 * Copyright (C) 2010,2011 NVIDIA Corporation
3 * Copyright (C) 2011 Google, Inc.
3 * 4 *
4 * This software is licensed under the terms of the GNU General Public 5 * This software is licensed under the terms of the GNU General Public
5 * License version 2, as published by the Free Software Foundation, and 6 * License version 2, as published by the Free Software Foundation, and
@@ -163,7 +164,7 @@ static struct platform_device *pinmux_devices[] = {
163 &tegra_pinmux_device, 164 &tegra_pinmux_device,
164}; 165};
165 166
166static struct tegra_gpio_table gpio_table[] = { 167static struct tegra_gpio_table common_gpio_table[] = {
167 { .gpio = TEGRA_GPIO_SD2_CD, .enable = true }, 168 { .gpio = TEGRA_GPIO_SD2_CD, .enable = true },
168 { .gpio = TEGRA_GPIO_SD2_WP, .enable = true }, 169 { .gpio = TEGRA_GPIO_SD2_WP, .enable = true },
169 { .gpio = TEGRA_GPIO_SD2_POWER, .enable = true }, 170 { .gpio = TEGRA_GPIO_SD2_POWER, .enable = true },
@@ -172,7 +173,7 @@ static struct tegra_gpio_table gpio_table[] = {
172 { .gpio = TEGRA_GPIO_ISL29018_IRQ, .enable = true }, 173 { .gpio = TEGRA_GPIO_ISL29018_IRQ, .enable = true },
173}; 174};
174 175
175void __init seaboard_pinmux_init(void) 176void __init seaboard_common_pinmux_init(void)
176{ 177{
177 platform_add_devices(pinmux_devices, ARRAY_SIZE(pinmux_devices)); 178 platform_add_devices(pinmux_devices, ARRAY_SIZE(pinmux_devices));
178 179
@@ -181,5 +182,10 @@ void __init seaboard_pinmux_init(void)
181 tegra_drive_pinmux_config_table(seaboard_drive_pinmux, 182 tegra_drive_pinmux_config_table(seaboard_drive_pinmux,
182 ARRAY_SIZE(seaboard_drive_pinmux)); 183 ARRAY_SIZE(seaboard_drive_pinmux));
183 184
184 tegra_gpio_config(gpio_table, ARRAY_SIZE(gpio_table)); 185 tegra_gpio_config(common_gpio_table, ARRAY_SIZE(common_gpio_table));
186}
187
188void __init seaboard_pinmux_init(void)
189{
190 seaboard_common_pinmux_init();
185} 191}