summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-tegra/board.h1
-rw-r--r--arch/arm/mach-tegra/common.c13
-rw-r--r--arch/arm/mach-tegra/suspend.c4
3 files changed, 17 insertions, 1 deletions
diff --git a/arch/arm/mach-tegra/board.h b/arch/arm/mach-tegra/board.h
index a15834f8e7ee..a58e0ba569a9 100644
--- a/arch/arm/mach-tegra/board.h
+++ b/arch/arm/mach-tegra/board.h
@@ -49,6 +49,7 @@ extern unsigned long tegra_carveout_start;
extern unsigned long tegra_carveout_size;
extern unsigned long tegra_lp0_vec_start;
extern unsigned long tegra_lp0_vec_size;
+extern bool tegra_lp0_vec_relocate;
extern unsigned long tegra_grhost_aperture;
extern struct sys_timer tegra_timer;
diff --git a/arch/arm/mach-tegra/common.c b/arch/arm/mach-tegra/common.c
index bc43477ee1b2..a4aa23710cc3 100644
--- a/arch/arm/mach-tegra/common.c
+++ b/arch/arm/mach-tegra/common.c
@@ -86,6 +86,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;
@@ -716,6 +717,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.
diff --git a/arch/arm/mach-tegra/suspend.c b/arch/arm/mach-tegra/suspend.c
index 0604dab04a1b..280b5d4ddf35 100644
--- a/arch/arm/mach-tegra/suspend.c
+++ b/arch/arm/mach-tegra/suspend.c
@@ -1182,7 +1182,9 @@ void __init tegra_init_suspend(struct tegra_suspend_platform_data *plat)
pr_warning("Disabling LP0\n");
plat->suspend_mode = TEGRA_SUSPEND_LP1;
}
- if (plat->suspend_mode == TEGRA_SUSPEND_LP0 && tegra_lp0_vec_size) {
+
+ if (plat->suspend_mode == TEGRA_SUSPEND_LP0 && tegra_lp0_vec_size &&
+ tegra_lp0_vec_relocate) {
unsigned char *reloc_lp0;
unsigned long tmp;
void __iomem *orig;