History

Merge tag 'firmware/psci-1.0' of git://git.kernel.org/pub/scm/linux/kernel/git/lpieralisi/linux into next/drivers

This pull request contains patches that enable PSCI 1.0 firmware features for arm/arm64 platforms: - Lorenzo Pieralisi adds support for the PSCI_FEATURES call, manages various 1.0 specifications updates (power state id and functions return values) and provides PSCI v1.0 DT bindings - Sudeep Holla implements PSCI v1.0 system suspend support to enable PSCI based suspend-to-RAM * tag 'firmware/psci-1.0' of git://git.kernel.org/pub/scm/linux/kernel/git/lpieralisi/linux: drivers: firmware: psci: add system suspend support drivers: firmware: psci: define more generic PSCI_FN_NATIVE macro drivers: firmware: psci: add PSCI v1.0 DT bindings drivers: firmware: psci: add extended stateid power_state support drivers: firmware: psci: add PSCI_FEATURES call drivers: firmware: psci: move power_state handling to generic code drivers: firmware: psci: add INVALID_ADDRESS return value

Olof Johansson committed 11 years ago

Commit 825294c2 parents 73ebb85 faf7ec45 files · +123 −24Browse files

Showing the changes to include/uapi (1 of 5 files). Show all

Unified · Split

include/uapi/linux/psci.h+18−0
@@ -46,6 +46,11 @@ · 45 unmodified lines
4646 #define PSCI_0_2_FN64_MIGRATE PSCI_0_2_FN64(5)
4747 #define PSCI_0_2_FN64_MIGRATE_INFO_UP_CPU PSCI_0_2_FN64(7)
4848
49+#define PSCI_1_0_FN_PSCI_FEATURES PSCI_0_2_FN(10)
50+#define PSCI_1_0_FN_SYSTEM_SUSPEND PSCI_0_2_FN(14)
51+
52+#define PSCI_1_0_FN64_SYSTEM_SUSPEND PSCI_0_2_FN64(14)
53+
4954 /* PSCI v0.2 power state encoding for CPU_SUSPEND function */
5055 #define PSCI_0_2_POWER_STATE_ID_MASK 0xffff
5156 #define PSCI_0_2_POWER_STATE_ID_SHIFT 0
@@ -56,6 +61,13 @@ · 4 unmodified lines
5661 #define PSCI_0_2_POWER_STATE_AFFL_MASK \
5762 (0x3 << PSCI_0_2_POWER_STATE_AFFL_SHIFT)
5863
64+/* PSCI extended power state encoding for CPU_SUSPEND function */
65+#define PSCI_1_0_EXT_POWER_STATE_ID_MASK 0xfffffff
66+#define PSCI_1_0_EXT_POWER_STATE_ID_SHIFT 0
67+#define PSCI_1_0_EXT_POWER_STATE_TYPE_SHIFT 30
68+#define PSCI_1_0_EXT_POWER_STATE_TYPE_MASK \
69+ (0x1 << PSCI_1_0_EXT_POWER_STATE_TYPE_SHIFT)
70+
5971 /* PSCI v0.2 affinity level state returned by AFFINITY_INFO */
6072 #define PSCI_0_2_AFFINITY_LEVEL_ON 0
6173 #define PSCI_0_2_AFFINITY_LEVEL_OFF 1
@@ -76,6 +88,11 @@ · 14 unmodified lines
7688 #define PSCI_VERSION_MINOR(ver) \
7789 ((ver) & PSCI_VERSION_MINOR_MASK)
7890
91+/* PSCI features decoding (>=1.0) */
92+#define PSCI_1_0_FEATURES_CPU_SUSPEND_PF_SHIFT 1
93+#define PSCI_1_0_FEATURES_CPU_SUSPEND_PF_MASK \
94+ (0x1 << PSCI_1_0_FEATURES_CPU_SUSPEND_PF_SHIFT)
95+
7996 /* PSCI return values (inclusive of all PSCI versions) */
8097 #define PSCI_RET_SUCCESS 0
8198 #define PSCI_RET_NOT_SUPPORTED -1
@@ -86,5 +103,6 @@ · 4 unmodified lines
86103 #define PSCI_RET_INTERNAL_FAILURE -6
87104 #define PSCI_RET_NOT_PRESENT -7
88105 #define PSCI_RET_DISABLED -8
106+#define PSCI_RET_INVALID_ADDRESS -9
89107
90108 #endif /* _UAPI_LINUX_PSCI_H */