diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/acpi/acexcep.h | 461 | ||||
-rw-r--r-- | include/acpi/acoutput.h | 53 | ||||
-rw-r--r-- | include/acpi/acpi_bus.h | 33 | ||||
-rw-r--r-- | include/acpi/acpi_drivers.h | 1 | ||||
-rw-r--r-- | include/acpi/acpixf.h | 2 | ||||
-rw-r--r-- | include/acpi/actbl2.h | 47 | ||||
-rw-r--r-- | include/acpi/actbl3.h | 55 | ||||
-rw-r--r-- | include/acpi/actypes.h | 16 | ||||
-rw-r--r-- | include/linux/acpi.h | 4 | ||||
-rw-r--r-- | include/linux/clockchips.h | 32 | ||||
-rw-r--r-- | include/linux/cpufreq.h | 21 | ||||
-rw-r--r-- | include/linux/cpuidle.h | 23 | ||||
-rw-r--r-- | include/linux/platform_data/clk-lpss.h | 18 |
13 files changed, 501 insertions, 265 deletions
diff --git a/include/acpi/acexcep.h b/include/acpi/acexcep.h index 9bf59d0e8aaa..cf051e05a8fe 100644 --- a/include/acpi/acexcep.h +++ b/include/acpi/acexcep.h | |||
@@ -44,17 +44,50 @@ | |||
44 | #ifndef __ACEXCEP_H__ | 44 | #ifndef __ACEXCEP_H__ |
45 | #define __ACEXCEP_H__ | 45 | #define __ACEXCEP_H__ |
46 | 46 | ||
47 | /* This module contains all possible exception codes for acpi_status */ | ||
48 | |||
47 | /* | 49 | /* |
48 | * Exceptions returned by external ACPI interfaces | 50 | * Exception code classes |
49 | */ | 51 | */ |
50 | #define AE_CODE_ENVIRONMENTAL 0x0000 | 52 | #define AE_CODE_ENVIRONMENTAL 0x0000 /* General ACPICA environment */ |
51 | #define AE_CODE_PROGRAMMER 0x1000 | 53 | #define AE_CODE_PROGRAMMER 0x1000 /* External ACPICA interface caller */ |
52 | #define AE_CODE_ACPI_TABLES 0x2000 | 54 | #define AE_CODE_ACPI_TABLES 0x2000 /* ACPI tables */ |
53 | #define AE_CODE_AML 0x3000 | 55 | #define AE_CODE_AML 0x3000 /* From executing AML code */ |
54 | #define AE_CODE_CONTROL 0x4000 | 56 | #define AE_CODE_CONTROL 0x4000 /* Internal control codes */ |
57 | |||
55 | #define AE_CODE_MAX 0x4000 | 58 | #define AE_CODE_MAX 0x4000 |
56 | #define AE_CODE_MASK 0xF000 | 59 | #define AE_CODE_MASK 0xF000 |
57 | 60 | ||
61 | /* | ||
62 | * Macros to insert the exception code classes | ||
63 | */ | ||
64 | #define EXCEP_ENV(code) ((acpi_status) (code | AE_CODE_ENVIRONMENTAL)) | ||
65 | #define EXCEP_PGM(code) ((acpi_status) (code | AE_CODE_PROGRAMMER)) | ||
66 | #define EXCEP_TBL(code) ((acpi_status) (code | AE_CODE_ACPI_TABLES)) | ||
67 | #define EXCEP_AML(code) ((acpi_status) (code | AE_CODE_AML)) | ||
68 | #define EXCEP_CTL(code) ((acpi_status) (code | AE_CODE_CONTROL)) | ||
69 | |||
70 | /* | ||
71 | * Exception info table. The "Description" field is used only by the | ||
72 | * ACPICA help application (acpihelp). | ||
73 | */ | ||
74 | struct acpi_exception_info { | ||
75 | char *name; | ||
76 | |||
77 | #ifdef ACPI_HELP_APP | ||
78 | char *description; | ||
79 | #endif | ||
80 | }; | ||
81 | |||
82 | #ifdef ACPI_HELP_APP | ||
83 | #define EXCEP_TXT(name,description) {name, description} | ||
84 | #else | ||
85 | #define EXCEP_TXT(name,description) {name} | ||
86 | #endif | ||
87 | |||
88 | /* | ||
89 | * Success is always zero, failure is non-zero | ||
90 | */ | ||
58 | #define ACPI_SUCCESS(a) (!(a)) | 91 | #define ACPI_SUCCESS(a) (!(a)) |
59 | #define ACPI_FAILURE(a) (a) | 92 | #define ACPI_FAILURE(a) (a) |
60 | 93 | ||
@@ -64,60 +97,60 @@ | |||
64 | /* | 97 | /* |
65 | * Environmental exceptions | 98 | * Environmental exceptions |
66 | */ | 99 | */ |
67 | #define AE_ERROR (acpi_status) (0x0001 | AE_CODE_ENVIRONMENTAL) | 100 | #define AE_ERROR EXCEP_ENV (0x0001) |
68 | #define AE_NO_ACPI_TABLES (acpi_status) (0x0002 | AE_CODE_ENVIRONMENTAL) | 101 | #define AE_NO_ACPI_TABLES EXCEP_ENV (0x0002) |
69 | #define AE_NO_NAMESPACE (acpi_status) (0x0003 | AE_CODE_ENVIRONMENTAL) | 102 | #define AE_NO_NAMESPACE EXCEP_ENV (0x0003) |
70 | #define AE_NO_MEMORY (acpi_status) (0x0004 | AE_CODE_ENVIRONMENTAL) | 103 | #define AE_NO_MEMORY EXCEP_ENV (0x0004) |
71 | #define AE_NOT_FOUND (acpi_status) (0x0005 | AE_CODE_ENVIRONMENTAL) | 104 | #define AE_NOT_FOUND EXCEP_ENV (0x0005) |
72 | #define AE_NOT_EXIST (acpi_status) (0x0006 | AE_CODE_ENVIRONMENTAL) | 105 | #define AE_NOT_EXIST EXCEP_ENV (0x0006) |
73 | #define AE_ALREADY_EXISTS (acpi_status) (0x0007 | AE_CODE_ENVIRONMENTAL) | 106 | #define AE_ALREADY_EXISTS EXCEP_ENV (0x0007) |
74 | #define AE_TYPE (acpi_status) (0x0008 | AE_CODE_ENVIRONMENTAL) | 107 | #define AE_TYPE EXCEP_ENV (0x0008) |
75 | #define AE_NULL_OBJECT (acpi_status) (0x0009 | AE_CODE_ENVIRONMENTAL) | 108 | #define AE_NULL_OBJECT EXCEP_ENV (0x0009) |
76 | #define AE_NULL_ENTRY (acpi_status) (0x000A | AE_CODE_ENVIRONMENTAL) | 109 | #define AE_NULL_ENTRY EXCEP_ENV (0x000A) |
77 | #define AE_BUFFER_OVERFLOW (acpi_status) (0x000B | AE_CODE_ENVIRONMENTAL) | 110 | #define AE_BUFFER_OVERFLOW EXCEP_ENV (0x000B) |
78 | #define AE_STACK_OVERFLOW (acpi_status) (0x000C | AE_CODE_ENVIRONMENTAL) | 111 | #define AE_STACK_OVERFLOW EXCEP_ENV (0x000C) |
79 | #define AE_STACK_UNDERFLOW (acpi_status) (0x000D | AE_CODE_ENVIRONMENTAL) | 112 | #define AE_STACK_UNDERFLOW EXCEP_ENV (0x000D) |
80 | #define AE_NOT_IMPLEMENTED (acpi_status) (0x000E | AE_CODE_ENVIRONMENTAL) | 113 | #define AE_NOT_IMPLEMENTED EXCEP_ENV (0x000E) |
81 | #define AE_SUPPORT (acpi_status) (0x000F | AE_CODE_ENVIRONMENTAL) | 114 | #define AE_SUPPORT EXCEP_ENV (0x000F) |
82 | #define AE_LIMIT (acpi_status) (0x0010 | AE_CODE_ENVIRONMENTAL) | 115 | #define AE_LIMIT EXCEP_ENV (0x0010) |
83 | #define AE_TIME (acpi_status) (0x0011 | AE_CODE_ENVIRONMENTAL) | 116 | #define AE_TIME EXCEP_ENV (0x0011) |
84 | #define AE_ACQUIRE_DEADLOCK (acpi_status) (0x0012 | AE_CODE_ENVIRONMENTAL) | 117 | #define AE_ACQUIRE_DEADLOCK EXCEP_ENV (0x0012) |
85 | #define AE_RELEASE_DEADLOCK (acpi_status) (0x0013 | AE_CODE_ENVIRONMENTAL) | 118 | #define AE_RELEASE_DEADLOCK EXCEP_ENV (0x0013) |
86 | #define AE_NOT_ACQUIRED (acpi_status) (0x0014 | AE_CODE_ENVIRONMENTAL) | 119 | #define AE_NOT_ACQUIRED EXCEP_ENV (0x0014) |
87 | #define AE_ALREADY_ACQUIRED (acpi_status) (0x0015 | AE_CODE_ENVIRONMENTAL) | 120 | #define AE_ALREADY_ACQUIRED EXCEP_ENV (0x0015) |
88 | #define AE_NO_HARDWARE_RESPONSE (acpi_status) (0x0016 | AE_CODE_ENVIRONMENTAL) | 121 | #define AE_NO_HARDWARE_RESPONSE EXCEP_ENV (0x0016) |
89 | #define AE_NO_GLOBAL_LOCK (acpi_status) (0x0017 | AE_CODE_ENVIRONMENTAL) | 122 | #define AE_NO_GLOBAL_LOCK EXCEP_ENV (0x0017) |
90 | #define AE_ABORT_METHOD (acpi_status) (0x0018 | AE_CODE_ENVIRONMENTAL) | 123 | #define AE_ABORT_METHOD EXCEP_ENV (0x0018) |
91 | #define AE_SAME_HANDLER (acpi_status) (0x0019 | AE_CODE_ENVIRONMENTAL) | 124 | #define AE_SAME_HANDLER EXCEP_ENV (0x0019) |
92 | #define AE_NO_HANDLER (acpi_status) (0x001A | AE_CODE_ENVIRONMENTAL) | 125 | #define AE_NO_HANDLER EXCEP_ENV (0x001A) |
93 | #define AE_OWNER_ID_LIMIT (acpi_status) (0x001B | AE_CODE_ENVIRONMENTAL) | 126 | #define AE_OWNER_ID_LIMIT EXCEP_ENV (0x001B) |
94 | #define AE_NOT_CONFIGURED (acpi_status) (0x001C | AE_CODE_ENVIRONMENTAL) | 127 | #define AE_NOT_CONFIGURED EXCEP_ENV (0x001C) |
95 | 128 | ||
96 | #define AE_CODE_ENV_MAX 0x001C | 129 | #define AE_CODE_ENV_MAX 0x001C |
97 | 130 | ||
98 | /* | 131 | /* |
99 | * Programmer exceptions | 132 | * Programmer exceptions |
100 | */ | 133 | */ |
101 | #define AE_BAD_PARAMETER (acpi_status) (0x0001 | AE_CODE_PROGRAMMER) | 134 | #define AE_BAD_PARAMETER EXCEP_PGM (0x0001) |
102 | #define AE_BAD_CHARACTER (acpi_status) (0x0002 | AE_CODE_PROGRAMMER) | 135 | #define AE_BAD_CHARACTER EXCEP_PGM (0x0002) |
103 | #define AE_BAD_PATHNAME (acpi_status) (0x0003 | AE_CODE_PROGRAMMER) | 136 | #define AE_BAD_PATHNAME EXCEP_PGM (0x0003) |
104 | #define AE_BAD_DATA (acpi_status) (0x0004 | AE_CODE_PROGRAMMER) | 137 | #define AE_BAD_DATA EXCEP_PGM (0x0004) |
105 | #define AE_BAD_HEX_CONSTANT (acpi_status) (0x0005 | AE_CODE_PROGRAMMER) | 138 | #define AE_BAD_HEX_CONSTANT EXCEP_PGM (0x0005) |
106 | #define AE_BAD_OCTAL_CONSTANT (acpi_status) (0x0006 | AE_CODE_PROGRAMMER) | 139 | #define AE_BAD_OCTAL_CONSTANT EXCEP_PGM (0x0006) |
107 | #define AE_BAD_DECIMAL_CONSTANT (acpi_status) (0x0007 | AE_CODE_PROGRAMMER) | 140 | #define AE_BAD_DECIMAL_CONSTANT EXCEP_PGM (0x0007) |
108 | #define AE_MISSING_ARGUMENTS (acpi_status) (0x0008 | AE_CODE_PROGRAMMER) | 141 | #define AE_MISSING_ARGUMENTS EXCEP_PGM (0x0008) |
109 | #define AE_BAD_ADDRESS (acpi_status) (0x0009 | AE_CODE_PROGRAMMER) | 142 | #define AE_BAD_ADDRESS EXCEP_PGM (0x0009) |
110 | 143 | ||
111 | #define AE_CODE_PGM_MAX 0x0009 | 144 | #define AE_CODE_PGM_MAX 0x0009 |
112 | 145 | ||
113 | /* | 146 | /* |
114 | * Acpi table exceptions | 147 | * Acpi table exceptions |
115 | */ | 148 | */ |
116 | #define AE_BAD_SIGNATURE (acpi_status) (0x0001 | AE_CODE_ACPI_TABLES) | 149 | #define AE_BAD_SIGNATURE EXCEP_TBL (0x0001) |
117 | #define AE_BAD_HEADER (acpi_status) (0x0002 | AE_CODE_ACPI_TABLES) | 150 | #define AE_BAD_HEADER EXCEP_TBL (0x0002) |
118 | #define AE_BAD_CHECKSUM (acpi_status) (0x0003 | AE_CODE_ACPI_TABLES) | 151 | #define AE_BAD_CHECKSUM EXCEP_TBL (0x0003) |
119 | #define AE_BAD_VALUE (acpi_status) (0x0004 | AE_CODE_ACPI_TABLES) | 152 | #define AE_BAD_VALUE EXCEP_TBL (0x0004) |
120 | #define AE_INVALID_TABLE_LENGTH (acpi_status) (0x0005 | AE_CODE_ACPI_TABLES) | 153 | #define AE_INVALID_TABLE_LENGTH EXCEP_TBL (0x0005) |
121 | 154 | ||
122 | #define AE_CODE_TBL_MAX 0x0005 | 155 | #define AE_CODE_TBL_MAX 0x0005 |
123 | 156 | ||
@@ -125,58 +158,58 @@ | |||
125 | * AML exceptions. These are caused by problems with | 158 | * AML exceptions. These are caused by problems with |
126 | * the actual AML byte stream | 159 | * the actual AML byte stream |
127 | */ | 160 | */ |
128 | #define AE_AML_BAD_OPCODE (acpi_status) (0x0001 | AE_CODE_AML) | 161 | #define AE_AML_BAD_OPCODE EXCEP_AML (0x0001) |
129 | #define AE_AML_NO_OPERAND (acpi_status) (0x0002 | AE_CODE_AML) | 162 | #define AE_AML_NO_OPERAND EXCEP_AML (0x0002) |
130 | #define AE_AML_OPERAND_TYPE (acpi_status) (0x0003 | AE_CODE_AML) | 163 | #define AE_AML_OPERAND_TYPE EXCEP_AML (0x0003) |
131 | #define AE_AML_OPERAND_VALUE (acpi_status) (0x0004 | AE_CODE_AML) | 164 | #define AE_AML_OPERAND_VALUE EXCEP_AML (0x0004) |
132 | #define AE_AML_UNINITIALIZED_LOCAL (acpi_status) (0x0005 | AE_CODE_AML) | 165 | #define AE_AML_UNINITIALIZED_LOCAL EXCEP_AML (0x0005) |
133 | #define AE_AML_UNINITIALIZED_ARG (acpi_status) (0x0006 | AE_CODE_AML) | 166 | #define AE_AML_UNINITIALIZED_ARG EXCEP_AML (0x0006) |
134 | #define AE_AML_UNINITIALIZED_ELEMENT (acpi_status) (0x0007 | AE_CODE_AML) | 167 | #define AE_AML_UNINITIALIZED_ELEMENT EXCEP_AML (0x0007) |
135 | #define AE_AML_NUMERIC_OVERFLOW (acpi_status) (0x0008 | AE_CODE_AML) | 168 | #define AE_AML_NUMERIC_OVERFLOW EXCEP_AML (0x0008) |
136 | #define AE_AML_REGION_LIMIT (acpi_status) (0x0009 | AE_CODE_AML) | 169 | #define AE_AML_REGION_LIMIT EXCEP_AML (0x0009) |
137 | #define AE_AML_BUFFER_LIMIT (acpi_status) (0x000A | AE_CODE_AML) | 170 | #define AE_AML_BUFFER_LIMIT EXCEP_AML (0x000A) |
138 | #define AE_AML_PACKAGE_LIMIT (acpi_status) (0x000B | AE_CODE_AML) | 171 | #define AE_AML_PACKAGE_LIMIT EXCEP_AML (0x000B) |
139 | #define AE_AML_DIVIDE_BY_ZERO (acpi_status) (0x000C | AE_CODE_AML) | 172 | #define AE_AML_DIVIDE_BY_ZERO EXCEP_AML (0x000C) |
140 | #define AE_AML_BAD_NAME (acpi_status) (0x000D | AE_CODE_AML) | 173 | #define AE_AML_BAD_NAME EXCEP_AML (0x000D) |
141 | #define AE_AML_NAME_NOT_FOUND (acpi_status) (0x000E | AE_CODE_AML) | 174 | #define AE_AML_NAME_NOT_FOUND EXCEP_AML (0x000E) |
142 | #define AE_AML_INTERNAL (acpi_status) (0x000F | AE_CODE_AML) | 175 | #define AE_AML_INTERNAL EXCEP_AML (0x000F) |
143 | #define AE_AML_INVALID_SPACE_ID (acpi_status) (0x0010 | AE_CODE_AML) | 176 | #define AE_AML_INVALID_SPACE_ID EXCEP_AML (0x0010) |
144 | #define AE_AML_STRING_LIMIT (acpi_status) (0x0011 | AE_CODE_AML) | 177 | #define AE_AML_STRING_LIMIT EXCEP_AML (0x0011) |
145 | #define AE_AML_NO_RETURN_VALUE (acpi_status) (0x0012 | AE_CODE_AML) | 178 | #define AE_AML_NO_RETURN_VALUE EXCEP_AML (0x0012) |
146 | #define AE_AML_METHOD_LIMIT (acpi_status) (0x0013 | AE_CODE_AML) | 179 | #define AE_AML_METHOD_LIMIT EXCEP_AML (0x0013) |
147 | #define AE_AML_NOT_OWNER (acpi_status) (0x0014 | AE_CODE_AML) | 180 | #define AE_AML_NOT_OWNER EXCEP_AML (0x0014) |
148 | #define AE_AML_MUTEX_ORDER (acpi_status) (0x0015 | AE_CODE_AML) | 181 | #define AE_AML_MUTEX_ORDER EXCEP_AML (0x0015) |
149 | #define AE_AML_MUTEX_NOT_ACQUIRED (acpi_status) (0x0016 | AE_CODE_AML) | 182 | #define AE_AML_MUTEX_NOT_ACQUIRED EXCEP_AML (0x0016) |
150 | #define AE_AML_INVALID_RESOURCE_TYPE (acpi_status) (0x0017 | AE_CODE_AML) | 183 | #define AE_AML_INVALID_RESOURCE_TYPE EXCEP_AML (0x0017) |
151 | #define AE_AML_INVALID_INDEX (acpi_status) (0x0018 | AE_CODE_AML) | 184 | #define AE_AML_INVALID_INDEX EXCEP_AML (0x0018) |
152 | #define AE_AML_REGISTER_LIMIT (acpi_status) (0x0019 | AE_CODE_AML) | 185 | #define AE_AML_REGISTER_LIMIT EXCEP_AML (0x0019) |
153 | #define AE_AML_NO_WHILE (acpi_status) (0x001A | AE_CODE_AML) | 186 | #define AE_AML_NO_WHILE EXCEP_AML (0x001A) |
154 | #define AE_AML_ALIGNMENT (acpi_status) (0x001B | AE_CODE_AML) | 187 | #define AE_AML_ALIGNMENT EXCEP_AML (0x001B) |
155 | #define AE_AML_NO_RESOURCE_END_TAG (acpi_status) (0x001C | AE_CODE_AML) | 188 | #define AE_AML_NO_RESOURCE_END_TAG EXCEP_AML (0x001C) |
156 | #define AE_AML_BAD_RESOURCE_VALUE (acpi_status) (0x001D | AE_CODE_AML) | 189 | #define AE_AML_BAD_RESOURCE_VALUE EXCEP_AML (0x001D) |
157 | #define AE_AML_CIRCULAR_REFERENCE (acpi_status) (0x001E | AE_CODE_AML) | 190 | #define AE_AML_CIRCULAR_REFERENCE EXCEP_AML (0x001E) |
158 | #define AE_AML_BAD_RESOURCE_LENGTH (acpi_status) (0x001F | AE_CODE_AML) | 191 | #define AE_AML_BAD_RESOURCE_LENGTH EXCEP_AML (0x001F) |
159 | #define AE_AML_ILLEGAL_ADDRESS (acpi_status) (0x0020 | AE_CODE_AML) | 192 | #define AE_AML_ILLEGAL_ADDRESS EXCEP_AML (0x0020) |
160 | #define AE_AML_INFINITE_LOOP (acpi_status) (0x0021 | AE_CODE_AML) | 193 | #define AE_AML_INFINITE_LOOP EXCEP_AML (0x0021) |
161 | 194 | ||
162 | #define AE_CODE_AML_MAX 0x0021 | 195 | #define AE_CODE_AML_MAX 0x0021 |
163 | 196 | ||
164 | /* | 197 | /* |
165 | * Internal exceptions used for control | 198 | * Internal exceptions used for control |
166 | */ | 199 | */ |
167 | #define AE_CTRL_RETURN_VALUE (acpi_status) (0x0001 | AE_CODE_CONTROL) | 200 | #define AE_CTRL_RETURN_VALUE EXCEP_CTL (0x0001) |
168 | #define AE_CTRL_PENDING (acpi_status) (0x0002 | AE_CODE_CONTROL) | 201 | #define AE_CTRL_PENDING EXCEP_CTL (0x0002) |
169 | #define AE_CTRL_TERMINATE (acpi_status) (0x0003 | AE_CODE_CONTROL) | 202 | #define AE_CTRL_TERMINATE EXCEP_CTL (0x0003) |
170 | #define AE_CTRL_TRUE (acpi_status) (0x0004 | AE_CODE_CONTROL) | 203 | #define AE_CTRL_TRUE EXCEP_CTL (0x0004) |
171 | #define AE_CTRL_FALSE (acpi_status) (0x0005 | AE_CODE_CONTROL) | 204 | #define AE_CTRL_FALSE EXCEP_CTL (0x0005) |
172 | #define AE_CTRL_DEPTH (acpi_status) (0x0006 | AE_CODE_CONTROL) | 205 | #define AE_CTRL_DEPTH EXCEP_CTL (0x0006) |
173 | #define AE_CTRL_END (acpi_status) (0x0007 | AE_CODE_CONTROL) | 206 | #define AE_CTRL_END EXCEP_CTL (0x0007) |
174 | #define AE_CTRL_TRANSFER (acpi_status) (0x0008 | AE_CODE_CONTROL) | 207 | #define AE_CTRL_TRANSFER EXCEP_CTL (0x0008) |
175 | #define AE_CTRL_BREAK (acpi_status) (0x0009 | AE_CODE_CONTROL) | 208 | #define AE_CTRL_BREAK EXCEP_CTL (0x0009) |
176 | #define AE_CTRL_CONTINUE (acpi_status) (0x000A | AE_CODE_CONTROL) | 209 | #define AE_CTRL_CONTINUE EXCEP_CTL (0x000A) |
177 | #define AE_CTRL_SKIP (acpi_status) (0x000B | AE_CODE_CONTROL) | 210 | #define AE_CTRL_SKIP EXCEP_CTL (0x000B) |
178 | #define AE_CTRL_PARSE_CONTINUE (acpi_status) (0x000C | AE_CODE_CONTROL) | 211 | #define AE_CTRL_PARSE_CONTINUE EXCEP_CTL (0x000C) |
179 | #define AE_CTRL_PARSE_PENDING (acpi_status) (0x000D | AE_CODE_CONTROL) | 212 | #define AE_CTRL_PARSE_PENDING EXCEP_CTL (0x000D) |
180 | 213 | ||
181 | #define AE_CODE_CTRL_MAX 0x000D | 214 | #define AE_CODE_CTRL_MAX 0x000D |
182 | 215 | ||
@@ -188,112 +221,156 @@ | |||
188 | * String versions of the exception codes above | 221 | * String versions of the exception codes above |
189 | * These strings must match the corresponding defines exactly | 222 | * These strings must match the corresponding defines exactly |
190 | */ | 223 | */ |
191 | char const *acpi_gbl_exception_names_env[] = { | 224 | static const struct acpi_exception_info acpi_gbl_exception_names_env[] = { |
192 | "AE_OK", | 225 | EXCEP_TXT("AE_OK", "No error"), |
193 | "AE_ERROR", | 226 | EXCEP_TXT("AE_ERROR", "Unspecified error"), |
194 | "AE_NO_ACPI_TABLES", | 227 | EXCEP_TXT("AE_NO_ACPI_TABLES", "ACPI tables could not be found"), |
195 | "AE_NO_NAMESPACE", | 228 | EXCEP_TXT("AE_NO_NAMESPACE", "A namespace has not been loaded"), |
196 | "AE_NO_MEMORY", | 229 | EXCEP_TXT("AE_NO_MEMORY", "Insufficient dynamic memory"), |
197 | "AE_NOT_FOUND", | 230 | EXCEP_TXT("AE_NOT_FOUND", "The name was not found in the namespace"), |
198 | "AE_NOT_EXIST", | 231 | EXCEP_TXT("AE_NOT_EXIST", "A required entity does not exist"), |
199 | "AE_ALREADY_EXISTS", | 232 | EXCEP_TXT("AE_ALREADY_EXISTS", "An entity already exists"), |
200 | "AE_TYPE", | 233 | EXCEP_TXT("AE_TYPE", "The object type is incorrect"), |
201 | "AE_NULL_OBJECT", | 234 | EXCEP_TXT("AE_NULL_OBJECT", "A required object was missing"), |
202 | "AE_NULL_ENTRY", | 235 | EXCEP_TXT("AE_NULL_ENTRY", "The requested object does not exist"), |
203 | "AE_BUFFER_OVERFLOW", | 236 | EXCEP_TXT("AE_BUFFER_OVERFLOW", "The buffer provided is too small"), |
204 | "AE_STACK_OVERFLOW", | 237 | EXCEP_TXT("AE_STACK_OVERFLOW", "An internal stack overflowed"), |
205 | "AE_STACK_UNDERFLOW", | 238 | EXCEP_TXT("AE_STACK_UNDERFLOW", "An internal stack underflowed"), |
206 | "AE_NOT_IMPLEMENTED", | 239 | EXCEP_TXT("AE_NOT_IMPLEMENTED", "The feature is not implemented"), |
207 | "AE_SUPPORT", | 240 | EXCEP_TXT("AE_SUPPORT", "The feature is not supported"), |
208 | "AE_LIMIT", | 241 | EXCEP_TXT("AE_LIMIT", "A predefined limit was exceeded"), |
209 | "AE_TIME", | 242 | EXCEP_TXT("AE_TIME", "A time limit or timeout expired"), |
210 | "AE_ACQUIRE_DEADLOCK", | 243 | EXCEP_TXT("AE_ACQUIRE_DEADLOCK", |
211 | "AE_RELEASE_DEADLOCK", | 244 | "Internal error, attempt was made to acquire a mutex in improper order"), |
212 | "AE_NOT_ACQUIRED", | 245 | EXCEP_TXT("AE_RELEASE_DEADLOCK", |
213 | "AE_ALREADY_ACQUIRED", | 246 | "Internal error, attempt was made to release a mutex in improper order"), |
214 | "AE_NO_HARDWARE_RESPONSE", | 247 | EXCEP_TXT("AE_NOT_ACQUIRED", |
215 | "AE_NO_GLOBAL_LOCK", | 248 | "An attempt to release a mutex or Global Lock without a previous acquire"), |
216 | "AE_ABORT_METHOD", | 249 | EXCEP_TXT("AE_ALREADY_ACQUIRED", |
217 | "AE_SAME_HANDLER", | 250 | "Internal error, attempt was made to acquire a mutex twice"), |
218 | "AE_NO_HANDLER", | 251 | EXCEP_TXT("AE_NO_HARDWARE_RESPONSE", |
219 | "AE_OWNER_ID_LIMIT", | 252 | "Hardware did not respond after an I/O operation"), |
220 | "AE_NOT_CONFIGURED" | 253 | EXCEP_TXT("AE_NO_GLOBAL_LOCK", "There is no FACS Global Lock"), |
254 | EXCEP_TXT("AE_ABORT_METHOD", "A control method was aborted"), | ||
255 | EXCEP_TXT("AE_SAME_HANDLER", | ||
256 | "Attempt was made to install the same handler that is already installed"), | ||
257 | EXCEP_TXT("AE_NO_HANDLER", | ||
258 | "A handler for the operation is not installed"), | ||
259 | EXCEP_TXT("AE_OWNER_ID_LIMIT", | ||
260 | "There are no more Owner IDs available for ACPI tables or control methods"), | ||
261 | EXCEP_TXT("AE_NOT_CONFIGURED", | ||
262 | "The interface is not part of the current subsystem configuration") | ||
221 | }; | 263 | }; |
222 | 264 | ||
223 | char const *acpi_gbl_exception_names_pgm[] = { | 265 | static const struct acpi_exception_info acpi_gbl_exception_names_pgm[] = { |
224 | NULL, | 266 | EXCEP_TXT(NULL, NULL), |
225 | "AE_BAD_PARAMETER", | 267 | EXCEP_TXT("AE_BAD_PARAMETER", "A parameter is out of range or invalid"), |
226 | "AE_BAD_CHARACTER", | 268 | EXCEP_TXT("AE_BAD_CHARACTER", |
227 | "AE_BAD_PATHNAME", | 269 | "An invalid character was found in a name"), |
228 | "AE_BAD_DATA", | 270 | EXCEP_TXT("AE_BAD_PATHNAME", |
229 | "AE_BAD_HEX_CONSTANT", | 271 | "An invalid character was found in a pathname"), |
230 | "AE_BAD_OCTAL_CONSTANT", | 272 | EXCEP_TXT("AE_BAD_DATA", |
231 | "AE_BAD_DECIMAL_CONSTANT", | 273 | "A package or buffer contained incorrect data"), |
232 | "AE_MISSING_ARGUMENTS", | 274 | EXCEP_TXT("AE_BAD_HEX_CONSTANT", "Invalid character in a Hex constant"), |
233 | "AE_BAD_ADDRESS" | 275 | EXCEP_TXT("AE_BAD_OCTAL_CONSTANT", |
276 | "Invalid character in an Octal constant"), | ||
277 | EXCEP_TXT("AE_BAD_DECIMAL_CONSTANT", | ||
278 | "Invalid character in a Decimal constant"), | ||
279 | EXCEP_TXT("AE_MISSING_ARGUMENTS", | ||
280 | "Too few arguments were passed to a control method"), | ||
281 | EXCEP_TXT("AE_BAD_ADDRESS", "An illegal null I/O address") | ||
234 | }; | 282 | }; |
235 | 283 | ||
236 | char const *acpi_gbl_exception_names_tbl[] = { | 284 | static const struct acpi_exception_info acpi_gbl_exception_names_tbl[] = { |
237 | NULL, | 285 | EXCEP_TXT(NULL, NULL), |
238 | "AE_BAD_SIGNATURE", | 286 | EXCEP_TXT("AE_BAD_SIGNATURE", "An ACPI table has an invalid signature"), |
239 | "AE_BAD_HEADER", | 287 | EXCEP_TXT("AE_BAD_HEADER", "Invalid field in an ACPI table header"), |
240 | "AE_BAD_CHECKSUM", | 288 | EXCEP_TXT("AE_BAD_CHECKSUM", "An ACPI table checksum is not correct"), |
241 | "AE_BAD_VALUE", | 289 | EXCEP_TXT("AE_BAD_VALUE", "An invalid value was found in a table"), |
242 | "AE_INVALID_TABLE_LENGTH" | 290 | EXCEP_TXT("AE_INVALID_TABLE_LENGTH", |
291 | "The FADT or FACS has improper length") | ||
243 | }; | 292 | }; |
244 | 293 | ||
245 | char const *acpi_gbl_exception_names_aml[] = { | 294 | static const struct acpi_exception_info acpi_gbl_exception_names_aml[] = { |
246 | NULL, | 295 | EXCEP_TXT(NULL, NULL), |
247 | "AE_AML_BAD_OPCODE", | 296 | EXCEP_TXT("AE_AML_BAD_OPCODE", "Invalid AML opcode encountered"), |
248 | "AE_AML_NO_OPERAND", | 297 | EXCEP_TXT("AE_AML_NO_OPERAND", "A required operand is missing"), |
249 | "AE_AML_OPERAND_TYPE", | 298 | EXCEP_TXT("AE_AML_OPERAND_TYPE", |
250 | "AE_AML_OPERAND_VALUE", | 299 | "An operand of an incorrect type was encountered"), |
251 | "AE_AML_UNINITIALIZED_LOCAL", | 300 | EXCEP_TXT("AE_AML_OPERAND_VALUE", |
252 | "AE_AML_UNINITIALIZED_ARG", | 301 | "The operand had an inappropriate or invalid value"), |
253 | "AE_AML_UNINITIALIZED_ELEMENT", | 302 | EXCEP_TXT("AE_AML_UNINITIALIZED_LOCAL", |
254 | "AE_AML_NUMERIC_OVERFLOW", | 303 | "Method tried to use an uninitialized local variable"), |
255 | "AE_AML_REGION_LIMIT", | 304 | EXCEP_TXT("AE_AML_UNINITIALIZED_ARG", |
256 | "AE_AML_BUFFER_LIMIT", | 305 | "Method tried to use an uninitialized argument"), |
257 | "AE_AML_PACKAGE_LIMIT", | 306 | EXCEP_TXT("AE_AML_UNINITIALIZED_ELEMENT", |
258 | "AE_AML_DIVIDE_BY_ZERO", | 307 | "Method tried to use an empty package element"), |
259 | "AE_AML_BAD_NAME", | 308 | EXCEP_TXT("AE_AML_NUMERIC_OVERFLOW", |
260 | "AE_AML_NAME_NOT_FOUND", | 309 | "Overflow during BCD conversion or other"), |
261 | "AE_AML_INTERNAL", | 310 | EXCEP_TXT("AE_AML_REGION_LIMIT", |
262 | "AE_AML_INVALID_SPACE_ID", | 311 | "Tried to access beyond the end of an Operation Region"), |
263 | "AE_AML_STRING_LIMIT", | 312 | EXCEP_TXT("AE_AML_BUFFER_LIMIT", |
264 | "AE_AML_NO_RETURN_VALUE", | 313 | "Tried to access beyond the end of a buffer"), |
265 | "AE_AML_METHOD_LIMIT", | 314 | EXCEP_TXT("AE_AML_PACKAGE_LIMIT", |
266 | "AE_AML_NOT_OWNER", | 315 | "Tried to access beyond the end of a package"), |
267 | "AE_AML_MUTEX_ORDER", | 316 | EXCEP_TXT("AE_AML_DIVIDE_BY_ZERO", |
268 | "AE_AML_MUTEX_NOT_ACQUIRED", | 317 | "During execution of AML Divide operator"), |
269 | "AE_AML_INVALID_RESOURCE_TYPE", | 318 | EXCEP_TXT("AE_AML_BAD_NAME", |
270 | "AE_AML_INVALID_INDEX", | 319 | "An ACPI name contains invalid character(s)"), |
271 | "AE_AML_REGISTER_LIMIT", | 320 | EXCEP_TXT("AE_AML_NAME_NOT_FOUND", |
272 | "AE_AML_NO_WHILE", | 321 | "Could not resolve a named reference"), |
273 | "AE_AML_ALIGNMENT", | 322 | EXCEP_TXT("AE_AML_INTERNAL", "An internal error within the interprete"), |
274 | "AE_AML_NO_RESOURCE_END_TAG", | 323 | EXCEP_TXT("AE_AML_INVALID_SPACE_ID", |
275 | "AE_AML_BAD_RESOURCE_VALUE", | 324 | "An Operation Region SpaceID is invalid"), |
276 | "AE_AML_CIRCULAR_REFERENCE", | 325 | EXCEP_TXT("AE_AML_STRING_LIMIT", |
277 | "AE_AML_BAD_RESOURCE_LENGTH", | 326 | "String is longer than 200 characters"), |
278 | "AE_AML_ILLEGAL_ADDRESS", | 327 | EXCEP_TXT("AE_AML_NO_RETURN_VALUE", |
279 | "AE_AML_INFINITE_LOOP" | 328 | "A method did not return a required value"), |
329 | EXCEP_TXT("AE_AML_METHOD_LIMIT", | ||
330 | "A control method reached the maximum reentrancy limit of 255"), | ||
331 | EXCEP_TXT("AE_AML_NOT_OWNER", | ||
332 | "A thread tried to release a mutex that it does not own"), | ||
333 | EXCEP_TXT("AE_AML_MUTEX_ORDER", "Mutex SyncLevel release mismatch"), | ||
334 | EXCEP_TXT("AE_AML_MUTEX_NOT_ACQUIRED", | ||
335 | "Attempt to release a mutex that was not previously acquired"), | ||
336 | EXCEP_TXT("AE_AML_INVALID_RESOURCE_TYPE", | ||
337 | "Invalid resource type in resource list"), | ||
338 | EXCEP_TXT("AE_AML_INVALID_INDEX", | ||
339 | "Invalid Argx or Localx (x too large)"), | ||
340 | EXCEP_TXT("AE_AML_REGISTER_LIMIT", | ||
341 | "Bank value or Index value beyond range of register"), | ||
342 | EXCEP_TXT("AE_AML_NO_WHILE", "Break or Continue without a While"), | ||
343 | EXCEP_TXT("AE_AML_ALIGNMENT", | ||
344 | "Non-aligned memory transfer on platform that does not support this"), | ||
345 | EXCEP_TXT("AE_AML_NO_RESOURCE_END_TAG", | ||
346 | "No End Tag in a resource list"), | ||
347 | EXCEP_TXT("AE_AML_BAD_RESOURCE_VALUE", | ||
348 | "Invalid value of a resource element"), | ||
349 | EXCEP_TXT("AE_AML_CIRCULAR_REFERENCE", | ||
350 | "Two references refer to each other"), | ||
351 | EXCEP_TXT("AE_AML_BAD_RESOURCE_LENGTH", | ||
352 | "The length of a Resource Descriptor in the AML is incorrect"), | ||
353 | EXCEP_TXT("AE_AML_ILLEGAL_ADDRESS", | ||
354 | "A memory, I/O, or PCI configuration address is invalid"), | ||
355 | EXCEP_TXT("AE_AML_INFINITE_LOOP", | ||
356 | "An apparent infinite AML While loop, method was aborted") | ||
280 | }; | 357 | }; |
281 | 358 | ||
282 | char const *acpi_gbl_exception_names_ctrl[] = { | 359 | static const struct acpi_exception_info acpi_gbl_exception_names_ctrl[] = { |
283 | NULL, | 360 | EXCEP_TXT(NULL, NULL), |
284 | "AE_CTRL_RETURN_VALUE", | 361 | EXCEP_TXT("AE_CTRL_RETURN_VALUE", "A Method returned a value"), |
285 | "AE_CTRL_PENDING", | 362 | EXCEP_TXT("AE_CTRL_PENDING", "Method is calling another method"), |
286 | "AE_CTRL_TERMINATE", | 363 | EXCEP_TXT("AE_CTRL_TERMINATE", "Terminate the executing method"), |
287 | "AE_CTRL_TRUE", | 364 | EXCEP_TXT("AE_CTRL_TRUE", "An If or While predicate result"), |
288 | "AE_CTRL_FALSE", | 365 | EXCEP_TXT("AE_CTRL_FALSE", "An If or While predicate result"), |
289 | "AE_CTRL_DEPTH", | 366 | EXCEP_TXT("AE_CTRL_DEPTH", "Maximum search depth has been reached"), |
290 | "AE_CTRL_END", | 367 | EXCEP_TXT("AE_CTRL_END", "An If or While predicate is false"), |
291 | "AE_CTRL_TRANSFER", | 368 | EXCEP_TXT("AE_CTRL_TRANSFER", "Transfer control to called method"), |
292 | "AE_CTRL_BREAK", | 369 | EXCEP_TXT("AE_CTRL_BREAK", "A Break has been executed"), |
293 | "AE_CTRL_CONTINUE", | 370 | EXCEP_TXT("AE_CTRL_CONTINUE", "A Continue has been executed"), |
294 | "AE_CTRL_SKIP", | 371 | EXCEP_TXT("AE_CTRL_SKIP", "Not currently used"), |
295 | "AE_CTRL_PARSE_CONTINUE", | 372 | EXCEP_TXT("AE_CTRL_PARSE_CONTINUE", "Used to skip over bad opcodes"), |
296 | "AE_CTRL_PARSE_PENDING" | 373 | EXCEP_TXT("AE_CTRL_PARSE_PENDING", "Used to implement AML While loops") |
297 | }; | 374 | }; |
298 | 375 | ||
299 | #endif /* EXCEPTION_TABLE */ | 376 | #endif /* EXCEPTION_TABLE */ |
diff --git a/include/acpi/acoutput.h b/include/acpi/acoutput.h index 9885276178e0..4f52ea795c7a 100644 --- a/include/acpi/acoutput.h +++ b/include/acpi/acoutput.h | |||
@@ -324,9 +324,9 @@ | |||
324 | 324 | ||
325 | /* Helper macro */ | 325 | /* Helper macro */ |
326 | 326 | ||
327 | #define ACPI_TRACE_ENTRY(name, function, cast, param) \ | 327 | #define ACPI_TRACE_ENTRY(name, function, type, param) \ |
328 | ACPI_FUNCTION_NAME (name) \ | 328 | ACPI_FUNCTION_NAME (name) \ |
329 | function (ACPI_DEBUG_PARAMETERS, cast (param)) | 329 | function (ACPI_DEBUG_PARAMETERS, (type) (param)) |
330 | 330 | ||
331 | /* The actual entry trace macros */ | 331 | /* The actual entry trace macros */ |
332 | 332 | ||
@@ -335,13 +335,13 @@ | |||
335 | acpi_ut_trace (ACPI_DEBUG_PARAMETERS) | 335 | acpi_ut_trace (ACPI_DEBUG_PARAMETERS) |
336 | 336 | ||
337 | #define ACPI_FUNCTION_TRACE_PTR(name, pointer) \ | 337 | #define ACPI_FUNCTION_TRACE_PTR(name, pointer) \ |
338 | ACPI_TRACE_ENTRY (name, acpi_ut_trace_ptr, (void *), pointer) | 338 | ACPI_TRACE_ENTRY (name, acpi_ut_trace_ptr, void *, pointer) |
339 | 339 | ||
340 | #define ACPI_FUNCTION_TRACE_U32(name, value) \ | 340 | #define ACPI_FUNCTION_TRACE_U32(name, value) \ |
341 | ACPI_TRACE_ENTRY (name, acpi_ut_trace_u32, (u32), value) | 341 | ACPI_TRACE_ENTRY (name, acpi_ut_trace_u32, u32, value) |
342 | 342 | ||
343 | #define ACPI_FUNCTION_TRACE_STR(name, string) \ | 343 | #define ACPI_FUNCTION_TRACE_STR(name, string) \ |
344 | ACPI_TRACE_ENTRY (name, acpi_ut_trace_str, (char *), string) | 344 | ACPI_TRACE_ENTRY (name, acpi_ut_trace_str, char *, string) |
345 | 345 | ||
346 | #define ACPI_FUNCTION_ENTRY() \ | 346 | #define ACPI_FUNCTION_ENTRY() \ |
347 | acpi_ut_track_stack_ptr() | 347 | acpi_ut_track_stack_ptr() |
@@ -355,16 +355,37 @@ | |||
355 | * | 355 | * |
356 | * One of the FUNCTION_TRACE macros above must be used in conjunction | 356 | * One of the FUNCTION_TRACE macros above must be used in conjunction |
357 | * with these macros so that "_AcpiFunctionName" is defined. | 357 | * with these macros so that "_AcpiFunctionName" is defined. |
358 | * | ||
359 | * There are two versions of most of the return macros. The default version is | ||
360 | * safer, since it avoids side-effects by guaranteeing that the argument will | ||
361 | * not be evaluated twice. | ||
362 | * | ||
363 | * A less-safe version of the macros is provided for optional use if the | ||
364 | * compiler uses excessive CPU stack (for example, this may happen in the | ||
365 | * debug case if code optimzation is disabled.) | ||
358 | */ | 366 | */ |
359 | 367 | ||
360 | /* Exit trace helper macro */ | 368 | /* Exit trace helper macro */ |
361 | 369 | ||
362 | #define ACPI_TRACE_EXIT(function, cast, param) \ | 370 | #ifndef ACPI_SIMPLE_RETURN_MACROS |
371 | |||
372 | #define ACPI_TRACE_EXIT(function, type, param) \ | ||
373 | ACPI_DO_WHILE0 ({ \ | ||
374 | register type _param = (type) (param); \ | ||
375 | function (ACPI_DEBUG_PARAMETERS, _param); \ | ||
376 | return (_param); \ | ||
377 | }) | ||
378 | |||
379 | #else /* Use original less-safe macros */ | ||
380 | |||
381 | #define ACPI_TRACE_EXIT(function, type, param) \ | ||
363 | ACPI_DO_WHILE0 ({ \ | 382 | ACPI_DO_WHILE0 ({ \ |
364 | function (ACPI_DEBUG_PARAMETERS, cast (param)); \ | 383 | function (ACPI_DEBUG_PARAMETERS, (type) (param)); \ |
365 | return ((param)); \ | 384 | return (param); \ |
366 | }) | 385 | }) |
367 | 386 | ||
387 | #endif /* ACPI_SIMPLE_RETURN_MACROS */ | ||
388 | |||
368 | /* The actual exit macros */ | 389 | /* The actual exit macros */ |
369 | 390 | ||
370 | #define return_VOID \ | 391 | #define return_VOID \ |
@@ -374,13 +395,19 @@ | |||
374 | }) | 395 | }) |
375 | 396 | ||
376 | #define return_ACPI_STATUS(status) \ | 397 | #define return_ACPI_STATUS(status) \ |
377 | ACPI_TRACE_EXIT (acpi_ut_status_exit, (acpi_status), status) | 398 | ACPI_TRACE_EXIT (acpi_ut_status_exit, acpi_status, status) |
378 | 399 | ||
379 | #define return_PTR(pointer) \ | 400 | #define return_PTR(pointer) \ |
380 | ACPI_TRACE_EXIT (acpi_ut_ptr_exit, (u8 *), pointer) | 401 | ACPI_TRACE_EXIT (acpi_ut_ptr_exit, void *, pointer) |
381 | 402 | ||
382 | #define return_VALUE(value) \ | 403 | #define return_VALUE(value) \ |
383 | ACPI_TRACE_EXIT (acpi_ut_value_exit, (u64), value) | 404 | ACPI_TRACE_EXIT (acpi_ut_value_exit, u64, value) |
405 | |||
406 | #define return_UINT32(value) \ | ||
407 | ACPI_TRACE_EXIT (acpi_ut_value_exit, u32, value) | ||
408 | |||
409 | #define return_UINT8(value) \ | ||
410 | ACPI_TRACE_EXIT (acpi_ut_value_exit, u8, value) | ||
384 | 411 | ||
385 | /* Conditional execution */ | 412 | /* Conditional execution */ |
386 | 413 | ||
@@ -428,8 +455,10 @@ | |||
428 | 455 | ||
429 | #define return_VOID return | 456 | #define return_VOID return |
430 | #define return_ACPI_STATUS(s) return(s) | 457 | #define return_ACPI_STATUS(s) return(s) |
431 | #define return_VALUE(s) return(s) | ||
432 | #define return_PTR(s) return(s) | 458 | #define return_PTR(s) return(s) |
459 | #define return_VALUE(s) return(s) | ||
460 | #define return_UINT8(s) return(s) | ||
461 | #define return_UINT32(s) return(s) | ||
433 | 462 | ||
434 | #endif /* ACPI_DEBUG_OUTPUT */ | 463 | #endif /* ACPI_DEBUG_OUTPUT */ |
435 | 464 | ||
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index 22ba56e834e2..98db31d9f9b4 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h | |||
@@ -88,11 +88,30 @@ struct acpi_device; | |||
88 | * ----------------- | 88 | * ----------------- |
89 | */ | 89 | */ |
90 | 90 | ||
91 | enum acpi_hotplug_mode { | ||
92 | AHM_GENERIC = 0, | ||
93 | AHM_CONTAINER, | ||
94 | AHM_COUNT | ||
95 | }; | ||
96 | |||
97 | struct acpi_hotplug_profile { | ||
98 | struct kobject kobj; | ||
99 | bool enabled:1; | ||
100 | enum acpi_hotplug_mode mode; | ||
101 | }; | ||
102 | |||
103 | static inline struct acpi_hotplug_profile *to_acpi_hotplug_profile( | ||
104 | struct kobject *kobj) | ||
105 | { | ||
106 | return container_of(kobj, struct acpi_hotplug_profile, kobj); | ||
107 | } | ||
108 | |||
91 | struct acpi_scan_handler { | 109 | struct acpi_scan_handler { |
92 | const struct acpi_device_id *ids; | 110 | const struct acpi_device_id *ids; |
93 | struct list_head list_node; | 111 | struct list_head list_node; |
94 | int (*attach)(struct acpi_device *dev, const struct acpi_device_id *id); | 112 | int (*attach)(struct acpi_device *dev, const struct acpi_device_id *id); |
95 | void (*detach)(struct acpi_device *dev); | 113 | void (*detach)(struct acpi_device *dev); |
114 | struct acpi_hotplug_profile hotplug; | ||
96 | }; | 115 | }; |
97 | 116 | ||
98 | /* | 117 | /* |
@@ -142,7 +161,6 @@ struct acpi_device_status { | |||
142 | 161 | ||
143 | struct acpi_device_flags { | 162 | struct acpi_device_flags { |
144 | u32 dynamic_status:1; | 163 | u32 dynamic_status:1; |
145 | u32 bus_address:1; | ||
146 | u32 removable:1; | 164 | u32 removable:1; |
147 | u32 ejectable:1; | 165 | u32 ejectable:1; |
148 | u32 suprise_removal_ok:1; | 166 | u32 suprise_removal_ok:1; |
@@ -150,7 +168,7 @@ struct acpi_device_flags { | |||
150 | u32 performance_manageable:1; | 168 | u32 performance_manageable:1; |
151 | u32 eject_pending:1; | 169 | u32 eject_pending:1; |
152 | u32 match_driver:1; | 170 | u32 match_driver:1; |
153 | u32 reserved:23; | 171 | u32 reserved:24; |
154 | }; | 172 | }; |
155 | 173 | ||
156 | /* File System */ | 174 | /* File System */ |
@@ -173,10 +191,17 @@ struct acpi_hardware_id { | |||
173 | char *id; | 191 | char *id; |
174 | }; | 192 | }; |
175 | 193 | ||
194 | struct acpi_pnp_type { | ||
195 | u32 hardware_id:1; | ||
196 | u32 bus_address:1; | ||
197 | u32 reserved:30; | ||
198 | }; | ||
199 | |||
176 | struct acpi_device_pnp { | 200 | struct acpi_device_pnp { |
177 | acpi_bus_id bus_id; /* Object name */ | 201 | acpi_bus_id bus_id; /* Object name */ |
202 | struct acpi_pnp_type type; /* ID type */ | ||
178 | acpi_bus_address bus_address; /* _ADR */ | 203 | acpi_bus_address bus_address; /* _ADR */ |
179 | char *unique_id; /* _UID */ | 204 | char *unique_id; /* _UID */ |
180 | struct list_head ids; /* _HID and _CIDs */ | 205 | struct list_head ids; /* _HID and _CIDs */ |
181 | acpi_device_name device_name; /* Driver-determined */ | 206 | acpi_device_name device_name; /* Driver-determined */ |
182 | acpi_device_class device_class; /* " */ | 207 | acpi_device_class device_class; /* " */ |
diff --git a/include/acpi/acpi_drivers.h b/include/acpi/acpi_drivers.h index 627749af0ba7..e6168a24b9f0 100644 --- a/include/acpi/acpi_drivers.h +++ b/include/acpi/acpi_drivers.h | |||
@@ -95,7 +95,6 @@ int acpi_pci_link_free_irq(acpi_handle handle); | |||
95 | struct pci_bus; | 95 | struct pci_bus; |
96 | 96 | ||
97 | struct pci_dev *acpi_get_pci_dev(acpi_handle); | 97 | struct pci_dev *acpi_get_pci_dev(acpi_handle); |
98 | int acpi_pci_bind_root(struct acpi_device *device); | ||
99 | 98 | ||
100 | /* Arch-defined function to add a bus to the system */ | 99 | /* Arch-defined function to add a bus to the system */ |
101 | 100 | ||
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index 03322dddd88e..454881e6450a 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h | |||
@@ -46,7 +46,7 @@ | |||
46 | 46 | ||
47 | /* Current ACPICA subsystem version in YYYYMMDD format */ | 47 | /* Current ACPICA subsystem version in YYYYMMDD format */ |
48 | 48 | ||
49 | #define ACPI_CA_VERSION 0x20130117 | 49 | #define ACPI_CA_VERSION 0x20130328 |
50 | 50 | ||
51 | #include <acpi/acconfig.h> | 51 | #include <acpi/acconfig.h> |
52 | #include <acpi/actypes.h> | 52 | #include <acpi/actypes.h> |
diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h index 77dc7a4099a3..ffaac0e7e0c6 100644 --- a/include/acpi/actbl2.h +++ b/include/acpi/actbl2.h | |||
@@ -72,11 +72,13 @@ | |||
72 | #define ACPI_SIG_IVRS "IVRS" /* I/O Virtualization Reporting Structure */ | 72 | #define ACPI_SIG_IVRS "IVRS" /* I/O Virtualization Reporting Structure */ |
73 | #define ACPI_SIG_MCFG "MCFG" /* PCI Memory Mapped Configuration table */ | 73 | #define ACPI_SIG_MCFG "MCFG" /* PCI Memory Mapped Configuration table */ |
74 | #define ACPI_SIG_MCHI "MCHI" /* Management Controller Host Interface table */ | 74 | #define ACPI_SIG_MCHI "MCHI" /* Management Controller Host Interface table */ |
75 | #define ACPI_SIG_MTMR "MTMR" /* MID Timer table */ | ||
75 | #define ACPI_SIG_SLIC "SLIC" /* Software Licensing Description Table */ | 76 | #define ACPI_SIG_SLIC "SLIC" /* Software Licensing Description Table */ |
76 | #define ACPI_SIG_SPCR "SPCR" /* Serial Port Console Redirection table */ | 77 | #define ACPI_SIG_SPCR "SPCR" /* Serial Port Console Redirection table */ |
77 | #define ACPI_SIG_SPMI "SPMI" /* Server Platform Management Interface table */ | 78 | #define ACPI_SIG_SPMI "SPMI" /* Server Platform Management Interface table */ |
78 | #define ACPI_SIG_TCPA "TCPA" /* Trusted Computing Platform Alliance table */ | 79 | #define ACPI_SIG_TCPA "TCPA" /* Trusted Computing Platform Alliance table */ |
79 | #define ACPI_SIG_UEFI "UEFI" /* Uefi Boot Optimization Table */ | 80 | #define ACPI_SIG_UEFI "UEFI" /* Uefi Boot Optimization Table */ |
81 | #define ACPI_SIG_VRTC "VRTC" /* Virtual Real Time Clock Table */ | ||
80 | #define ACPI_SIG_WAET "WAET" /* Windows ACPI Emulated devices Table */ | 82 | #define ACPI_SIG_WAET "WAET" /* Windows ACPI Emulated devices Table */ |
81 | #define ACPI_SIG_WDAT "WDAT" /* Watchdog Action Table */ | 83 | #define ACPI_SIG_WDAT "WDAT" /* Watchdog Action Table */ |
82 | #define ACPI_SIG_WDDT "WDDT" /* Watchdog Timer Description Table */ | 84 | #define ACPI_SIG_WDDT "WDDT" /* Watchdog Timer Description Table */ |
@@ -852,6 +854,29 @@ struct acpi_table_mchi { | |||
852 | 854 | ||
853 | /******************************************************************************* | 855 | /******************************************************************************* |
854 | * | 856 | * |
857 | * MTMR - MID Timer Table | ||
858 | * Version 1 | ||
859 | * | ||
860 | * Conforms to "Simple Firmware Interface Specification", | ||
861 | * Draft 0.8.2, Oct 19, 2010 | ||
862 | * NOTE: The ACPI MTMR is equivalent to the SFI MTMR table. | ||
863 | * | ||
864 | ******************************************************************************/ | ||
865 | |||
866 | struct acpi_table_mtmr { | ||
867 | struct acpi_table_header header; /* Common ACPI table header */ | ||
868 | }; | ||
869 | |||
870 | /* MTMR entry */ | ||
871 | |||
872 | struct acpi_mtmr_entry { | ||
873 | struct acpi_generic_address physical_address; | ||
874 | u32 frequency; | ||
875 | u32 irq; | ||
876 | }; | ||
877 | |||
878 | /******************************************************************************* | ||
879 | * | ||
855 | * SLIC - Software Licensing Description Table | 880 | * SLIC - Software Licensing Description Table |
856 | * Version 1 | 881 | * Version 1 |
857 | * | 882 | * |
@@ -1025,6 +1050,28 @@ struct acpi_table_uefi { | |||
1025 | 1050 | ||
1026 | /******************************************************************************* | 1051 | /******************************************************************************* |
1027 | * | 1052 | * |
1053 | * VRTC - Virtual Real Time Clock Table | ||
1054 | * Version 1 | ||
1055 | * | ||
1056 | * Conforms to "Simple Firmware Interface Specification", | ||
1057 | * Draft 0.8.2, Oct 19, 2010 | ||
1058 | * NOTE: The ACPI VRTC is equivalent to The SFI MRTC table. | ||
1059 | * | ||
1060 | ******************************************************************************/ | ||
1061 | |||
1062 | struct acpi_table_vrtc { | ||
1063 | struct acpi_table_header header; /* Common ACPI table header */ | ||
1064 | }; | ||
1065 | |||
1066 | /* VRTC entry */ | ||
1067 | |||
1068 | struct acpi_vrtc_entry { | ||
1069 | struct acpi_generic_address physical_address; | ||
1070 | u32 irq; | ||
1071 | }; | ||
1072 | |||
1073 | /******************************************************************************* | ||
1074 | * | ||
1028 | * WAET - Windows ACPI Emulated devices Table | 1075 | * WAET - Windows ACPI Emulated devices Table |
1029 | * Version 1 | 1076 | * Version 1 |
1030 | * | 1077 | * |
diff --git a/include/acpi/actbl3.h b/include/acpi/actbl3.h index 332b17e3bec8..e2c0931a3d67 100644 --- a/include/acpi/actbl3.h +++ b/include/acpi/actbl3.h | |||
@@ -174,7 +174,7 @@ struct acpi_fpdt_header { | |||
174 | 174 | ||
175 | enum acpi_fpdt_type { | 175 | enum acpi_fpdt_type { |
176 | ACPI_FPDT_TYPE_BOOT = 0, | 176 | ACPI_FPDT_TYPE_BOOT = 0, |
177 | ACPI_FPDT_TYPE_S3PERF = 1, | 177 | ACPI_FPDT_TYPE_S3PERF = 1 |
178 | }; | 178 | }; |
179 | 179 | ||
180 | /* | 180 | /* |
@@ -223,7 +223,7 @@ struct acpi_s3pt_header { | |||
223 | 223 | ||
224 | enum acpi_s3pt_type { | 224 | enum acpi_s3pt_type { |
225 | ACPI_S3PT_TYPE_RESUME = 0, | 225 | ACPI_S3PT_TYPE_RESUME = 0, |
226 | ACPI_S3PT_TYPE_SUSPEND = 1, | 226 | ACPI_S3PT_TYPE_SUSPEND = 1 |
227 | }; | 227 | }; |
228 | 228 | ||
229 | struct acpi_s3pt_resume { | 229 | struct acpi_s3pt_resume { |
@@ -505,26 +505,59 @@ struct acpi_rasf_shared_memory { | |||
505 | u32 signature; | 505 | u32 signature; |
506 | u16 command; | 506 | u16 command; |
507 | u16 status; | 507 | u16 status; |
508 | u64 requested_address; | 508 | u16 version; |
509 | u64 requested_length; | 509 | u8 capabilities[16]; |
510 | u64 actual_address; | 510 | u8 set_capabilities[16]; |
511 | u64 actual_length; | 511 | u16 num_parameter_blocks; |
512 | u32 set_capabilities_status; | ||
513 | }; | ||
514 | |||
515 | /* RASF Parameter Block Structure Header */ | ||
516 | |||
517 | struct acpi_rasf_parameter_block { | ||
518 | u16 type; | ||
519 | u16 version; | ||
520 | u16 length; | ||
521 | }; | ||
522 | |||
523 | /* RASF Parameter Block Structure for PATROL_SCRUB */ | ||
524 | |||
525 | struct acpi_rasf_patrol_scrub_parameter { | ||
526 | struct acpi_rasf_parameter_block header; | ||
527 | u16 patrol_scrub_command; | ||
528 | u64 requested_address_range[2]; | ||
529 | u64 actual_address_range[2]; | ||
512 | u16 flags; | 530 | u16 flags; |
513 | u8 speed; | 531 | u8 requested_speed; |
514 | }; | 532 | }; |
515 | 533 | ||
516 | /* Masks for Flags and Speed fields above */ | 534 | /* Masks for Flags and Speed fields above */ |
517 | 535 | ||
518 | #define ACPI_RASF_SCRUBBER_RUNNING 1 | 536 | #define ACPI_RASF_SCRUBBER_RUNNING 1 |
519 | #define ACPI_RASF_SPEED (7<<1) | 537 | #define ACPI_RASF_SPEED (7<<1) |
538 | #define ACPI_RASF_SPEED_SLOW (0<<1) | ||
539 | #define ACPI_RASF_SPEED_MEDIUM (4<<1) | ||
540 | #define ACPI_RASF_SPEED_FAST (7<<1) | ||
520 | 541 | ||
521 | /* Channel Commands */ | 542 | /* Channel Commands */ |
522 | 543 | ||
523 | enum acpi_rasf_commands { | 544 | enum acpi_rasf_commands { |
524 | ACPI_RASF_GET_RAS_CAPABILITIES = 1, | 545 | ACPI_RASF_EXECUTE_RASF_COMMAND = 1 |
525 | ACPI_RASF_GET_PATROL_PARAMETERS = 2, | 546 | }; |
526 | ACPI_RASF_START_PATROL_SCRUBBER = 3, | 547 | |
527 | ACPI_RASF_STOP_PATROL_SCRUBBER = 4 | 548 | /* Platform RAS Capabilities */ |
549 | |||
550 | enum acpi_rasf_capabiliities { | ||
551 | ACPI_HW_PATROL_SCRUB_SUPPORTED = 0, | ||
552 | ACPI_SW_PATROL_SCRUB_EXPOSED = 1 | ||
553 | }; | ||
554 | |||
555 | /* Patrol Scrub Commands */ | ||
556 | |||
557 | enum acpi_rasf_patrol_scrub_commands { | ||
558 | ACPI_RASF_GET_PATROL_PARAMETERS = 1, | ||
559 | ACPI_RASF_START_PATROL_SCRUBBER = 2, | ||
560 | ACPI_RASF_STOP_PATROL_SCRUBBER = 3 | ||
528 | }; | 561 | }; |
529 | 562 | ||
530 | /* Channel Command flags */ | 563 | /* Channel Command flags */ |
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index 845e75f1ffd8..a64adcc29ae5 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h | |||
@@ -650,13 +650,14 @@ typedef u32 acpi_event_type; | |||
650 | * The encoding of acpi_event_status is illustrated below. | 650 | * The encoding of acpi_event_status is illustrated below. |
651 | * Note that a set bit (1) indicates the property is TRUE | 651 | * Note that a set bit (1) indicates the property is TRUE |
652 | * (e.g. if bit 0 is set then the event is enabled). | 652 | * (e.g. if bit 0 is set then the event is enabled). |
653 | * +-------------+-+-+-+ | 653 | * +-------------+-+-+-+-+ |
654 | * | Bits 31:3 |2|1|0| | 654 | * | Bits 31:4 |3|2|1|0| |
655 | * +-------------+-+-+-+ | 655 | * +-------------+-+-+-+-+ |
656 | * | | | | | 656 | * | | | | | |
657 | * | | | +- Enabled? | 657 | * | | | | +- Enabled? |
658 | * | | +--- Enabled for wake? | 658 | * | | | +--- Enabled for wake? |
659 | * | +----- Set? | 659 | * | | +----- Set? |
660 | * | +------- Has a handler? | ||
660 | * +----------- <Reserved> | 661 | * +----------- <Reserved> |
661 | */ | 662 | */ |
662 | typedef u32 acpi_event_status; | 663 | typedef u32 acpi_event_status; |
@@ -1128,7 +1129,6 @@ struct acpi_memory_list { | |||
1128 | u16 object_size; | 1129 | u16 object_size; |
1129 | u16 max_depth; | 1130 | u16 max_depth; |
1130 | u16 current_depth; | 1131 | u16 current_depth; |
1131 | u16 link_offset; | ||
1132 | 1132 | ||
1133 | #ifdef ACPI_DBG_TRACK_ALLOCATIONS | 1133 | #ifdef ACPI_DBG_TRACK_ALLOCATIONS |
1134 | 1134 | ||
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 03053aca5b32..17b5b5967641 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -195,7 +195,7 @@ extern bool wmi_has_guid(const char *guid); | |||
195 | #if defined(CONFIG_ACPI_VIDEO) || defined(CONFIG_ACPI_VIDEO_MODULE) | 195 | #if defined(CONFIG_ACPI_VIDEO) || defined(CONFIG_ACPI_VIDEO_MODULE) |
196 | 196 | ||
197 | extern long acpi_video_get_capabilities(acpi_handle graphics_dev_handle); | 197 | extern long acpi_video_get_capabilities(acpi_handle graphics_dev_handle); |
198 | extern long acpi_is_video_device(struct acpi_device *device); | 198 | extern long acpi_is_video_device(acpi_handle handle); |
199 | extern void acpi_video_dmi_promote_vendor(void); | 199 | extern void acpi_video_dmi_promote_vendor(void); |
200 | extern void acpi_video_dmi_demote_vendor(void); | 200 | extern void acpi_video_dmi_demote_vendor(void); |
201 | extern int acpi_video_backlight_support(void); | 201 | extern int acpi_video_backlight_support(void); |
@@ -208,7 +208,7 @@ static inline long acpi_video_get_capabilities(acpi_handle graphics_dev_handle) | |||
208 | return 0; | 208 | return 0; |
209 | } | 209 | } |
210 | 210 | ||
211 | static inline long acpi_is_video_device(struct acpi_device *device) | 211 | static inline long acpi_is_video_device(acpi_handle handle) |
212 | { | 212 | { |
213 | return 0; | 213 | return 0; |
214 | } | 214 | } |
diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h index 464e229e7d84..963d71431388 100644 --- a/include/linux/clockchips.h +++ b/include/linux/clockchips.h | |||
@@ -8,6 +8,20 @@ | |||
8 | #ifndef _LINUX_CLOCKCHIPS_H | 8 | #ifndef _LINUX_CLOCKCHIPS_H |
9 | #define _LINUX_CLOCKCHIPS_H | 9 | #define _LINUX_CLOCKCHIPS_H |
10 | 10 | ||
11 | /* Clock event notification values */ | ||
12 | enum clock_event_nofitiers { | ||
13 | CLOCK_EVT_NOTIFY_ADD, | ||
14 | CLOCK_EVT_NOTIFY_BROADCAST_ON, | ||
15 | CLOCK_EVT_NOTIFY_BROADCAST_OFF, | ||
16 | CLOCK_EVT_NOTIFY_BROADCAST_FORCE, | ||
17 | CLOCK_EVT_NOTIFY_BROADCAST_ENTER, | ||
18 | CLOCK_EVT_NOTIFY_BROADCAST_EXIT, | ||
19 | CLOCK_EVT_NOTIFY_SUSPEND, | ||
20 | CLOCK_EVT_NOTIFY_RESUME, | ||
21 | CLOCK_EVT_NOTIFY_CPU_DYING, | ||
22 | CLOCK_EVT_NOTIFY_CPU_DEAD, | ||
23 | }; | ||
24 | |||
11 | #ifdef CONFIG_GENERIC_CLOCKEVENTS_BUILD | 25 | #ifdef CONFIG_GENERIC_CLOCKEVENTS_BUILD |
12 | 26 | ||
13 | #include <linux/clocksource.h> | 27 | #include <linux/clocksource.h> |
@@ -26,20 +40,6 @@ enum clock_event_mode { | |||
26 | CLOCK_EVT_MODE_RESUME, | 40 | CLOCK_EVT_MODE_RESUME, |
27 | }; | 41 | }; |
28 | 42 | ||
29 | /* Clock event notification values */ | ||
30 | enum clock_event_nofitiers { | ||
31 | CLOCK_EVT_NOTIFY_ADD, | ||
32 | CLOCK_EVT_NOTIFY_BROADCAST_ON, | ||
33 | CLOCK_EVT_NOTIFY_BROADCAST_OFF, | ||
34 | CLOCK_EVT_NOTIFY_BROADCAST_FORCE, | ||
35 | CLOCK_EVT_NOTIFY_BROADCAST_ENTER, | ||
36 | CLOCK_EVT_NOTIFY_BROADCAST_EXIT, | ||
37 | CLOCK_EVT_NOTIFY_SUSPEND, | ||
38 | CLOCK_EVT_NOTIFY_RESUME, | ||
39 | CLOCK_EVT_NOTIFY_CPU_DYING, | ||
40 | CLOCK_EVT_NOTIFY_CPU_DEAD, | ||
41 | }; | ||
42 | |||
43 | /* | 43 | /* |
44 | * Clock event features | 44 | * Clock event features |
45 | */ | 45 | */ |
@@ -184,7 +184,7 @@ static inline int tick_check_broadcast_expired(void) { return 0; } | |||
184 | #ifdef CONFIG_GENERIC_CLOCKEVENTS | 184 | #ifdef CONFIG_GENERIC_CLOCKEVENTS |
185 | extern void clockevents_notify(unsigned long reason, void *arg); | 185 | extern void clockevents_notify(unsigned long reason, void *arg); |
186 | #else | 186 | #else |
187 | # define clockevents_notify(reason, arg) do { } while (0) | 187 | static inline void clockevents_notify(unsigned long reason, void *arg) {} |
188 | #endif | 188 | #endif |
189 | 189 | ||
190 | #else /* CONFIG_GENERIC_CLOCKEVENTS_BUILD */ | 190 | #else /* CONFIG_GENERIC_CLOCKEVENTS_BUILD */ |
@@ -192,7 +192,7 @@ extern void clockevents_notify(unsigned long reason, void *arg); | |||
192 | static inline void clockevents_suspend(void) {} | 192 | static inline void clockevents_suspend(void) {} |
193 | static inline void clockevents_resume(void) {} | 193 | static inline void clockevents_resume(void) {} |
194 | 194 | ||
195 | #define clockevents_notify(reason, arg) do { } while (0) | 195 | static inline void clockevents_notify(unsigned long reason, void *arg) {} |
196 | static inline int tick_check_broadcast_expired(void) { return 0; } | 196 | static inline int tick_check_broadcast_expired(void) { return 0; } |
197 | 197 | ||
198 | #endif | 198 | #endif |
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index a22944ca0526..037d36ae63e5 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h | |||
@@ -106,6 +106,7 @@ struct cpufreq_policy { | |||
106 | * governors are used */ | 106 | * governors are used */ |
107 | unsigned int policy; /* see above */ | 107 | unsigned int policy; /* see above */ |
108 | struct cpufreq_governor *governor; /* see below */ | 108 | struct cpufreq_governor *governor; /* see below */ |
109 | void *governor_data; | ||
109 | 110 | ||
110 | struct work_struct update; /* if update_policy() needs to be | 111 | struct work_struct update; /* if update_policy() needs to be |
111 | * called, but you're in IRQ context */ | 112 | * called, but you're in IRQ context */ |
@@ -178,9 +179,11 @@ static inline unsigned long cpufreq_scale(unsigned long old, u_int div, u_int mu | |||
178 | * CPUFREQ GOVERNORS * | 179 | * CPUFREQ GOVERNORS * |
179 | *********************************************************************/ | 180 | *********************************************************************/ |
180 | 181 | ||
181 | #define CPUFREQ_GOV_START 1 | 182 | #define CPUFREQ_GOV_START 1 |
182 | #define CPUFREQ_GOV_STOP 2 | 183 | #define CPUFREQ_GOV_STOP 2 |
183 | #define CPUFREQ_GOV_LIMITS 3 | 184 | #define CPUFREQ_GOV_LIMITS 3 |
185 | #define CPUFREQ_GOV_POLICY_INIT 4 | ||
186 | #define CPUFREQ_GOV_POLICY_EXIT 5 | ||
184 | 187 | ||
185 | struct cpufreq_governor { | 188 | struct cpufreq_governor { |
186 | char name[CPUFREQ_NAME_LEN]; | 189 | char name[CPUFREQ_NAME_LEN]; |
@@ -229,6 +232,13 @@ struct cpufreq_driver { | |||
229 | struct module *owner; | 232 | struct module *owner; |
230 | char name[CPUFREQ_NAME_LEN]; | 233 | char name[CPUFREQ_NAME_LEN]; |
231 | u8 flags; | 234 | u8 flags; |
235 | /* | ||
236 | * This should be set by platforms having multiple clock-domains, i.e. | ||
237 | * supporting multiple policies. With this sysfs directories of governor | ||
238 | * would be created in cpu/cpu<num>/cpufreq/ directory and so they can | ||
239 | * use the same governor with different tunables for different clusters. | ||
240 | */ | ||
241 | bool have_governor_per_policy; | ||
232 | 242 | ||
233 | /* needed by all drivers */ | 243 | /* needed by all drivers */ |
234 | int (*init) (struct cpufreq_policy *policy); | 244 | int (*init) (struct cpufreq_policy *policy); |
@@ -268,8 +278,8 @@ int cpufreq_register_driver(struct cpufreq_driver *driver_data); | |||
268 | int cpufreq_unregister_driver(struct cpufreq_driver *driver_data); | 278 | int cpufreq_unregister_driver(struct cpufreq_driver *driver_data); |
269 | 279 | ||
270 | 280 | ||
271 | void cpufreq_notify_transition(struct cpufreq_freqs *freqs, unsigned int state); | 281 | void cpufreq_notify_transition(struct cpufreq_policy *policy, |
272 | 282 | struct cpufreq_freqs *freqs, unsigned int state); | |
273 | 283 | ||
274 | static inline void cpufreq_verify_within_limits(struct cpufreq_policy *policy, unsigned int min, unsigned int max) | 284 | static inline void cpufreq_verify_within_limits(struct cpufreq_policy *policy, unsigned int min, unsigned int max) |
275 | { | 285 | { |
@@ -329,6 +339,7 @@ const char *cpufreq_get_current_driver(void); | |||
329 | *********************************************************************/ | 339 | *********************************************************************/ |
330 | int cpufreq_get_policy(struct cpufreq_policy *policy, unsigned int cpu); | 340 | int cpufreq_get_policy(struct cpufreq_policy *policy, unsigned int cpu); |
331 | int cpufreq_update_policy(unsigned int cpu); | 341 | int cpufreq_update_policy(unsigned int cpu); |
342 | bool have_governor_per_policy(void); | ||
332 | 343 | ||
333 | #ifdef CONFIG_CPU_FREQ | 344 | #ifdef CONFIG_CPU_FREQ |
334 | /* query the current CPU frequency (in kHz). If zero, cpufreq couldn't detect it */ | 345 | /* query the current CPU frequency (in kHz). If zero, cpufreq couldn't detect it */ |
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h index 480c14dc1ddd..3c86faa59798 100644 --- a/include/linux/cpuidle.h +++ b/include/linux/cpuidle.h | |||
@@ -57,6 +57,7 @@ struct cpuidle_state { | |||
57 | /* Idle State Flags */ | 57 | /* Idle State Flags */ |
58 | #define CPUIDLE_FLAG_TIME_VALID (0x01) /* is residency time measurable? */ | 58 | #define CPUIDLE_FLAG_TIME_VALID (0x01) /* is residency time measurable? */ |
59 | #define CPUIDLE_FLAG_COUPLED (0x02) /* state applies to multiple cpus */ | 59 | #define CPUIDLE_FLAG_COUPLED (0x02) /* state applies to multiple cpus */ |
60 | #define CPUIDLE_FLAG_TIMER_STOP (0x04) /* timer is stopped on this state */ | ||
60 | 61 | ||
61 | #define CPUIDLE_DRIVER_FLAGS_MASK (0xFFFF0000) | 62 | #define CPUIDLE_DRIVER_FLAGS_MASK (0xFFFF0000) |
62 | 63 | ||
@@ -104,8 +105,8 @@ struct cpuidle_driver { | |||
104 | struct module *owner; | 105 | struct module *owner; |
105 | int refcnt; | 106 | int refcnt; |
106 | 107 | ||
107 | /* set to 1 to use the core cpuidle time keeping (for all states). */ | 108 | /* used by the cpuidle framework to setup the broadcast timer */ |
108 | unsigned int en_core_tk_irqen:1; | 109 | unsigned int bctimer:1; |
109 | /* states array must be ordered in decreasing power consumption */ | 110 | /* states array must be ordered in decreasing power consumption */ |
110 | struct cpuidle_state states[CPUIDLE_STATE_MAX]; | 111 | struct cpuidle_state states[CPUIDLE_STATE_MAX]; |
111 | int state_count; | 112 | int state_count; |
@@ -122,17 +123,15 @@ extern void cpuidle_driver_unref(void); | |||
122 | extern void cpuidle_unregister_driver(struct cpuidle_driver *drv); | 123 | extern void cpuidle_unregister_driver(struct cpuidle_driver *drv); |
123 | extern int cpuidle_register_device(struct cpuidle_device *dev); | 124 | extern int cpuidle_register_device(struct cpuidle_device *dev); |
124 | extern void cpuidle_unregister_device(struct cpuidle_device *dev); | 125 | extern void cpuidle_unregister_device(struct cpuidle_device *dev); |
125 | 126 | extern int cpuidle_register(struct cpuidle_driver *drv, | |
127 | const struct cpumask *const coupled_cpus); | ||
128 | extern void cpuidle_unregister(struct cpuidle_driver *drv); | ||
126 | extern void cpuidle_pause_and_lock(void); | 129 | extern void cpuidle_pause_and_lock(void); |
127 | extern void cpuidle_resume_and_unlock(void); | 130 | extern void cpuidle_resume_and_unlock(void); |
128 | extern void cpuidle_pause(void); | 131 | extern void cpuidle_pause(void); |
129 | extern void cpuidle_resume(void); | 132 | extern void cpuidle_resume(void); |
130 | extern int cpuidle_enable_device(struct cpuidle_device *dev); | 133 | extern int cpuidle_enable_device(struct cpuidle_device *dev); |
131 | extern void cpuidle_disable_device(struct cpuidle_device *dev); | 134 | extern void cpuidle_disable_device(struct cpuidle_device *dev); |
132 | extern int cpuidle_wrap_enter(struct cpuidle_device *dev, | ||
133 | struct cpuidle_driver *drv, int index, | ||
134 | int (*enter)(struct cpuidle_device *dev, | ||
135 | struct cpuidle_driver *drv, int index)); | ||
136 | extern int cpuidle_play_dead(void); | 135 | extern int cpuidle_play_dead(void); |
137 | 136 | ||
138 | extern struct cpuidle_driver *cpuidle_get_cpu_driver(struct cpuidle_device *dev); | 137 | extern struct cpuidle_driver *cpuidle_get_cpu_driver(struct cpuidle_device *dev); |
@@ -151,7 +150,10 @@ static inline void cpuidle_unregister_driver(struct cpuidle_driver *drv) { } | |||
151 | static inline int cpuidle_register_device(struct cpuidle_device *dev) | 150 | static inline int cpuidle_register_device(struct cpuidle_device *dev) |
152 | {return -ENODEV; } | 151 | {return -ENODEV; } |
153 | static inline void cpuidle_unregister_device(struct cpuidle_device *dev) { } | 152 | static inline void cpuidle_unregister_device(struct cpuidle_device *dev) { } |
154 | 153 | static inline int cpuidle_register(struct cpuidle_driver *drv, | |
154 | const struct cpumask *const coupled_cpus) | ||
155 | {return -ENODEV; } | ||
156 | static inline void cpuidle_unregister(struct cpuidle_driver *drv) { } | ||
155 | static inline void cpuidle_pause_and_lock(void) { } | 157 | static inline void cpuidle_pause_and_lock(void) { } |
156 | static inline void cpuidle_resume_and_unlock(void) { } | 158 | static inline void cpuidle_resume_and_unlock(void) { } |
157 | static inline void cpuidle_pause(void) { } | 159 | static inline void cpuidle_pause(void) { } |
@@ -159,11 +161,6 @@ static inline void cpuidle_resume(void) { } | |||
159 | static inline int cpuidle_enable_device(struct cpuidle_device *dev) | 161 | static inline int cpuidle_enable_device(struct cpuidle_device *dev) |
160 | {return -ENODEV; } | 162 | {return -ENODEV; } |
161 | static inline void cpuidle_disable_device(struct cpuidle_device *dev) { } | 163 | static inline void cpuidle_disable_device(struct cpuidle_device *dev) { } |
162 | static inline int cpuidle_wrap_enter(struct cpuidle_device *dev, | ||
163 | struct cpuidle_driver *drv, int index, | ||
164 | int (*enter)(struct cpuidle_device *dev, | ||
165 | struct cpuidle_driver *drv, int index)) | ||
166 | { return -ENODEV; } | ||
167 | static inline int cpuidle_play_dead(void) {return -ENODEV; } | 164 | static inline int cpuidle_play_dead(void) {return -ENODEV; } |
168 | #endif | 165 | #endif |
169 | 166 | ||
diff --git a/include/linux/platform_data/clk-lpss.h b/include/linux/platform_data/clk-lpss.h new file mode 100644 index 000000000000..528e73ce46d2 --- /dev/null +++ b/include/linux/platform_data/clk-lpss.h | |||
@@ -0,0 +1,18 @@ | |||
1 | /* | ||
2 | * Intel Low Power Subsystem clocks. | ||
3 | * | ||
4 | * Copyright (C) 2013, Intel Corporation | ||
5 | * Authors: Mika Westerberg <mika.westerberg@linux.intel.com> | ||
6 | * Rafael J. Wysocki <rafael.j.wysocki@intel.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #ifndef __CLK_LPSS_H | ||
14 | #define __CLK_LPSS_H | ||
15 | |||
16 | extern int lpt_clk_init(void); | ||
17 | |||
18 | #endif /* __CLK_LPSS_H */ | ||