diff options
author | Yasha Cherikovsky <yasha.che3@gmail.com> | 2018-09-25 14:08:25 -0400 |
---|---|---|
committer | Paul Burton <paul.burton@mips.com> | 2018-09-26 14:46:34 -0400 |
commit | d9df9fb901d25b941ab2cfb5b570d91fb2abf7a3 (patch) | |
tree | 7529117b4e69815ac721997042314319a86e05e0 | |
parent | e524c788bfc1d5e18db9e226c3b7323e69094e81 (diff) |
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
-rw-r--r-- | arch/mips/cavium-octeon/setup.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/arch/mips/cavium-octeon/setup.c b/arch/mips/cavium-octeon/setup.c index c2426232db06..dfb95cffef3e 100644 --- a/arch/mips/cavium-octeon/setup.c +++ b/arch/mips/cavium-octeon/setup.c | |||
@@ -1161,15 +1161,12 @@ void __init device_tree_init(void) | |||
1161 | bool do_prune; | 1161 | bool do_prune; |
1162 | bool fill_mac; | 1162 | bool fill_mac; |
1163 | 1163 | ||
1164 | #ifdef CONFIG_MIPS_ELF_APPENDED_DTB | 1164 | if (fw_passed_dtb) { |
1165 | if (!fdt_check_header(&__appended_dtb)) { | 1165 | fdt = (void *)fw_passed_dtb; |
1166 | fdt = &__appended_dtb; | ||
1167 | do_prune = false; | 1166 | do_prune = false; |
1168 | fill_mac = true; | 1167 | fill_mac = true; |
1169 | pr_info("Using appended Device Tree.\n"); | 1168 | pr_info("Using appended Device Tree.\n"); |
1170 | } else | 1169 | } else if (octeon_bootinfo->minor_version >= 3 && octeon_bootinfo->fdt_addr) { |
1171 | #endif | ||
1172 | if (octeon_bootinfo->minor_version >= 3 && octeon_bootinfo->fdt_addr) { | ||
1173 | fdt = phys_to_virt(octeon_bootinfo->fdt_addr); | 1170 | fdt = phys_to_virt(octeon_bootinfo->fdt_addr); |
1174 | if (fdt_check_header(fdt)) | 1171 | if (fdt_check_header(fdt)) |
1175 | panic("Corrupt Device Tree passed to kernel."); | 1172 | panic("Corrupt Device Tree passed to kernel."); |