aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-tegra
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2012-03-15 18:27:36 -0400
committerStephen Warren <swarren@nvidia.com>2012-04-18 12:26:39 -0400
commitecc295bbab6b9d1baf0c0a8c2d5a945b201df547 (patch)
tree34a82901da6d66fe15578133a0de90830a658376 /arch/arm/mach-tegra
parente5cbeef0a4d450787169e29b610455b7d9392b7e (diff)
ARM: dt: tegra20: add pinmux to device tree
This adds a complete pinmux configuration to all Tegra20 device tree files. This allows removal of board-dt-tegra20.c's use of the pinmux board files, and the special device tree handling in board-pinmux.c. Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/mach-tegra')
-rw-r--r--arch/arm/mach-tegra/board-dt-tegra20.c30
-rw-r--r--arch/arm/mach-tegra/board-pinmux.c4
2 files changed, 1 insertions, 33 deletions
diff --git a/arch/arm/mach-tegra/board-dt-tegra20.c b/arch/arm/mach-tegra/board-dt-tegra20.c
index 65a5249b3718..5b9d5f4c0686 100644
--- a/arch/arm/mach-tegra/board-dt-tegra20.c
+++ b/arch/arm/mach-tegra/board-dt-tegra20.c
@@ -47,14 +47,7 @@
47#include "clock.h" 47#include "clock.h"
48#include "devices.h" 48#include "devices.h"
49 49
50void harmony_pinmux_init(void);
51void paz00_pinmux_init(void);
52void seaboard_pinmux_init(void);
53void trimslice_pinmux_init(void);
54void ventana_pinmux_init(void);
55
56struct of_dev_auxdata tegra20_auxdata_lookup[] __initdata = { 50struct of_dev_auxdata tegra20_auxdata_lookup[] __initdata = {
57 OF_DEV_AUXDATA("nvidia,tegra20-pinmux", TEGRA_APB_MISC_BASE + 0x14, "tegra-pinmux", NULL),
58 OF_DEV_AUXDATA("nvidia,tegra20-sdhci", TEGRA_SDMMC1_BASE, "sdhci-tegra.0", NULL), 51 OF_DEV_AUXDATA("nvidia,tegra20-sdhci", TEGRA_SDMMC1_BASE, "sdhci-tegra.0", NULL),
59 OF_DEV_AUXDATA("nvidia,tegra20-sdhci", TEGRA_SDMMC2_BASE, "sdhci-tegra.1", NULL), 52 OF_DEV_AUXDATA("nvidia,tegra20-sdhci", TEGRA_SDMMC2_BASE, "sdhci-tegra.1", NULL),
60 OF_DEV_AUXDATA("nvidia,tegra20-sdhci", TEGRA_SDMMC3_BASE, "sdhci-tegra.2", NULL), 53 OF_DEV_AUXDATA("nvidia,tegra20-sdhci", TEGRA_SDMMC3_BASE, "sdhci-tegra.2", NULL),
@@ -94,33 +87,10 @@ static struct of_device_id tegra_dt_match_table[] __initdata = {
94 {} 87 {}
95}; 88};
96 89
97static struct {
98 char *machine;
99 void (*init)(void);
100} pinmux_configs[] = {
101 { "compulab,trimslice", trimslice_pinmux_init },
102 { "nvidia,harmony", harmony_pinmux_init },
103 { "compal,paz00", paz00_pinmux_init },
104 { "nvidia,seaboard", seaboard_pinmux_init },
105 { "nvidia,ventana", ventana_pinmux_init },
106};
107
108static void __init tegra_dt_init(void) 90static void __init tegra_dt_init(void)
109{ 91{
110 int i;
111
112 tegra_clk_init_from_table(tegra_dt_clk_init_table); 92 tegra_clk_init_from_table(tegra_dt_clk_init_table);
113 93
114 for (i = 0; i < ARRAY_SIZE(pinmux_configs); i++) {
115 if (of_machine_is_compatible(pinmux_configs[i].machine)) {
116 pinmux_configs[i].init();
117 break;
118 }
119 }
120
121 WARN(i == ARRAY_SIZE(pinmux_configs),
122 "Unknown platform! Pinmuxing not initialized\n");
123
124 /* 94 /*
125 * Finished with the static registrations now; fill in the missing 95 * Finished with the static registrations now; fill in the missing
126 * devices 96 * devices
diff --git a/arch/arm/mach-tegra/board-pinmux.c b/arch/arm/mach-tegra/board-pinmux.c
index 3b7ad07fcbcb..a5574c71b931 100644
--- a/arch/arm/mach-tegra/board-pinmux.c
+++ b/arch/arm/mach-tegra/board-pinmux.c
@@ -15,7 +15,6 @@
15#include <linux/device.h> 15#include <linux/device.h>
16#include <linux/kernel.h> 16#include <linux/kernel.h>
17#include <linux/notifier.h> 17#include <linux/notifier.h>
18#include <linux/of.h>
19#include <linux/string.h> 18#include <linux/string.h>
20 19
21#include "board-pinmux.h" 20#include "board-pinmux.h"
@@ -84,6 +83,5 @@ void tegra_board_pinmux_init(struct tegra_board_pinmux_conf *conf_a,
84 if (conf_b) 83 if (conf_b)
85 pinctrl_register_mappings(conf_b->maps, conf_b->map_count); 84 pinctrl_register_mappings(conf_b->maps, conf_b->map_count);
86 85
87 if (!of_machine_is_compatible("nvidia,tegra20")) 86 platform_add_devices(devices, ARRAY_SIZE(devices));
88 platform_add_devices(devices, ARRAY_SIZE(devices));
89} 87}