1 /* SPDX-License-Identifier: GPL-2.0-only */
4 * Copyright (C) 2015 ARM Limited
10 #include <linux/arm-smccc.h>
11 #include <linux/init.h>
12 #include <linux/types.h>
14 #define PSCI_POWER_STATE_TYPE_STANDBY 0
15 #define PSCI_POWER_STATE_TYPE_POWER_DOWN 1
17 bool psci_tos_resident_on(int cpu);
19 int psci_cpu_suspend_enter(u32 state);
20 bool psci_power_state_is_valid(u32 state);
27 struct psci_operations {
28 u32 (*get_version)(void);
29 int (*cpu_suspend)(u32 state, unsigned long entry_point);
30 int (*cpu_off)(u32 state);
31 int (*cpu_on)(unsigned long cpuid, unsigned long entry_point);
32 int (*migrate)(unsigned long cpuid);
33 int (*affinity_info)(unsigned long target_affinity,
34 unsigned long lowest_affinity_level);
35 int (*migrate_info_type)(void);
36 enum arm_smccc_conduit conduit;
37 enum smccc_version smccc_version;
40 extern struct psci_operations psci_ops;
42 #if defined(CONFIG_ARM_PSCI_FW)
43 int __init psci_dt_init(void);
45 static inline int psci_dt_init(void) { return 0; }
48 #if defined(CONFIG_ARM_PSCI_FW) && defined(CONFIG_ACPI)
49 int __init psci_acpi_init(void);
50 bool __init acpi_psci_present(void);
51 bool acpi_psci_use_hvc(void);
53 static inline int psci_acpi_init(void) { return 0; }
54 static inline bool acpi_psci_present(void) { return false; }
55 static inline bool acpi_psci_use_hvc(void) {return false; }
58 #endif /* __LINUX_PSCI_H */