summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/board-ventana.c
diff options
context:
space:
mode:
authorPeter Zu <pzu@nvidia.com>2011-01-27 22:05:28 -0800
committerVarun Colbert <vcolbert@nvidia.com>2011-01-31 16:53:08 -0800
commit4a321ede279569a45ebbd224956f8fbd93fe2260 (patch)
tree5e5a74534eb46b8001d67f37e54a91de3b0c3dde /arch/arm/mach-tegra/board-ventana.c
parentfdd02f7c0f08162c369b1454e7f86ad713731e21 (diff)
[mach-tegra/ventana] use tegra_reserve() to handle carveout memory allocation
For K36, the kernel command line will pass "mem=size@base" from bootloader to kernel. Apparently, we were having two different ways to interpret it 1) size = total physical memory size - carveout size 2) Or size = total physical memory size Ventana is the only platform to use #1. Switch it to #2 which requires tegra_reserve() to handle carveout memory allocation. Change carveout size to 256MB as well. Change-Id: Ifc24c1a5f6300d827068c67c0580cae7eb4ec229 Reviewed-on: http://git-master/r/17444 Reviewed-by: Varun Colbert <vcolbert@nvidia.com> Tested-by: Varun Colbert <vcolbert@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/board-ventana.c')
-rw-r--r--arch/arm/mach-tegra/board-ventana.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/board-ventana.c b/arch/arm/mach-tegra/board-ventana.c
index 351f192e6e3a..281883145dd0 100644
--- a/arch/arm/mach-tegra/board-ventana.c
+++ b/arch/arm/mach-tegra/board-ventana.c
@@ -35,6 +35,7 @@
#include <linux/tegra_usb.h>
#include <linux/usb/android_composite.h>
#include <linux/mfd/tps6586x.h>
+#include <linux/memblock.h>
#ifdef CONFIG_TOUCHSCREEN_PANJIT_I2C
#include <linux/i2c/panjit_ts.h>
@@ -719,6 +720,21 @@ static void __init tegra_ventana_init(void)
ventana_emc_init();
}
+int __init tegra_ventana_protected_aperture_init(void)
+{
+ tegra_protected_aperture_init(tegra_grhost_aperture);
+ return 0;
+}
+late_initcall(tegra_ventana_protected_aperture_init);
+
+void __init tegra_ventana_reserve(void)
+{
+ if (memblock_reserve(0x0, 4096) < 0)
+ pr_warn("Cannot reserve first 4K of memory for safety\n");
+
+ tegra_reserve(SZ_256M, SZ_8M, SZ_16M);
+}
+
MACHINE_START(VENTANA, "ventana")
.boot_params = 0x00000100,
.phys_io = IO_APB_PHYS,
@@ -726,5 +742,6 @@ MACHINE_START(VENTANA, "ventana")
.init_irq = tegra_init_irq,
.init_machine = tegra_ventana_init,
.map_io = tegra_map_common_io,
+ .reserve = tegra_ventana_reserve,
.timer = &tegra_timer,
MACHINE_END