Skip to content

Commit 323690d

Browse files
pcercueitsbogend
authored andcommitted
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>
1 parent 13a0ea2 commit 323690d

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

‎arch/mips/generic/init.c‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,11 @@ void __init *plat_get_fdt(void)
3939
/* Already set up */
4040
return (void *)fdt;
4141

42-
if ((fw_arg0 == -2) && !fdt_check_header((void *)fw_passed_dtb)) {
42+
if (fw_passed_dtb && !fdt_check_header((void *)fw_passed_dtb)) {
4343
/*
44-
* We booted using the UHI boot protocol, so we have been
45-
* provided with the appropriate device tree for the board.
46-
* Make use of it & search for any machine struct based upon
47-
* the root compatible string.
44+
* We have been provided with the appropriate device tree for
45+
* the board. Make use of it & search for any machine struct
46+
* based upon the root compatible string.
4847
*/
4948
fdt = (void *)fw_passed_dtb;
5049

0 commit comments

Comments
 (0)