summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/cpu/armv7/virt-dt.c4
-rw-r--r--arch/arm/include/asm/armv7.h1
-rw-r--r--arch/arm/include/asm/psci.h4
-rw-r--r--arch/arm/lib/bootm-fdt.c4
4 files changed, 9 insertions, 4 deletions
diff --git a/arch/arm/cpu/armv7/virt-dt.c b/arch/arm/cpu/armv7/virt-dt.c
index ad19e4c47c..9408e33203 100644
--- a/arch/arm/cpu/armv7/virt-dt.c
+++ b/arch/arm/cpu/armv7/virt-dt.c
@@ -88,10 +88,12 @@ static int fdt_psci(void *fdt)
return 0;
}
-int armv7_update_dt(void *fdt)
+int psci_update_dt(void *fdt)
{
+#if defined(CONFIG_ARMV7_NONSEC) || defined(CONFIG_ARMV7_VIRT)
if (!armv7_boot_nonsec())
return 0;
+#endif
#ifndef CONFIG_ARMV7_SECURE_BASE
/* secure code lives in RAM, keep it alive */
fdt_add_mem_rsv(fdt, (unsigned long)__secure_start,
diff --git a/arch/arm/include/asm/armv7.h b/arch/arm/include/asm/armv7.h
index edb3b80015..c3cc5088ea 100644
--- a/arch/arm/include/asm/armv7.h
+++ b/arch/arm/include/asm/armv7.h
@@ -124,7 +124,6 @@ void v7_outer_cache_inval_range(u32 start, u32 end);
#if defined(CONFIG_ARMV7_NONSEC) || defined(CONFIG_ARMV7_VIRT)
int armv7_init_nonsec(void);
-int armv7_update_dt(void *fdt);
bool armv7_boot_nonsec(void);
/* defined in assembly file */
diff --git a/arch/arm/include/asm/psci.h b/arch/arm/include/asm/psci.h
index 704b4b0018..50a3ca45e1 100644
--- a/arch/arm/include/asm/psci.h
+++ b/arch/arm/include/asm/psci.h
@@ -32,4 +32,8 @@
#define ARM_PSCI_RET_INVAL (-2)
#define ARM_PSCI_RET_DENIED (-3)
+#ifndef __ASSEMBLY__
+int psci_update_dt(void *fdt);
+#endif /* ! __ASSEMBLY__ */
+
#endif /* __ARM_PSCI_H__ */
diff --git a/arch/arm/lib/bootm-fdt.c b/arch/arm/lib/bootm-fdt.c
index d4f1578e9e..665a3bc37f 100644
--- a/arch/arm/lib/bootm-fdt.c
+++ b/arch/arm/lib/bootm-fdt.c
@@ -17,7 +17,7 @@
#include <common.h>
#include <fdt_support.h>
-#include <asm/armv7.h>
+#include <asm/psci.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -38,7 +38,7 @@ int arch_fixup_fdt(void *blob)
if (ret)
return ret;
- ret = armv7_update_dt(blob);
+ ret = psci_update_dt(blob);
#endif
return ret;
}
OpenPOWER on IntegriCloud