diff options
author | Marek Vasut <marek.vasut@gmail.com> | 2021-09-10 22:47:17 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-09-23 14:15:32 -0400 |
commit | 7996b7e9f5826d172b820cea0d072e68cfe485ba (patch) | |
tree | 66828184f8ed8d2c35f72aeec6f78429cd47644f | |
parent | 1e0e5577742baece8cc3aac3cf3da61a6b3276b0 (diff) | |
download | u-boot-7996b7e9f5826d172b820cea0d072e68cfe485ba.zip u-boot-7996b7e9f5826d172b820cea0d072e68cfe485ba.tar.gz u-boot-7996b7e9f5826d172b820cea0d072e68cfe485ba.tar.bz2 |
lmb: xtensa: Add arch_lmb_reserve()
Add arch_lmb_reserve() implemented using arch_lmb_reserve_generic().
It is rather likely this architecture also needs to cover U-Boot with
LMB before booting Linux.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Chris Zankel <chris@zankel.net>
Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Cc: Tom Rini <trini@konsulko.com>
-rw-r--r-- | arch/xtensa/lib/bootm.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/xtensa/lib/bootm.c b/arch/xtensa/lib/bootm.c index bb1e288..277af18 100644 --- a/arch/xtensa/lib/bootm.c +++ b/arch/xtensa/lib/bootm.c @@ -197,3 +197,15 @@ int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) return 1; } +static ulong get_sp(void) +{ + ulong ret; + + asm("mov %0, a1" : "=r"(ret) : ); + return ret; +} + +void arch_lmb_reserve(struct lmb *lmb) +{ + arch_lmb_reserve_generic(lmb, get_sp(), gd->ram_top, 4096); +} |