Merge branch '2019-01-18-master-imports'
[oweals/u-boot.git] / arch / arm / cpu / armv8 / fsl-layerscape / fdt.c
index 99c5d134c335dbfa28a4d2a5d1d4a846fba07ba2..c9c2c3f6d3e8bb8bf9da86c99918ab1d4df2349e 100644 (file)
@@ -1,7 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright 2014-2015 Freescale Semiconductor, Inc.
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
@@ -136,7 +135,7 @@ remove_psci_node:
 
        fdt_add_mem_rsv(blob, (uintptr_t)&secondary_boot_code,
                        *boot_code_size);
-#if defined(CONFIG_EFI_LOADER) && !defined(CONFIG_SPL_BUILD)
+#if CONFIG_IS_ENABLED(EFI_LOADER)
        efi_add_memory_map((uintptr_t)&secondary_boot_code,
                           ALIGN(*boot_code_size, EFI_PAGE_SIZE) >> EFI_PAGE_SHIFT,
                           EFI_RESERVED_MEMORY_TYPE, false);
@@ -415,8 +414,8 @@ void ft_cpu_setup(void *blob, bd_t *bd)
                ccsr_sec_t __iomem *sec;
 
 #ifdef CONFIG_ARMV8_SEC_FIRMWARE_SUPPORT
-               if (fdt_fixup_kaslr(blob))
-                       fdt_fixup_remove_jr(blob);
+               fdt_fixup_remove_jr(blob);
+               fdt_fixup_kaslr(blob);
 #endif
 
                sec = (void __iomem *)CONFIG_SYS_FSL_SEC_ADDR;