summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorGary King <gking@nvidia.com>2010-06-16 13:39:21 -0700
committerGary King <gking@nvidia.com>2010-06-19 13:29:12 -0700
commitcf1a07ab69848ce803a8c6ccb0374751e065de14 (patch)
tree9dfcfd3ecc3e36e96bf80b20cffe990791b79312 /arch
parentb4ff1f4d33a6ee0b197bbb27d3e096e377e183ed (diff)
[ARM/tegra] boards: add support for HARMONY and VENTANA machines
add config options for both the HARMONY and VENTANA machine types, and have MACH_TEGRA_GENERIC select both add the machine definitions for HARMONY and VENTANA to board-generic.c, so that all 3 machines can be detected when MACH_TEGRA_GENERIC is enabled ventana will need custom I2C registration due to pinmux multiplexing, but this is not implemented, yet Change-Id: I3a6f4f6707ba11a2a6e527f673cff867c7314cd2 Reviewed-on: http://git-master/r/2780 Reviewed-by: Gary King <gking@nvidia.com> Tested-by: Gary King <gking@nvidia.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-tegra/Kconfig8
-rw-r--r--arch/arm/mach-tegra/board-generic.c52
2 files changed, 57 insertions, 3 deletions
diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig
index 44b4ce640b08..8a7ec5bfea0a 100644
--- a/arch/arm/mach-tegra/Kconfig
+++ b/arch/arm/mach-tegra/Kconfig
@@ -23,6 +23,8 @@ choice
config MACH_TEGRA_GENERIC
bool "Tegra 2 Development System (Whistler, Harmony, Tango)"
select TEGRA_ODM_KIT
+ select MACH_HARMONY
+ select MACH_VENTANA
help
Support for NVIDIA Tegra 2 development platforms; requires
selection of an appropriate ODM kit for your specific development
@@ -30,6 +32,12 @@ config MACH_TEGRA_GENERIC
endchoice
+config MACH_HARMONY
+ bool
+
+config MACH_VENTANA
+ bool
+
config TEGRA_ODM_KIT
bool
diff --git a/arch/arm/mach-tegra/board-generic.c b/arch/arm/mach-tegra/board-generic.c
index 85cc534ffc2e..7212453215e1 100644
--- a/arch/arm/mach-tegra/board-generic.c
+++ b/arch/arm/mach-tegra/board-generic.c
@@ -104,7 +104,9 @@ static struct android_usb_product tegra_android_products[] = {
},
};
-static char *harmony_dev = "Harmony ADB";
+static char *harmony_dev = "NVIDIA Harmony";
+static char *ventana_dev = "NVIDIA Ventana";
+static char *generic_dev = "NVIDIA Tegra 2";
static struct android_usb_platform_data tegra_android_platform = {
.vendor_id = 0x955,
@@ -170,7 +172,7 @@ static struct platform_device *platform_devices[] = {
extern void __init tegra_setup_nvodm(bool standard_i2c, bool standard_spi);
extern void __init tegra_register_socdev(void);
-static void __init tegra_generic_init(void)
+static void __init do_system_init(bool standard_i2c, bool standard_spi)
{
unsigned int chip_id[2];
char serial[17];
@@ -183,11 +185,55 @@ static void __init tegra_generic_init(void)
snprintf(serial, sizeof(serial), "%08x%08x", chip_id[1], chip_id[0]);
#ifdef CONFIG_USB_ANDROID
tegra_android_platform.serial_number = kstrdup(serial, GFP_KERNEL);
- tegra_android_platform.product_name = harmony_dev;
#endif
platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
}
+static void __init tegra_harmony_init(void)
+{
+#ifdef CONFIG_USB_ANDROID
+ tegra_android_platform.product_name = harmony_dev;
+#endif
+ do_system_init(true, true);
+}
+
+static void __init tegra_ventana_init(void)
+{
+#ifdef CONFIG_USB_ANDROID
+ tegra_android_platform.product_name = ventana_dev;
+#endif
+ do_system_init(false, true);
+}
+
+static void __init tegra_generic_init(void)
+{
+#ifdef CONFIG_USB_ANDROID
+ tegra_android_platform.product_name = generic_dev;
+#endif
+ do_system_init(true, true);
+}
+
+MACHINE_START(VENTANA, "NVIDIA Ventana Development System")
+ .boot_params = 0x00000100,
+ .phys_io = IO_APB_PHYS,
+ .io_pg_offst = ((IO_APB_VIRT) >> 18) & 0xfffc,
+ .init_irq = tegra_init_irq,
+ .init_machine = tegra_ventana_init,
+ .map_io = tegra_map_common_io,
+ .timer = &tegra_timer,
+MACHINE_END
+
+MACHINE_START(HARMONY, "NVIDIA Harmony Development System")
+ .boot_params = 0x00000100,
+ .phys_io = IO_APB_PHYS,
+ .io_pg_offst = ((IO_APB_VIRT) >> 18) & 0xfffc,
+ .init_irq = tegra_init_irq,
+ .init_machine = tegra_harmony_init,
+ .map_io = tegra_map_common_io,
+ .timer = &tegra_timer,
+MACHINE_END
+
+
MACHINE_START(TEGRA_GENERIC, "Tegra 2 Development System")
.boot_params = 0x00000100,
.phys_io = IO_APB_PHYS,