diff options
author | Amlan Kundu <akundu@nvidia.com> | 2011-08-09 22:54:05 +0530 |
---|---|---|
committer | Varun Colbert <vcolbert@nvidia.com> | 2011-09-27 18:01:54 -0700 |
commit | dde2b745987527d4226e79b37689ad8e718c644b (patch) | |
tree | 4e3d93e543f4a61846e6e7cb8c27bcb3a0270222 | |
parent | 40b3e51348beabed5bfbe69b29829439a7aea70c (diff) |
arm: tegra: Add display and nvmap devices
Change-Id: I76a29aa81e4634671a44da6d6e583285ecf8dd54
Reviewed-on: http://git-master/r/46092
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Dan Willemsen <dwillemsen@nvidia.com>
Tested-by: Amlan Kundu <akundu@nvidia.com>
Reviewed-by: Scott Williams <scwilliams@nvidia.com>
-rw-r--r-- | arch/arm/mach-tegra/devices.c | 46 | ||||
-rw-r--r-- | arch/arm/mach-tegra/devices.h | 3 |
2 files changed, 48 insertions, 1 deletions
diff --git a/arch/arm/mach-tegra/devices.c b/arch/arm/mach-tegra/devices.c index 2c8f07ef9bec..7f067e978b79 100644 --- a/arch/arm/mach-tegra/devices.c +++ b/arch/arm/mach-tegra/devices.c @@ -22,7 +22,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> @@ -31,6 +30,7 @@ #include <mach/irqs.h> #include <mach/iomap.h> #include <mach/dma.h> +#include "devices.h" #if !defined(CONFIG_ARCH_TEGRA_2x_SOC) #define UART_SOURCE_RATE 408000000 @@ -1431,3 +1431,47 @@ 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), + .dev = { + .platform_data = 0, + }, +}; + +struct platform_device tegra_nvmap_device = { + .name = "tegra-nvmap", + .id = -1, + .dev = { + .platform_data = 0, + }, +}; diff --git a/arch/arm/mach-tegra/devices.h b/arch/arm/mach-tegra/devices.h index 174f21d0562f..cefbee0eda25 100644 --- a/arch/arm/mach-tegra/devices.h +++ b/arch/arm/mach-tegra/devices.h @@ -24,6 +24,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; @@ -109,4 +110,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 |