Skip to content

Commit d9df9fb

Browse files
yashac3paulburton
authored andcommitted
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: Yasha Cherikovsky <yasha.che3@gmail.com> [paul.burton@mips.com: Fix trivial __dtb_octeon_*_begin conflict] Signed-off-by: Paul 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
1 parent e524c78 commit d9df9fb

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

arch/mips/cavium-octeon/setup.c

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1161,15 +1161,12 @@ void __init device_tree_init(void)
11611161
bool do_prune;
11621162
bool fill_mac;
11631163

1164-
#ifdef CONFIG_MIPS_ELF_APPENDED_DTB
1165-
if (!fdt_check_header(&__appended_dtb)) {
1166-
fdt = &__appended_dtb;
1164+
if (fw_passed_dtb) {
1165+
fdt = (void *)fw_passed_dtb;
11671166
do_prune = false;
11681167
fill_mac = true;
11691168
pr_info("Using appended Device Tree.\n");
1170-
} else
1171-
#endif
1172-
if (octeon_bootinfo->minor_version >= 3 && octeon_bootinfo->fdt_addr) {
1169+
} else if (octeon_bootinfo->minor_version >= 3 && octeon_bootinfo->fdt_addr) {
11731170
fdt = phys_to_virt(octeon_bootinfo->fdt_addr);
11741171
if (fdt_check_header(fdt))
11751172
panic("Corrupt Device Tree passed to kernel.");

0 commit comments

Comments
 (0)