summaryrefslogtreecommitdiffstats
path: root/arch/arm/cpu/cpu.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/cpu/cpu.c')
-rw-r--r--arch/arm/cpu/cpu.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm/cpu/cpu.c b/arch/arm/cpu/cpu.c
index 2ca871fc60..7761f5cd4e 100644
--- a/arch/arm/cpu/cpu.c
+++ b/arch/arm/cpu/cpu.c
@@ -28,6 +28,7 @@
#include <asm/mmu.h>
#include <asm/system.h>
#include <asm/memory.h>
+#include <asm-generic/memory_layout.h>
#include <asm/system_info.h>
#include <asm/cputype.h>
#include <asm/cache.h>
@@ -91,6 +92,17 @@ void arch_shutdown(void)
__asm__ __volatile__("msr cpsr, %0" : : "r"(r));
}
+extern unsigned long arm_stack_top;
+
+static int arm_request_stack(void)
+{
+ if (!request_sdram_region("stack", arm_stack_top - STACK_SIZE, STACK_SIZE))
+ pr_err("Error: Cannot request SDRAM region for stack\n");
+
+ return 0;
+}
+coredevice_initcall(arm_request_stack);
+
#ifdef CONFIG_THUMB2_BAREBOX
static void thumb2_execute(void *func, int argc, char *argv[])
{