aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorMarek Vasut2021-09-10 22:47:16 +0200
committerTom Rini2021-09-23 14:15:32 -0400
commit1e0e5577742baece8cc3aac3cf3da61a6b3276b0 (patch)
tree1ad5cc3fe06506b563dfd8374d32ab1eb62837c3 /arch
parenteeaa3fe65270758ab0bdb1515e14f9bf936d3a25 (diff)
lmb: sh: Add arch_lmb_reserve()
Add arch_lmb_reserve() implemented using arch_lmb_reserve_generic(). This architecture also needs to cover U-Boot with LMB before booting Linux. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Cc: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/sh/lib/bootm.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/sh/lib/bootm.c b/arch/sh/lib/bootm.c
index dc94f837856..9b71424dfe6 100644
--- a/arch/sh/lib/bootm.c
+++ b/arch/sh/lib/bootm.c
@@ -12,8 +12,11 @@
#include <env.h>
#include <image.h>
#include <asm/byteorder.h>
+#include <asm/global_data.h>
#include <asm/zimage.h>
+DECLARE_GLOBAL_DATA_PTR;
+
#ifdef CONFIG_SYS_DEBUG
static void hexdump(unsigned char *buf, int len)
{
@@ -111,3 +114,16 @@ int do_bootm_linux(int flag, int argc, char *const argv[],
/* does not return */
return 1;
}
+
+static ulong get_sp(void)
+{
+ ulong ret;
+
+ asm("mov r15, %0" : "=r"(ret) : );
+ return ret;
+}
+
+void arch_lmb_reserve(struct lmb *lmb)
+{
+ arch_lmb_reserve_generic(lmb, get_sp(), gd->ram_top, 4096);
+}