diff options
author | Prashant Gaikwad <pgaikwad@nvidia.com> | 2011-08-03 14:49:20 +0530 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:48:27 -0800 |
commit | ff19231f2765001de1b53196ac4742c708b22492 (patch) | |
tree | 0a0bf4cec18ee1f21b939a9c5fcaf8a199ab81d6 /arch/arm/mach-tegra/common.c | |
parent | f2bb55c0297b19f1bd08e3c6d84dd044b8a72f77 (diff) |
ARM: tegra: pm: Do not use ioremap for sys mem
ARMv6+ architecture does not allow ioremap on system memory.
lp0 is relocated using ioremap on DRAM. If lp0 vector start address
is in system memory then use memblock_reserve and do not relocate.
Else if it is overlapping with carveout/fb then first remove the
carveout/fb using memblock_remove and then use ioremap.
Bug 827199
Reviewed-on: http://git-master/r/43685
(cherry picked from commit 1753408edc65ebfc0d4d203f2be960d49ca747a8)
Original-Change-Id: Ic4abfbc98b43aafb2756cb3e69d0ee178204ec7d
Reviewed-on: http://git-master/r/44717
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
Rebase-Id: Re90d5554c301471fd177632887741109318c2c97
Diffstat (limited to 'arch/arm/mach-tegra/common.c')
-rw-r--r-- | arch/arm/mach-tegra/common.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/common.c b/arch/arm/mach-tegra/common.c index 77ad2c23aaf1..725517513463 100644 --- a/arch/arm/mach-tegra/common.c +++ b/arch/arm/mach-tegra/common.c @@ -83,6 +83,7 @@ unsigned long tegra_carveout_start; unsigned long tegra_carveout_size; unsigned long tegra_lp0_vec_start; unsigned long tegra_lp0_vec_size; +bool tegra_lp0_vec_relocate; unsigned long tegra_grhost_aperture = ~0ul; static bool is_tegra_debug_uart_hsport; static struct board_info pmu_board_info; @@ -594,6 +595,18 @@ void __init tegra_reserve(unsigned long carveout_size, unsigned long fb_size, } #endif + if (tegra_lp0_vec_size && + (tegra_lp0_vec_start < memblock_end_of_DRAM())) { + if (memblock_reserve(tegra_lp0_vec_start, tegra_lp0_vec_size)) { + pr_err("Failed to reserve lp0_vec %08lx@%08lx\n", + tegra_lp0_vec_size, tegra_lp0_vec_start); + tegra_lp0_vec_start = 0; + tegra_lp0_vec_size = 0; + } + tegra_lp0_vec_relocate = false; + } else + tegra_lp0_vec_relocate = true; + /* * We copy the bootloader's framebuffer to the framebuffer allocated * above, and then free this one. |