aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-tegra/board-dt.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-tegra/board-dt.c')
-rw-r--r--arch/arm/mach-tegra/board-dt.c26
1 files changed, 21 insertions, 5 deletions
diff --git a/arch/arm/mach-tegra/board-dt.c b/arch/arm/mach-tegra/board-dt.c
index 9f47e04446f3..d368f8dafcfd 100644
--- a/arch/arm/mach-tegra/board-dt.c
+++ b/arch/arm/mach-tegra/board-dt.c
@@ -47,7 +47,7 @@
47 47
48void harmony_pinmux_init(void); 48void harmony_pinmux_init(void);
49void seaboard_pinmux_init(void); 49void seaboard_pinmux_init(void);
50 50void ventana_pinmux_init(void);
51 51
52struct of_dev_auxdata tegra20_auxdata_lookup[] __initdata = { 52struct of_dev_auxdata tegra20_auxdata_lookup[] __initdata = {
53 OF_DEV_AUXDATA("nvidia,tegra20-sdhci", TEGRA_SDMMC1_BASE, "sdhci-tegra.0", NULL), 53 OF_DEV_AUXDATA("nvidia,tegra20-sdhci", TEGRA_SDMMC1_BASE, "sdhci-tegra.0", NULL),
@@ -80,9 +80,19 @@ static struct of_device_id tegra_dt_gic_match[] __initdata = {
80 {} 80 {}
81}; 81};
82 82
83static struct {
84 char *machine;
85 void (*init)(void);
86} pinmux_configs[] = {
87 { "nvidia,harmony", harmony_pinmux_init },
88 { "nvidia,seaboard", seaboard_pinmux_init },
89 { "nvidia,ventana", ventana_pinmux_init },
90};
91
83static void __init tegra_dt_init(void) 92static void __init tegra_dt_init(void)
84{ 93{
85 struct device_node *node; 94 struct device_node *node;
95 int i;
86 96
87 node = of_find_matching_node_by_address(NULL, tegra_dt_gic_match, 97 node = of_find_matching_node_by_address(NULL, tegra_dt_gic_match,
88 TEGRA_ARM_INT_DIST_BASE); 98 TEGRA_ARM_INT_DIST_BASE);
@@ -91,10 +101,15 @@ static void __init tegra_dt_init(void)
91 101
92 tegra_clk_init_from_table(tegra_dt_clk_init_table); 102 tegra_clk_init_from_table(tegra_dt_clk_init_table);
93 103
94 if (of_machine_is_compatible("nvidia,harmony")) 104 for (i = 0; i < ARRAY_SIZE(pinmux_configs); i++) {
95 harmony_pinmux_init(); 105 if (of_machine_is_compatible(pinmux_configs[i].machine)) {
96 else if (of_machine_is_compatible("nvidia,seaboard")) 106 pinmux_configs[i].init();
97 seaboard_pinmux_init(); 107 break;
108 }
109 }
110
111 WARN(i == ARRAY_SIZE(pinmux_configs),
112 "Unknown platform! Pinmuxing not initialized\n");
98 113
99 /* 114 /*
100 * Finished with the static registrations now; fill in the missing 115 * Finished with the static registrations now; fill in the missing
@@ -106,6 +121,7 @@ static void __init tegra_dt_init(void)
106static const char * tegra_dt_board_compat[] = { 121static const char * tegra_dt_board_compat[] = {
107 "nvidia,harmony", 122 "nvidia,harmony",
108 "nvidia,seaboard", 123 "nvidia,seaboard",
124 "nvidia,ventana",
109 NULL 125 NULL
110}; 126};
111 127