diff options
author | Krishna Reddy <vdumpa@nvidia.com> | 2011-12-16 18:35:28 -0800 |
---|---|---|
committer | Varun Wadekar <vwadekar@nvidia.com> | 2011-12-28 21:27:20 -0800 |
commit | 7bcaefb7cafaccfe83f1701ae6b05749c1e937ec (patch) | |
tree | 32a9fb9dfc7eff5a7ad77722de90d89391a9cf38 /arch/arm/mach-tegra/board-harmony-panel.c | |
parent | afb496954b25d800d6847a4c3805fe42032c87ac (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-harmony-panel.c')
-rw-r--r-- | arch/arm/mach-tegra/board-harmony-panel.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/board-harmony-panel.c b/arch/arm/mach-tegra/board-harmony-panel.c index a63710be2663..d0eecfc9917a 100644 --- a/arch/arm/mach-tegra/board-harmony-panel.c +++ b/arch/arm/mach-tegra/board-harmony-panel.c @@ -192,6 +192,7 @@ static int harmony_disp1_check_fb(struct device *dev, struct fb_info *info) return info->device == &harmony_disp1_device.dev; } +#if defined(CONFIG_TEGRA_NVMAP) static struct nvmap_platform_carveout harmony_carveouts[] = { [0] = NVMAP_HEAP_CARVEOUT_IRAM_INIT, [1] = { @@ -213,9 +214,12 @@ static struct platform_device harmony_nvmap_device = { .platform_data = &harmony_nvmap_data, }, }; +#endif static struct platform_device *harmony_gfx_devices[] __initdata = { +#if defined(CONFIG_TEGRA_NVMAP) &harmony_nvmap_device, +#endif &tegra_grhost_device, &tegra_pwfm0_device, &harmony_backlight_device, @@ -237,8 +241,10 @@ int __init harmony_panel_init(void) { gpio_direction_output(harmony_lvds_shutdown, 1); tegra_gpio_enable(harmony_lvds_shutdown); +#if defined(CONFIG_TEGRA_NVMAP) harmony_carveouts[1].base = tegra_carveout_start; harmony_carveouts[1].size = tegra_carveout_size; +#endif err = platform_add_devices(harmony_gfx_devices, ARRAY_SIZE(harmony_gfx_devices)); |