提交 d66698e0 编写于 作者: J Jaedon Shin 提交者: Ralf Baechle

MIPS: BMIPS: Support APPENDED_DTB

Use appended DTB when available.
Signed-off-by: NJaedon Shin <jaedon.shin@gmail.com>
Cc: Kevin Cernekee <cernekee@gmail.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/14337/Signed-off-by: NRalf Baechle <ralf@linux-mips.org>
上级 a2c510a2
......@@ -17,6 +17,7 @@
#include <linux/of.h>
#include <linux/of_fdt.h>
#include <linux/of_platform.h>
#include <linux/libfdt.h>
#include <linux/smp.h>
#include <asm/addrspace.h>
#include <asm/bmips.h>
......@@ -152,6 +153,8 @@ void __init plat_time_init(void)
mips_hpt_frequency = freq;
}
extern const char __appended_dtb;
void __init plat_mem_setup(void)
{
void *dtb;
......@@ -161,6 +164,11 @@ void __init plat_mem_setup(void)
ioport_resource.start = 0;
ioport_resource.end = ~0;
#ifdef CONFIG_MIPS_ELF_APPENDED_DTB
if (!fdt_check_header(&__appended_dtb))
dtb = (void *)&__appended_dtb;
else
#endif
/* intended to somewhat resemble ARM; see Documentation/arm/Booting */
if (fw_arg0 == 0 && fw_arg1 == 0xffffffff)
dtb = phys_to_virt(fw_arg2);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册