“de08481a253ac658433a8304a303ce9f018d71e5”上不存在“include/git@gitcode.net:openeuler/kernel.git”
提交 e1462454 编写于 作者: P Peter De Schrijver 提交者: Olof Johansson

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: NPeter De Schrijver <pdeschrijver@nvidia.com>
Acked-by: NStephen Warren <swarren@nvidia.com>
Signed-off-by: NOlof Johansson <olof@lixom.net>
上级 48f2ecee
/* /*
* 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 * This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and * License version 2, as published by the Free Software Foundation, and
...@@ -163,7 +164,7 @@ static struct platform_device *pinmux_devices[] = { ...@@ -163,7 +164,7 @@ static struct platform_device *pinmux_devices[] = {
&tegra_pinmux_device, &tegra_pinmux_device,
}; };
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_CD, .enable = true },
{ .gpio = TEGRA_GPIO_SD2_WP, .enable = true }, { .gpio = TEGRA_GPIO_SD2_WP, .enable = true },
{ .gpio = TEGRA_GPIO_SD2_POWER, .enable = true }, { .gpio = TEGRA_GPIO_SD2_POWER, .enable = true },
...@@ -172,7 +173,7 @@ static struct tegra_gpio_table gpio_table[] = { ...@@ -172,7 +173,7 @@ static struct tegra_gpio_table gpio_table[] = {
{ .gpio = TEGRA_GPIO_ISL29018_IRQ, .enable = true }, { .gpio = TEGRA_GPIO_ISL29018_IRQ, .enable = true },
}; };
void __init seaboard_pinmux_init(void) void __init seaboard_common_pinmux_init(void)
{ {
platform_add_devices(pinmux_devices, ARRAY_SIZE(pinmux_devices)); platform_add_devices(pinmux_devices, ARRAY_SIZE(pinmux_devices));
...@@ -181,5 +182,10 @@ void __init seaboard_pinmux_init(void) ...@@ -181,5 +182,10 @@ void __init seaboard_pinmux_init(void)
tegra_drive_pinmux_config_table(seaboard_drive_pinmux, tegra_drive_pinmux_config_table(seaboard_drive_pinmux,
ARRAY_SIZE(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();
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册