diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2011-10-06 10:55:04 +0300 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:49:26 -0800 |
commit | 753cdc02611cd5792dcee1b805b470aceae9f28d (patch) | |
tree | c015062fd187c3be3f41ee72990758c6daa6e6d1 /arch/arm/mach-tegra/board-ventana-panel.c | |
parent | d229bde19ad403fb74c72ff8fb253f87c91cf714 (diff) |
arm: tegra: Make kernel buildable without nvhost
Cuts dependencies to nvhost by adding a Kconfig dependency from DC to
GRHOST and from HD Audio to DC. Configure out calls to nvhost in board
panel files if GRHOST is not present.
Bug 870898
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Change-Id: If7830528e321e951bcadc2a10515e6cab58a6cdf
Reviewed-on: http://git-master/r/56370
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: Antti Miettinen <amiettinen@nvidia.com>
Tested-by: Antti Miettinen <amiettinen@nvidia.com>
Reviewed-by: Scott Williams <scwilliams@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
Reviewed-by: Chris Dragan <kdragan@nvidia.com>
Rebase-Id: R16d9286d67235b0697c914476e7d6462eec7f3ac
Diffstat (limited to 'arch/arm/mach-tegra/board-ventana-panel.c')
-rw-r--r-- | arch/arm/mach-tegra/board-ventana-panel.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/arch/arm/mach-tegra/board-ventana-panel.c b/arch/arm/mach-tegra/board-ventana-panel.c index 6a091203f4d5..042fcba830a0 100644 --- a/arch/arm/mach-tegra/board-ventana-panel.c +++ b/arch/arm/mach-tegra/board-ventana-panel.c @@ -46,9 +46,10 @@ #define ventana_pnl_to_lvds_ms 0 #define ventana_lvds_to_bl_ms 200 +#ifdef CONFIG_TEGRA_DC static struct regulator *ventana_hdmi_reg = NULL; static struct regulator *ventana_hdmi_pll = NULL; - +#endif static int ventana_backlight_init(struct device *dev) { int ret; @@ -100,6 +101,7 @@ static struct platform_device ventana_backlight_device = { }, }; +#ifdef CONFIG_TEGRA_DC static int ventana_panel_enable(void) { struct regulator *reg = regulator_get(NULL, "vdd_ldo4"); @@ -299,6 +301,12 @@ static struct nvhost_device ventana_disp2_device = { .platform_data = &ventana_disp2_pdata, }, }; +#else +static int ventana_disp1_check_fb(struct device *dev, struct fb_info *info) +{ + return 0; +} +#endif static struct nvmap_platform_carveout ventana_carveouts[] = { [0] = NVMAP_HEAP_CARVEOUT_IRAM_INIT, @@ -324,7 +332,9 @@ static struct platform_device ventana_nvmap_device = { static struct platform_device *ventana_gfx_devices[] __initdata = { &ventana_nvmap_device, +#ifdef CONFIG_TEGRA_GRHOST &tegra_grhost_device, +#endif &tegra_pwfm2_device, &ventana_backlight_device, }; @@ -332,7 +342,7 @@ static struct platform_device *ventana_gfx_devices[] __initdata = { int __init ventana_panel_init(void) { int err; - struct resource *res; + struct resource __maybe_unused *res; gpio_request(ventana_pnl_pwr_enb, "pnl_pwr_enb"); gpio_direction_output(ventana_pnl_pwr_enb, 1); @@ -356,7 +366,7 @@ int __init ventana_panel_init(void) err = platform_add_devices(ventana_gfx_devices, ARRAY_SIZE(ventana_gfx_devices)); - +#if defined(CONFIG_TEGRA_GRHOST) && defined(CONFIG_TEGRA_DC) res = nvhost_get_resource_byname(&ventana_disp1_device, IORESOURCE_MEM, "fbmem"); res->start = tegra_fb_start; @@ -366,16 +376,19 @@ int __init ventana_panel_init(void) IORESOURCE_MEM, "fbmem"); res->start = tegra_fb2_start; res->end = tegra_fb2_start + tegra_fb2_size - 1; +#endif /* Copy the bootloader fb to the fb. */ tegra_move_framebuffer(tegra_fb_start, tegra_bootloader_fb_start, min(tegra_fb_size, tegra_bootloader_fb_size)); +#if defined(CONFIG_TEGRA_GRHOST) && defined(CONFIG_TEGRA_DC) if (!err) err = nvhost_device_register(&ventana_disp1_device); if (!err) err = nvhost_device_register(&ventana_disp2_device); +#endif return err; } |