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>
                /* 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;