summaryrefslogtreecommitdiffstats
path: root/arch/mips/lib/cpu-probe.c
diff options
context:
space:
mode:
authorOleksij Rempel <o.rempel@pengutronix.de>2019-04-10 09:04:41 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2019-04-23 10:32:06 +0200
commit2eecaafe20ff832e33e0a9a06f225e4d5f1acae5 (patch)
treed3ddf0005a352c7b452ca38c1cca24673a558ecb /arch/mips/lib/cpu-probe.c
parent28ed10d6a67c9f674e827dafc4bab173445c626b (diff)
downloadbarebox-2eecaafe20ff832e33e0a9a06f225e4d5f1acae5.tar.gz
barebox-2eecaafe20ff832e33e0a9a06f225e4d5f1acae5.tar.xz
MIPS: relocation: do not use configurable memory layout
The relocator is not able to patch properly new location of the stack. To make it work properly it is better to disable HAVE_CONFIGURABLE_MEMORY_LAYOUT. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/mips/lib/cpu-probe.c')
-rw-r--r--arch/mips/lib/cpu-probe.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/mips/lib/cpu-probe.c b/arch/mips/lib/cpu-probe.c
index cf63849743..2556a8b240 100644
--- a/arch/mips/lib/cpu-probe.c
+++ b/arch/mips/lib/cpu-probe.c
@@ -11,6 +11,9 @@
#include <asm/mipsregs.h>
#include <asm/cpu-info.h>
#include <asm/cpu.h>
+#include <memory.h>
+#include <asm-generic/memory_layout.h>
+#include <init.h>
const char *__cpu_name;
struct cpuinfo_mips cpu_data[1];
@@ -161,3 +164,14 @@ void cpu_probe(void)
break;
}
}
+
+unsigned long mips_stack_top;
+
+static int mips_request_stack(void)
+{
+ if (!request_sdram_region("stack", mips_stack_top - STACK_SIZE, STACK_SIZE))
+ pr_err("Error: Cannot request SDRAM region for stack\n");
+
+ return 0;
+}
+coredevice_initcall(mips_request_stack);