From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751727Ab1I1BFd (ORCPT ); Tue, 27 Sep 2011 21:05:33 -0400 Received: from hqemgate03.nvidia.com ([216.228.121.140]:10811 "EHLO hqemgate03.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751328Ab1I1BFX (ORCPT ); Tue, 27 Sep 2011 21:05:23 -0400 X-PGP-Universal: processed; by hqnvupgp08.nvidia.com on Tue, 27 Sep 2011 18:05:09 -0700 From: Peter De Schrijver To: CC: Russell King , Colin Cross , Erik Gilling , Olof Johansson , , , Subject: [PATCH v4 1/3] arm/tegra: prepare Seaboard pinmux code for derived boards Date: Wed, 28 Sep 2011 04:05:00 +0300 Message-ID: <1317171902-14736-2-git-send-email-pdeschrijver@nvidia.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1317171902-14736-1-git-send-email-pdeschrijver@nvidia.com> References: <1317171902-14736-1-git-send-email-pdeschrijver@nvidia.com> X-NVConfidentiality: public MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 . Signed-off-by: Peter De Schrijver --- arch/arm/mach-tegra/board-seaboard-pinmux.c | 14 ++++++++++---- 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 74f78b7..b31c765 100644 --- a/arch/arm/mach-tegra/board-seaboard-pinmux.c +++ b/arch/arm/mach-tegra/board-seaboard-pinmux.c @@ -1,5 +1,6 @@ /* - * Copyright (C) 2010 NVIDIA Corporation + * Copyright (C) 2010,2011 NVIDIA Corporation + * Copyright (C) 2011 Google, Inc. * * This software is licensed under the terms of the GNU General Public * License version 2, as published by the Free Software Foundation, and @@ -160,7 +161,7 @@ static __initdata struct tegra_pingroup_config seaboard_pinmux[] = { -static struct tegra_gpio_table gpio_table[] = { +static struct tegra_gpio_table common_gpio_table[] = { { .gpio = TEGRA_GPIO_SD2_CD, .enable = true }, { .gpio = TEGRA_GPIO_SD2_WP, .enable = true }, { .gpio = TEGRA_GPIO_SD2_POWER, .enable = true }, @@ -171,12 +172,17 @@ static struct tegra_gpio_table gpio_table[] = { { .gpio = TEGRA_GPIO_USB1, .enable = true }, }; -void __init seaboard_pinmux_init(void) +static void __init seaboard_common_pinmux_init(void) { tegra_pinmux_config_table(seaboard_pinmux, ARRAY_SIZE(seaboard_pinmux)); tegra_drive_pinmux_config_table(seaboard_drive_pinmux, ARRAY_SIZE(seaboard_drive_pinmux)); - tegra_gpio_config(gpio_table, ARRAY_SIZE(gpio_table)); + tegra_gpio_config(common_gpio_table, ARRAY_SIZE(common_gpio_table)); +} + +void __init seaboard_pinmux_init(void) +{ + seaboard_common_pinmux_init(); } -- 1.7.0.4