aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-tegra
diff options
context:
space:
mode:
authorPeter De Schrijver <pdeschrijver@nvidia.com>2011-10-12 07:53:05 -0400
committerOlof Johansson <olof@lixom.net>2011-10-13 18:04:54 -0400
commitadd29e61d4651fc2f87dab443f47faa70ee96f8f (patch)
tree0b82c22aa4ca355bdd3be3c2933ec36d47bfa31f /arch/arm/mach-tegra
parent21fb1ccc92655d8eabed9b8fdfa2a65bf6e58a33 (diff)
arm/tegra: device tree support for ventana board
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')
-rw-r--r--arch/arm/mach-tegra/Kconfig6
-rw-r--r--arch/arm/mach-tegra/Makefile.boot1
-rw-r--r--arch/arm/mach-tegra/board-dt.c26
3 files changed, 28 insertions, 5 deletions
diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig
index d82ebab50e11..91aff7cb8284 100644
--- a/arch/arm/mach-tegra/Kconfig
+++ b/arch/arm/mach-tegra/Kconfig
@@ -69,6 +69,12 @@ config MACH_WARIO
69 help 69 help
70 Support for the Wario version of Seaboard 70 Support for the Wario version of Seaboard
71 71
72config MACH_VENTANA
73 bool "Ventana board"
74 select MACH_TEGRA_DT
75 help
76 Support for the nVidia Ventana development platform
77
72choice 78choice
73 prompt "Low-level debug console UART" 79 prompt "Low-level debug console UART"
74 default TEGRA_DEBUG_UART_NONE 80 default TEGRA_DEBUG_UART_NONE
diff --git a/arch/arm/mach-tegra/Makefile.boot b/arch/arm/mach-tegra/Makefile.boot
index 428ad122be03..a2356ad3c8c1 100644
--- a/arch/arm/mach-tegra/Makefile.boot
+++ b/arch/arm/mach-tegra/Makefile.boot
@@ -4,3 +4,4 @@ initrd_phys-$(CONFIG_ARCH_TEGRA_2x_SOC) := 0x00800000
4 4
5dtb-$(CONFIG_MACH_HARMONY) += tegra-harmony.dtb 5dtb-$(CONFIG_MACH_HARMONY) += tegra-harmony.dtb
6dtb-$(CONFIG_MACH_SEABOARD) += tegra-seaboard.dtb 6dtb-$(CONFIG_MACH_SEABOARD) += tegra-seaboard.dtb
7dtb-$(CONFIG_MACH_VENTANA) += tegra-ventana.dtb
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