ARM: tegra: pluto: add DTV support
Mallikarjun Kasoju [Mon, 29 Apr 2013 11:47:21 +0000 (16:47 +0530)]
Add DTV support for pluto

Bug 943380

Change-Id: I08c54e31360ee2da8374613eae63aa85bb415d75
Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com>
Reviewed-on: http://git-master/r/188045
(cherry picked from commit 36a1cc743eef7a4bf81a580ac33562a19a254106)
Reviewed-on: http://git-master/r/223860
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>

arch/arm/mach-tegra/board-pluto.c
arch/arm/mach-tegra/devices.c

index ff4c02d..00cc38b 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * arch/arm/mach-tegra/board-pluto.c
  *
- * Copyright (c) 2012-2013, NVIDIA CORPORATION.  All rights reserved.
+ * Copyright (c) 2012-2013, NVIDIA CORPORATION. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -1419,6 +1419,11 @@ struct of_dev_auxdata pluto_auxdata_lookup[] __initdata = {
 };
 #endif
 
+static void __init pluto_dtv_init(void)
+{
+       platform_device_register(&tegra_dtv_device);
+}
+
 static void __init tegra_pluto_early_init(void)
 {
        pluto_battery_edp_init();
@@ -1442,6 +1447,7 @@ static void __init tegra_pluto_late_init(void)
        tegra_io_dpd_init();
        pluto_sdhci_init();
        pluto_regulator_init();
+       pluto_dtv_init();
        pluto_suspend_init();
        pluto_touch_init();
        pluto_emc_init();
index 18fbff4..8b5a1f7 100644 (file)
@@ -5,7 +5,7 @@
  *     Colin Cross <ccross@android.com>
  *     Erik Gilling <ccross@android.com>
  *
- * Copyright (c) 2010-2012, NVIDIA CORPORATION.  All rights reserved.
+ * Copyright (c) 2010-2013, NVIDIA CORPORATION.  All rights reserved.
  *
  * This software is licensed under the terms of the GNU General Public
  * License version 2, as published by the Free Software Foundation, and
@@ -880,6 +880,34 @@ struct platform_device tegra_dtv_device = {
 };
 #endif
 
+
+#ifdef CONFIG_ARCH_TEGRA_11x_SOC
+
+static struct resource dtv_resource[] = {
+       [0] = {
+               .start  = TEGRA_DTV_BASE,
+               .end    = TEGRA_DTV_BASE + TEGRA_DTV_SIZE - 1,
+               .flags  = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start  = TEGRA_DMA_REQ_SEL_DTV,
+               .end    = TEGRA_DMA_REQ_SEL_DTV,
+               .flags  = IORESOURCE_DMA
+       },
+};
+
+struct platform_device tegra_dtv_device = {
+       .name           = "tegra_dtv",
+       .id             = -1,
+       .resource       = dtv_resource,
+       .num_resources  = ARRAY_SIZE(dtv_resource),
+       .dev = {
+               .init_name = "dtv",
+               .coherent_dma_mask = 0xffffffff,
+       },
+};
+#endif
+
 static struct resource sdhci_resource1[] = {
        [0] = {
                .start  = INT_SDMMC1,