aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm/psci.h
diff options
context:
space:
mode:
authorMark Rutland <mark.rutland@arm.com>2015-07-31 10:46:19 -0400
committerWill Deacon <will.deacon@arm.com>2015-08-03 10:38:39 -0400
commitbe120397e7709d9d5ed88317a385ce864a2603bc (patch)
tree24f5b34790658e004e7912218249df11f7c532c6 /arch/arm/include/asm/psci.h
parent37cf524f9360f9165d67459b7bf795c01824df98 (diff)
ARM: migrate to common PSCI client code
Now that the common PSCI client code has been factored out to drivers/firmware, and made safe for 32-bit use, move the 32-bit ARM code over to it. This results in a moderate reduction of duplicated lines, and will prevent further duplication as the PSCI client code is updated for PSCI 1.0 and beyond. The two legacy platform users of the PSCI invocation code are updated to account for interface changes. In both cases the power state parameter (which is constant) is now generated using macros, so that the pack/unpack logic can be killed in preparation for PSCI 1.0 power state changes. Signed-off-by: Mark Rutland <mark.rutland@arm.com> Acked-by: Rob Herring <robh@kernel.org> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Ashwin Chaugule <ashwin.chaugule@linaro.org> Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Cc: Russell King <rmk+kernel@arm.linux.org.uk> Cc: Will Deacon <will.deacon@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm/include/asm/psci.h')
-rw-r--r--arch/arm/include/asm/psci.h23
1 files changed, 0 insertions, 23 deletions
diff --git a/arch/arm/include/asm/psci.h b/arch/arm/include/asm/psci.h
index c25ef3ec6d1f..68ee3ce17b82 100644
--- a/arch/arm/include/asm/psci.h
+++ b/arch/arm/include/asm/psci.h
@@ -14,34 +14,11 @@
14#ifndef __ASM_ARM_PSCI_H 14#ifndef __ASM_ARM_PSCI_H
15#define __ASM_ARM_PSCI_H 15#define __ASM_ARM_PSCI_H
16 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; 17extern struct smp_operations psci_smp_ops;
39 18
40#ifdef CONFIG_ARM_PSCI 19#ifdef CONFIG_ARM_PSCI
41int psci_init(void);
42bool psci_smp_available(void); 20bool psci_smp_available(void);
43#else 21#else
44static inline int psci_init(void) { return 0; }
45static inline bool psci_smp_available(void) { return false; } 22static inline bool psci_smp_available(void) { return false; }
46#endif 23#endif
47 24