diff options
author | Tom Cherry <tcherry@nvidia.com> | 2010-12-02 13:35:46 -0800 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:46:19 -0800 |
commit | e75cdf310ffd4666f0f17ce1e157d05d18de599d (patch) | |
tree | 7ecd4ceeaf371442d71a42b12b06bf842a0e8556 /arch/arm | |
parent | 4f4f2a7256b28965c05d474eb9da55ba25660b85 (diff) |
tegra: whistler: memblock_reserve
use memblock_reserve fb functions for fb memory reservation
Cherry-picked from http://git-master/r/#change,11090
Original-Change-Id: I71c47dfb381eb070c87b94620989ff99b053df30
Reviewed-on: http://git-master/r/12348
Tested-by: Thomas Cherry <tcherry@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Rebase-Id: R77e20833f546484ef5780d1f46bac282b4cdf451
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-tegra/board-whistler-panel.c | 12 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-whistler.c | 16 |
2 files changed, 26 insertions, 2 deletions
diff --git a/arch/arm/mach-tegra/board-whistler-panel.c b/arch/arm/mach-tegra/board-whistler-panel.c index 8aa46ef86185..90acf239ecfd 100644 --- a/arch/arm/mach-tegra/board-whistler-panel.c +++ b/arch/arm/mach-tegra/board-whistler-panel.c @@ -34,6 +34,7 @@ #include "devices.h" #include "gpio-names.h" +#include "board.h" static struct resource whistler_disp1_resources[] = { { @@ -50,8 +51,6 @@ static struct resource whistler_disp1_resources[] = { }, { .name = "fbmem", - .start = 0x18012000, - .end = 0x18414000 - 1, /* enough for 1080P 16bpp */ .flags = IORESOURCE_MEM, }, }; @@ -161,10 +160,19 @@ static struct platform_device *whistler_gfx_devices[] __initdata = { int __init whistler_panel_init(void) { int err; + struct resource *res; + + whistler_carveouts[1].base = tegra_carveout_start; + whistler_carveouts[1].size = tegra_carveout_size; err = platform_add_devices(whistler_gfx_devices, ARRAY_SIZE(whistler_gfx_devices)); + res = nvhost_get_resource_byname(&whistler_disp1_device, + IORESOURCE_MEM, "fbmem"); + res->start = tegra_fb_start; + res->end = tegra_fb_start + tegra_fb_size - 1; + if (!err) err = nvhost_device_register(&whistler_disp1_device); diff --git a/arch/arm/mach-tegra/board-whistler.c b/arch/arm/mach-tegra/board-whistler.c index 9e8f4b466fce..fe182cd845cd 100644 --- a/arch/arm/mach-tegra/board-whistler.c +++ b/arch/arm/mach-tegra/board-whistler.c @@ -33,6 +33,7 @@ #include <linux/gpio.h> #include <linux/gpio_keys.h> #include <linux/input.h> +#include <linux/memblock.h> #include <mach/clk.h> #include <mach/iomap.h> @@ -144,6 +145,20 @@ static void __init tegra_whistler_init(void) whistler_panel_init(); } +int __init tegra_whistler_protected_aperture_init(void) +{ + tegra_protected_aperture_init(tegra_grhost_aperture); + return 0; +} + +void __init tegra_whistler_reserve(void) +{ + if (memblock_reserve(0x0, 4096) < 0) + pr_warn("Cannot reserve first 4K of memory for safety\n"); + + tegra_reserve(SZ_128M, SZ_8M, SZ_16M); +} + MACHINE_START(WHISTLER, "whistler") .boot_params = 0x00000100, .phys_io = IO_APB_PHYS, @@ -151,5 +166,6 @@ MACHINE_START(WHISTLER, "whistler") .init_irq = tegra_init_irq, .init_machine = tegra_whistler_init, .map_io = tegra_map_common_io, + .reserve = tegra_whistler_reserve, .timer = &tegra_timer, MACHINE_END |