ARM: uniphier: include <asm/system.h> instead of <asm/cache.h> from psci.c
[oweals/u-boot.git] / arch / arm / mach-uniphier / arm32 / psci.c
index efe7419cc962dd6a8fc6d1dd762df314d741b492..b54dc3979d66ee40998f3572bce2c17ee298cfa6 100644 (file)
@@ -1,11 +1,11 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright (C) 2016 Socionext Inc.
  *   Author: Masahiro Yamada <yamada.masahiro@socionext.com>
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
+#include <cpu_func.h>
 #include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/io.h>
@@ -16,6 +16,7 @@
 #include <asm/processor.h>
 #include <asm/psci.h>
 #include <asm/secure.h>
+#include <asm/system.h>
 
 #include "../debug.h"
 #include "../soc-info.h"
@@ -131,7 +132,8 @@ void psci_arch_init(void)
 
 u32 uniphier_psci_holding_pen_release __secure_data = 0xffffffff;
 
-int __secure psci_cpu_on(u32 function_id, u32 cpuid, u32 entry_point)
+s32 __secure psci_cpu_on(u32 function_id, u32 cpuid, u32 entry_point,
+                        u32 context_id)
 {
        u32 cpu = cpuid & 0xff;
 
@@ -139,9 +141,11 @@ int __secure psci_cpu_on(u32 function_id, u32 cpuid, u32 entry_point)
        debug_puth(cpuid);
        debug_puts(", entry_point=");
        debug_puth(entry_point);
+       debug_puts(", context_id=");
+       debug_puth(context_id);
        debug_puts("\n");
 
-       psci_save_target_pc(cpu, entry_point);
+       psci_save(cpu, entry_point, context_id);
 
        /* We assume D-cache is off, so do not call flush_dcache() here */
        uniphier_psci_holding_pen_release = cpu;
@@ -153,7 +157,7 @@ int __secure psci_cpu_on(u32 function_id, u32 cpuid, u32 entry_point)
        return PSCI_RET_SUCCESS;
 }
 
-void __secure psci_system_reset(u32 function_id)
+void __secure psci_system_reset(void)
 {
        reset_cpu(0);
 }