Commit d9df9fb9 authored by Yasha Cherikovsky's avatar Yasha Cherikovsky Committed by Paul Burton

MIPS: Octeon: Remove special handling of CONFIG_MIPS_ELF_APPENDED_DTB=y

The ELF appended dtb can be accessed now via 'fw_passed_dtb'.

Since raw appended dtb is accessed via that variable too,
this now effectively allows to boot with CONFIG_MIPS_RAW_APPENDED_DTB=y
on Octeon.
Signed-off-by: default avatarYasha Cherikovsky <yasha.che3@gmail.com>
[paul.burton@mips.com: Fix trivial __dtb_octeon_*_begin conflict]
Signed-off-by: default avatarPaul Burton <paul.burton@mips.com>
Patchwork: https://patchwork.linux-mips.org/patch/20805/
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Paul Burton <paul.burton@mips.com>
Cc: James Hogan <jhogan@kernel.org>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
parent e524c788
...@@ -1161,15 +1161,12 @@ void __init device_tree_init(void) ...@@ -1161,15 +1161,12 @@ void __init device_tree_init(void)
bool do_prune; bool do_prune;
bool fill_mac; bool fill_mac;
#ifdef CONFIG_MIPS_ELF_APPENDED_DTB if (fw_passed_dtb) {
if (!fdt_check_header(&__appended_dtb)) { fdt = (void *)fw_passed_dtb;
fdt = &__appended_dtb;
do_prune = false; do_prune = false;
fill_mac = true; fill_mac = true;
pr_info("Using appended Device Tree.\n"); pr_info("Using appended Device Tree.\n");
} else } else if (octeon_bootinfo->minor_version >= 3 && octeon_bootinfo->fdt_addr) {
#endif
if (octeon_bootinfo->minor_version >= 3 && octeon_bootinfo->fdt_addr) {
fdt = phys_to_virt(octeon_bootinfo->fdt_addr); fdt = phys_to_virt(octeon_bootinfo->fdt_addr);
if (fdt_check_header(fdt)) if (fdt_check_header(fdt))
panic("Corrupt Device Tree passed to kernel."); panic("Corrupt Device Tree passed to kernel.");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment