.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
---|
1 | 2 | /* |
---|
2 | | - * This program is free software; you can redistribute it and/or modify |
---|
3 | | - * it under the terms of the GNU General Public License version 2 as |
---|
4 | | - * published by the Free Software Foundation. |
---|
5 | | - * |
---|
6 | | - * This program is distributed in the hope that it will be useful, |
---|
7 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
8 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
9 | | - * GNU General Public License for more details. |
---|
10 | 3 | * |
---|
11 | 4 | * Copyright (C) 2015 ARM Limited |
---|
12 | 5 | */ |
---|
.. | .. |
---|
14 | 7 | #ifndef __LINUX_PSCI_H |
---|
15 | 8 | #define __LINUX_PSCI_H |
---|
16 | 9 | |
---|
| 10 | +#include <linux/arm-smccc.h> |
---|
17 | 11 | #include <linux/init.h> |
---|
18 | 12 | #include <linux/types.h> |
---|
19 | 13 | |
---|
.. | .. |
---|
22 | 16 | |
---|
23 | 17 | bool psci_tos_resident_on(int cpu); |
---|
24 | 18 | |
---|
25 | | -int psci_cpu_init_idle(unsigned int cpu); |
---|
26 | | -int psci_cpu_suspend_enter(unsigned long index); |
---|
27 | | - |
---|
28 | | -enum psci_conduit { |
---|
29 | | - PSCI_CONDUIT_NONE, |
---|
30 | | - PSCI_CONDUIT_SMC, |
---|
31 | | - PSCI_CONDUIT_HVC, |
---|
32 | | -}; |
---|
| 19 | +int psci_cpu_suspend_enter(u32 state); |
---|
| 20 | +bool psci_power_state_is_valid(u32 state); |
---|
| 21 | +int psci_set_osi_mode(bool enable); |
---|
| 22 | +bool psci_has_osi_support(void); |
---|
33 | 23 | |
---|
34 | 24 | struct psci_operations { |
---|
35 | 25 | u32 (*get_version)(void); |
---|
.. | .. |
---|
40 | 30 | int (*affinity_info)(unsigned long target_affinity, |
---|
41 | 31 | unsigned long lowest_affinity_level); |
---|
42 | 32 | int (*migrate_info_type)(void); |
---|
43 | | - enum psci_conduit conduit; |
---|
44 | | - u32 smccc_version; |
---|
45 | 33 | }; |
---|
46 | 34 | |
---|
47 | 35 | extern struct psci_operations psci_ops; |
---|
48 | 36 | |
---|
| 37 | +struct psci_0_1_function_ids { |
---|
| 38 | + u32 cpu_suspend; |
---|
| 39 | + u32 cpu_on; |
---|
| 40 | + u32 cpu_off; |
---|
| 41 | + u32 migrate; |
---|
| 42 | +}; |
---|
| 43 | + |
---|
| 44 | +struct psci_0_1_function_ids get_psci_0_1_function_ids(void); |
---|
| 45 | + |
---|
49 | 46 | #if defined(CONFIG_ARM_PSCI_FW) |
---|
50 | 47 | int __init psci_dt_init(void); |
---|
51 | 48 | #else |
---|