psci.h (5e2aa2ed08e2e280121dc7cf5609c87d464f12ef) | psci.h (be120397e7709d9d5ed88317a385ce864a2603bc) |
---|---|
1/* 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 * 11 * Copyright (C) 2012 ARM Limited 12 */ 13 14#ifndef __ASM_ARM_PSCI_H 15#define __ASM_ARM_PSCI_H 16 | 1/* 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 * 11 * Copyright (C) 2012 ARM Limited 12 */ 13 14#ifndef __ASM_ARM_PSCI_H 15#define __ASM_ARM_PSCI_H 16 |
17#define PSCI_POWER_STATE_TYPE_STANDBY 0 18#define PSCI_POWER_STATE_TYPE_POWER_DOWN 1 19 20struct psci_power_state { 21 u16 id; 22 u8 type; 23 u8 affinity_level; 24}; 25 26struct psci_operations { 27 int (*cpu_suspend)(struct psci_power_state state, 28 unsigned long entry_point); 29 int (*cpu_off)(struct psci_power_state state); 30 int (*cpu_on)(unsigned long cpuid, unsigned long entry_point); 31 int (*migrate)(unsigned long cpuid); 32 int (*affinity_info)(unsigned long target_affinity, 33 unsigned long lowest_affinity_level); 34 int (*migrate_info_type)(void); 35}; 36 37extern struct psci_operations psci_ops; | |
38extern struct smp_operations psci_smp_ops; 39 40#ifdef CONFIG_ARM_PSCI | 17extern struct smp_operations psci_smp_ops; 18 19#ifdef CONFIG_ARM_PSCI |
41int psci_init(void); | |
42bool psci_smp_available(void); 43#else | 20bool psci_smp_available(void); 21#else |
44static inline int psci_init(void) { return 0; } | |
45static inline bool psci_smp_available(void) { return false; } 46#endif 47 48#endif /* __ASM_ARM_PSCI_H */ | 22static inline bool psci_smp_available(void) { return false; } 23#endif 24 25#endif /* __ASM_ARM_PSCI_H */ |