arm: tegra: Add display and nvmap devices
Manoj Chourasia [Mon, 19 Dec 2011 18:50:16 +0000 (23:50 +0530)]
bug 871603

Reviewed-on: http://git-master/r/72257

Change-Id: I78e7e6c2d86ed8336cb32374f1f3e904365d46ec
Reviewed-by: Dan Willemsen <dwillemsen@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Manoj Chourasia <mchourasia@nvidia.com>
Reviewed-on: http://git-master/r/75542
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>

arch/arm/mach-tegra/devices.c
arch/arm/mach-tegra/devices.h

index b9a3b03..bb10c10 100644 (file)
@@ -20,7 +20,6 @@
 
 
 #include <linux/resource.h>
-#include <linux/platform_device.h>
 #include <linux/dma-mapping.h>
 #include <linux/fsl_devices.h>
 #include <linux/serial_8250.h>
@@ -34,8 +33,9 @@
 #include <mach/dma.h>
 #include <mach/usb_phy.h>
 #include <mach/tegra_smmu.h>
-#include "gpio-names.h"
 
+#include "gpio-names.h"
+#include "devices.h"
 
 #if !defined(CONFIG_ARCH_TEGRA_2x_SOC)
 #define UART_SOURCE_RATE 408000000
@@ -1695,3 +1695,41 @@ struct platform_device tegra_se_device = {
 };
 #endif
 
+static struct resource tegra_disp1_resources[] = {
+       {
+               .name   = "irq",
+               .start  = INT_DISPLAY_GENERAL,
+               .end    = INT_DISPLAY_GENERAL,
+               .flags  = IORESOURCE_IRQ,
+       },
+       {
+               .name   = "regs",
+               .start  = TEGRA_DISPLAY_BASE,
+               .end    = TEGRA_DISPLAY_BASE + TEGRA_DISPLAY_SIZE-1,
+               .flags  = IORESOURCE_MEM,
+       },
+       {
+               .name   = "fbmem",
+               .start  = 0,
+               .end    = 0,
+               .flags  = IORESOURCE_MEM,
+       },
+       {
+               .name   = "dsi_regs",
+               .start  = TEGRA_DSI_BASE,
+               .end    = TEGRA_DSI_BASE + TEGRA_DSI_SIZE - 1,
+               .flags  = IORESOURCE_MEM,
+       },
+};
+
+struct nvhost_device tegra_disp1_device = {
+       .name           = "tegradc",
+       .id             = 0,
+       .resource       = tegra_disp1_resources,
+       .num_resources  = ARRAY_SIZE(tegra_disp1_resources),
+};
+
+struct platform_device tegra_nvmap_device = {
+       .name   = "tegra-nvmap",
+       .id     = -1,
+};
index f205d2b..6d7c7ca 100644 (file)
@@ -22,6 +22,7 @@
 #define __MACH_TEGRA_DEVICES_H
 
 #include <linux/platform_device.h>
+#include <linux/nvhost.h>
 
 extern struct platform_device tegra_sdhci_device1;
 extern struct platform_device tegra_sdhci_device2;
@@ -123,4 +124,6 @@ extern struct platform_device tegra_se_device;
 extern struct platform_device debug_uarte_device;
 #endif
 
+extern struct nvhost_device tegra_disp1_device;
+extern struct platform_device tegra_nvmap_device;
 #endif