mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-11 07:34:31 +00:00
lmb: nds32: 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. Reviewed-by: Rick Chen <rick@andestech.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Rick Chen <rick@andestech.com> Cc: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Cc: Tom Rini <trini@konsulko.com>
This commit is contained in:
parent
a02c18f31f
commit
6a0890a61e
1 changed files with 13 additions and 0 deletions
|
@ -245,3 +245,16 @@ static void setup_end_tag(struct bd_info *bd)
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* CONFIG_SETUP_MEMORY_TAGS || CONFIG_CMDLINE_TAG || CONFIG_INITRD_TAG */
|
#endif /* CONFIG_SETUP_MEMORY_TAGS || CONFIG_CMDLINE_TAG || CONFIG_INITRD_TAG */
|
||||||
|
|
||||||
|
static ulong get_sp(void)
|
||||||
|
{
|
||||||
|
ulong ret;
|
||||||
|
|
||||||
|
asm("move %0, $sp" : "=r"(ret) : );
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
void arch_lmb_reserve(struct lmb *lmb)
|
||||||
|
{
|
||||||
|
arch_lmb_reserve_generic(lmb, get_sp(), gd->ram_top, 4096);
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue