]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - arch/arm/lib/bootm-fdt.c
Merge branch 'tx6-bugfix'
[karo-tx-uboot.git] / arch / arm / lib / bootm-fdt.c
index d4f1578e9e96fcdbd1434b5c5e663339844ada83..7677358742e1bd3ee257495bbff71f67f2965cc4 100644 (file)
 
 #include <common.h>
 #include <fdt_support.h>
+#ifdef CONFIG_ARMV7_NONSEC
 #include <asm/armv7.h>
+#endif
+#include <asm/psci.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -31,14 +34,19 @@ int arch_fixup_fdt(void *blob)
        for (bank = 0; bank < CONFIG_NR_DRAM_BANKS; bank++) {
                start[bank] = bd->bi_dram[bank].start;
                size[bank] = bd->bi_dram[bank].size;
+#ifdef CONFIG_ARMV7_NONSEC
+               ret = armv7_apply_memory_carveout(&start[bank], &size[bank]);
+               if (ret)
+                       return ret;
+#endif
        }
 
        ret = fdt_fixup_memory_banks(blob, start, size, CONFIG_NR_DRAM_BANKS);
-#if defined(CONFIG_ARMV7_NONSEC) || defined(CONFIG_ARMV7_VIRT)
+#ifdef CONFIG_ARMV7_NONSEC
        if (ret)
                return ret;
 
-       ret = armv7_update_dt(blob);
+       ret = psci_update_dt(blob);
 #endif
        return ret;
 }