summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/board-harmony-panel.c
diff options
context:
space:
mode:
authorRobert Morell <rmorell@nvidia.com>2011-10-14 18:08:04 -0700
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:49:31 -0800
commit3b8779f417d968db69e15c2439a72330f50cbdb5 (patch)
tree68f4c4ec2133f6070fa282f21a00fa48ac8a7c17 /arch/arm/mach-tegra/board-harmony-panel.c
parent024deb0ead1c674d42a23d9b04d14fe773957d7e (diff)
arm: tegra: Add Harmony nvmap, host1x devices
This is necessary to use the Tegra accelerated device drivers. Signed-off-by: Robert Morell <rmorell@nvidia.com> Change-Id: I6c6f10f35654793b4fb713f4ac854f72640a5fef Reviewed-on: http://git-master/r/58253 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com> Rebase-Id: Rab19f5b8a98914619ff3d43f5a7eeeed0114f86a
Diffstat (limited to 'arch/arm/mach-tegra/board-harmony-panel.c')
-rw-r--r--arch/arm/mach-tegra/board-harmony-panel.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/board-harmony-panel.c b/arch/arm/mach-tegra/board-harmony-panel.c
index 46539a4862ea..73757c52268a 100644
--- a/arch/arm/mach-tegra/board-harmony-panel.c
+++ b/arch/arm/mach-tegra/board-harmony-panel.c
@@ -20,8 +20,12 @@
#include <linux/nvhost.h>
#include <mach/irqs.h>
#include <mach/iomap.h>
+#include <mach/nvmap.h>
#include <mach/tegra_fb.h>
+#include "devices.h"
+#include "board.h"
+
/* Framebuffer */
static struct resource fb_resource[] = {
[0] = {
@@ -59,7 +63,44 @@ static struct platform_device tegra_fb_device = {
},
};
+static struct nvmap_platform_carveout harmony_carveouts[] = {
+ [0] = NVMAP_HEAP_CARVEOUT_IRAM_INIT,
+ [1] = {
+ .name = "generic-0",
+ .usage_mask = NVMAP_HEAP_CARVEOUT_GENERIC,
+ .buddy_size = SZ_32K,
+ },
+};
+
+static struct nvmap_platform_data harmony_nvmap_data = {
+ .carveouts = harmony_carveouts,
+ .nr_carveouts = ARRAY_SIZE(harmony_carveouts),
+};
+
+static struct platform_device harmony_nvmap_device = {
+ .name = "tegra-nvmap",
+ .id = -1,
+ .dev = {
+ .platform_data = &harmony_nvmap_data,
+ },
+};
+
+static struct platform_device *harmony_gfx_devices[] __initdata = {
+ &harmony_nvmap_device,
+ &tegra_grhost_device,
+};
+
int __init harmony_panel_init(void) {
+ int err;
+
+ harmony_carveouts[1].base = tegra_carveout_start;
+ harmony_carveouts[1].size = tegra_carveout_size;
+
+ err = platform_add_devices(harmony_gfx_devices,
+ ARRAY_SIZE(harmony_gfx_devices));
+ if (err)
+ return err;
+
return platform_device_register(&tegra_fb_device);
}