summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/board-harmony.c
diff options
context:
space:
mode:
authorJong Kim <jongk@nvidia.com>2011-09-06 18:03:09 -0700
committerVarun Colbert <vcolbert@nvidia.com>2011-09-08 17:21:01 -0700
commit9e7bf6bd080289b9381c6e1602207535eec5a613 (patch)
tree87acc56ad84f54c3562cd54824ee513a169be26e /arch/arm/mach-tegra/board-harmony.c
parent78ba6a0e051352b4b197f05dcacd4b6eb6fa8589 (diff)
arm: tegra: Add Dynamic carveout support for Harmony
Removed hard-coded physical addresses for carveout and fb, and uses tegra_reserve() to reserve carveout and fb from kernel memory pool. This change matches the default kernel config option "KERNEL_ON_MMU", which removes/ignores "nvmem=xxx" command line option usage. (lastest fastboot removed this option from cmdline). BUGS=871874 TESTS=Ubuntu desktop works when flashed without cmdline work around. Change-Id: I5222398543d5f6e88367814c1dbc669fdb49dc54 Signed-off-by: Jong Kim <jongk@nvidia.com> Reviewed-on: http://git-master/r/50943 Reviewed-by: Allen Martin <amartin@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/board-harmony.c')
-rw-r--r--arch/arm/mach-tegra/board-harmony.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/arch/arm/mach-tegra/board-harmony.c b/arch/arm/mach-tegra/board-harmony.c
index e861bfeef132..ec040c3da009 100644
--- a/arch/arm/mach-tegra/board-harmony.c
+++ b/arch/arm/mach-tegra/board-harmony.c
@@ -29,6 +29,7 @@
#include <linux/delay.h>
#include <linux/gpio.h>
#include <linux/platform_data/tegra_usb.h>
+#include <linux/memblock.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
@@ -277,16 +278,6 @@ static struct platform_device *harmony_devices[] __initdata = {
&tegra_i2s_device1,
};
-static void __init tegra_harmony_fixup(struct machine_desc *desc,
- struct tag *tags, char **cmdline, struct meminfo *mi)
-{
- mi->nr_banks = 2;
- mi->bank[0].start = PHYS_OFFSET;
- mi->bank[0].size = 448 * SZ_1M;
- mi->bank[1].start = SZ_512M;
- mi->bank[1].size = SZ_512M;
-}
-
static __initdata struct tegra_clk_init_table harmony_clk_init_table[] = {
/* name parent rate enabled */
{ "clk_dev1", NULL, 26000000, true},
@@ -435,13 +426,21 @@ static void __init tegra_harmony_init(void)
harmony_power_off_init();
}
+void __init tegra_harmony_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(HARMONY, "harmony")
.boot_params = 0x00000100,
.phys_io = IO_APB_PHYS,
.io_pg_offst = ((IO_APB_VIRT) >> 18) & 0xfffc,
- .fixup = tegra_harmony_fixup,
.init_irq = tegra_init_irq,
.init_machine = tegra_harmony_init,
.map_io = tegra_map_common_io,
+ .reserve = tegra_harmony_reserve,
.timer = &tegra_timer,
MACHINE_END