Merge branch 'master' of git://git.denx.de/u-boot-mmc
[oweals/u-boot.git] / arch / arm / lib / bootm-fdt.c
index 0eb10a86874371936bbfaf6ca2cb74523c32c616..a51755070bc93bad6cb4e05618613afb07c58d9c 100644 (file)
 
 #include <common.h>
 #include <fdt_support.h>
+#ifdef CONFIG_ARMV7_NONSEC
 #include <asm/armv7.h>
+#endif
 #include <asm/psci.h>
+#include <asm/spin_table.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
+#ifdef CONFIG_ARCH_FIXUP_FDT
 int arch_fixup_fdt(void *blob)
 {
        bd_t *bd = gd->bd;
@@ -40,11 +44,21 @@ int arch_fixup_fdt(void *blob)
        }
 
        ret = fdt_fixup_memory_banks(blob, start, size, CONFIG_NR_DRAM_BANKS);
-#ifdef CONFIG_ARMV7_NONSEC
        if (ret)
                return ret;
 
+#ifdef CONFIG_ARMV8_SPIN_TABLE
+       ret = spin_table_update_dt(blob);
+       if (ret)
+               return ret;
+#endif
+
+#if defined(CONFIG_ARMV7_NONSEC) || defined(CONFIG_ARMV8_PSCI)
        ret = psci_update_dt(blob);
+       if (ret)
+               return ret;
 #endif
-       return ret;
+
+       return 0;
 }
+#endif