summaryrefslogtreecommitdiff
path: root/arch/mips/generic
diff options
context:
space:
mode:
authorPaul Cercueil <paul@crapouillou.net>2020-09-06 21:29:28 +0200
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>2020-09-18 16:32:19 +0200
commit323690d23be14fa4b7be8bd2961810df6fe42138 (patch)
treef7b61f7495b314fc546e52f6c2e92fd98a844026 /arch/mips/generic
parent13a0ea28e8c698cc0d600fdeed8da3e4d478b97e (diff)
MIPS: generic: Support booting with built-in or appended DTB
The plat_get_fdt() checked that the kernel was booted using UHI before reading the 'fw_passed_dtb' variable. However, this variable is also set when the DT has been appended, or when it has been built into the kernel. Support these usecases by removing the UHI check. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Diffstat (limited to 'arch/mips/generic')
-rw-r--r--arch/mips/generic/init.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/arch/mips/generic/init.c b/arch/mips/generic/init.c
index 029f47ea390c..66a19337d2ab 100644
--- a/arch/mips/generic/init.c
+++ b/arch/mips/generic/init.c
@@ -39,12 +39,11 @@ void __init *plat_get_fdt(void)
/* Already set up */
return (void *)fdt;
- if ((fw_arg0 == -2) && !fdt_check_header((void *)fw_passed_dtb)) {
+ if (fw_passed_dtb && !fdt_check_header((void *)fw_passed_dtb)) {
/*
- * We booted using the UHI boot protocol, so we have been
- * provided with the appropriate device tree for the board.
- * Make use of it & search for any machine struct based upon
- * the root compatible string.
+ * We have been provided with the appropriate device tree for
+ * the board. Make use of it & search for any machine struct
+ * based upon the root compatible string.
*/
fdt = (void *)fw_passed_dtb;