summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/board-whistler-panel.c
diff options
context:
space:
mode:
authorKrishna Reddy <vdumpa@nvidia.com>2011-12-16 18:35:28 -0800
committerVarun Wadekar <vwadekar@nvidia.com>2011-12-28 21:27:20 -0800
commit7bcaefb7cafaccfe83f1701ae6b05749c1e937ec (patch)
tree32a9fb9dfc7eff5a7ad77722de90d89391a9cf38 /arch/arm/mach-tegra/board-whistler-panel.c
parentafb496954b25d800d6847a4c3805fe42032c87ac (diff)
arm: tegra: Create nvmap dev based on config flag.
Create nvmap dev and related resources only when CONFIG_TEGRA_NVMAP is defined. Change-Id: Iee9e43de79767353a750f73cddd6550a74315cff Signed-off-by: Krishna Reddy <vdumpa@nvidia.com> Reviewed-on: http://git-master/r/70699 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Scott Williams <scwilliams@nvidia.com> Reviewed-by: Aleksandr Frid <afrid@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/board-whistler-panel.c')
-rw-r--r--arch/arm/mach-tegra/board-whistler-panel.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/board-whistler-panel.c b/arch/arm/mach-tegra/board-whistler-panel.c
index 0f1912fdd427..e68d6bf40292 100644
--- a/arch/arm/mach-tegra/board-whistler-panel.c
+++ b/arch/arm/mach-tegra/board-whistler-panel.c
@@ -270,6 +270,7 @@ static struct nvhost_device whistler_disp2_device = {
};
#endif
+#if defined(CONFIG_TEGRA_NVMAP)
static struct nvmap_platform_carveout whistler_carveouts[] = {
[0] = NVMAP_HEAP_CARVEOUT_IRAM_INIT,
[1] = {
@@ -293,9 +294,12 @@ static struct platform_device whistler_nvmap_device = {
.platform_data = &whistler_nvmap_data,
},
};
+#endif
static struct platform_device *whistler_gfx_devices[] __initdata = {
+#if defined(CONFIG_TEGRA_NVMAP)
&whistler_nvmap_device,
+#endif
#ifdef CONFIG_TEGRA_GRHOST
&tegra_grhost_device,
#endif
@@ -348,8 +352,11 @@ int __init whistler_panel_init(void)
whistler_panel_early_suspender.level = EARLY_SUSPEND_LEVEL_DISABLE_FB;
register_early_suspend(&whistler_panel_early_suspender);
#endif
+
+#if defined(CONFIG_TEGRA_NVMAP)
whistler_carveouts[1].base = tegra_carveout_start;
whistler_carveouts[1].size = tegra_carveout_size;
+#endif
err = platform_add_devices(whistler_gfx_devices,
ARRAY_SIZE(whistler_gfx_devices));