Skip to content

Commit 67eebf7

Browse files
MJNowakowskipaulburton
authored andcommitted
generic: fix appended dtb support
Appended DTB support is mostly intended to be used on legacy systems, but it is a valid feature that can be enabled for generic platform, which currently doesn't support it - if selected, the appended DTB will be ignored by the platform startup code. During kernel startup, the appended DTB's location is stored in fw_passed_dtb if the init code finds what appears to be a valid DTB. Otherwise (if a0 == -2), a1 is stored in fw_passed_dtb, so either way it will always point to either a user-passed DTB or built-in DTB. Signed-off-by: Marcin Nowakowski <[email protected]> Signed-off-by: Paul Burton <[email protected]> Cc: [email protected]
1 parent e6308b6 commit 67eebf7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/mips/generic/init.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ void __init *plat_get_fdt(void)
4343
/* Already set up */
4444
return (void *)fdt;
4545

46-
if ((fw_arg0 == -2) && !fdt_check_header((void *)fw_arg1)) {
46+
if ((fw_arg0 == -2) && !fdt_check_header((void *)fw_passed_dtb)) {
4747
/*
4848
* We booted using the UHI boot protocol, so we have been
4949
* provided with the appropriate device tree for the board.
5050
* Make use of it & search for any machine struct based upon
5151
* the root compatible string.
5252
*/
53-
fdt = (void *)fw_arg1;
53+
fdt = (void *)fw_passed_dtb;
5454

5555
for_each_mips_machine(check_mach) {
5656
match = mips_machine_is_compatible(check_mach, fdt);

0 commit comments

Comments
 (0)