diff options
Diffstat (limited to 'include/acpi/amlresrc.h')
-rw-r--r-- | include/acpi/amlresrc.h | 56 |
1 files changed, 22 insertions, 34 deletions
diff --git a/include/acpi/amlresrc.h b/include/acpi/amlresrc.h index 051786e4b210..a3c46ba6358d 100644 --- a/include/acpi/amlresrc.h +++ b/include/acpi/amlresrc.h | |||
@@ -157,10 +157,15 @@ struct asl_end_tag_desc { | |||
157 | 157 | ||
158 | /* LARGE descriptors */ | 158 | /* LARGE descriptors */ |
159 | 159 | ||
160 | #define ASL_LARGE_HEADER_COMMON \ | ||
161 | u8 descriptor_type;\ | ||
162 | u16 length; | ||
163 | |||
164 | struct asl_large_header { | ||
165 | ASL_LARGE_HEADER_COMMON}; | ||
166 | |||
160 | struct asl_memory_24_desc { | 167 | struct asl_memory_24_desc { |
161 | u8 descriptor_type; | 168 | ASL_LARGE_HEADER_COMMON u8 information; |
162 | u16 length; | ||
163 | u8 information; | ||
164 | u16 address_min; | 169 | u16 address_min; |
165 | u16 address_max; | 170 | u16 address_max; |
166 | u16 alignment; | 171 | u16 alignment; |
@@ -168,15 +173,11 @@ struct asl_memory_24_desc { | |||
168 | }; | 173 | }; |
169 | 174 | ||
170 | struct asl_large_vendor_desc { | 175 | struct asl_large_vendor_desc { |
171 | u8 descriptor_type; | 176 | ASL_LARGE_HEADER_COMMON u8 vendor_defined[1]; |
172 | u16 length; | ||
173 | u8 vendor_defined[1]; | ||
174 | }; | 177 | }; |
175 | 178 | ||
176 | struct asl_memory_32_desc { | 179 | struct asl_memory_32_desc { |
177 | u8 descriptor_type; | 180 | ASL_LARGE_HEADER_COMMON u8 information; |
178 | u16 length; | ||
179 | u8 information; | ||
180 | u32 address_min; | 181 | u32 address_min; |
181 | u32 address_max; | 182 | u32 address_max; |
182 | u32 alignment; | 183 | u32 alignment; |
@@ -184,17 +185,13 @@ struct asl_memory_32_desc { | |||
184 | }; | 185 | }; |
185 | 186 | ||
186 | struct asl_fixed_memory_32_desc { | 187 | struct asl_fixed_memory_32_desc { |
187 | u8 descriptor_type; | 188 | ASL_LARGE_HEADER_COMMON u8 information; |
188 | u16 length; | ||
189 | u8 information; | ||
190 | u32 base_address; | 189 | u32 base_address; |
191 | u32 range_length; | 190 | u32 range_length; |
192 | }; | 191 | }; |
193 | 192 | ||
194 | struct asl_extended_address_desc { | 193 | struct asl_extended_address_desc { |
195 | u8 descriptor_type; | 194 | ASL_LARGE_HEADER_COMMON u8 resource_type; |
196 | u16 length; | ||
197 | u8 resource_type; | ||
198 | u8 flags; | 195 | u8 flags; |
199 | u8 specific_flags; | 196 | u8 specific_flags; |
200 | u8 revision_iD; | 197 | u8 revision_iD; |
@@ -211,9 +208,7 @@ struct asl_extended_address_desc { | |||
211 | #define ASL_EXTENDED_ADDRESS_DESC_REVISION 1 /* ACPI 3.0 */ | 208 | #define ASL_EXTENDED_ADDRESS_DESC_REVISION 1 /* ACPI 3.0 */ |
212 | 209 | ||
213 | struct asl_qword_address_desc { | 210 | struct asl_qword_address_desc { |
214 | u8 descriptor_type; | 211 | ASL_LARGE_HEADER_COMMON u8 resource_type; |
215 | u16 length; | ||
216 | u8 resource_type; | ||
217 | u8 flags; | 212 | u8 flags; |
218 | u8 specific_flags; | 213 | u8 specific_flags; |
219 | u64 granularity; | 214 | u64 granularity; |
@@ -225,9 +220,7 @@ struct asl_qword_address_desc { | |||
225 | }; | 220 | }; |
226 | 221 | ||
227 | struct asl_dword_address_desc { | 222 | struct asl_dword_address_desc { |
228 | u8 descriptor_type; | 223 | ASL_LARGE_HEADER_COMMON u8 resource_type; |
229 | u16 length; | ||
230 | u8 resource_type; | ||
231 | u8 flags; | 224 | u8 flags; |
232 | u8 specific_flags; | 225 | u8 specific_flags; |
233 | u32 granularity; | 226 | u32 granularity; |
@@ -239,9 +232,7 @@ struct asl_dword_address_desc { | |||
239 | }; | 232 | }; |
240 | 233 | ||
241 | struct asl_word_address_desc { | 234 | struct asl_word_address_desc { |
242 | u8 descriptor_type; | 235 | ASL_LARGE_HEADER_COMMON u8 resource_type; |
243 | u16 length; | ||
244 | u8 resource_type; | ||
245 | u8 flags; | 236 | u8 flags; |
246 | u8 specific_flags; | 237 | u8 specific_flags; |
247 | u16 granularity; | 238 | u16 granularity; |
@@ -253,18 +244,14 @@ struct asl_word_address_desc { | |||
253 | }; | 244 | }; |
254 | 245 | ||
255 | struct asl_extended_xrupt_desc { | 246 | struct asl_extended_xrupt_desc { |
256 | u8 descriptor_type; | 247 | ASL_LARGE_HEADER_COMMON u8 flags; |
257 | u16 length; | ||
258 | u8 flags; | ||
259 | u8 table_length; | 248 | u8 table_length; |
260 | u32 interrupt_number[1]; | 249 | u32 interrupt_number[1]; |
261 | /* res_source_index, res_source optional fields follow */ | 250 | /* res_source_index, res_source optional fields follow */ |
262 | }; | 251 | }; |
263 | 252 | ||
264 | struct asl_general_register_desc { | 253 | struct asl_generic_register_desc { |
265 | u8 descriptor_type; | 254 | ASL_LARGE_HEADER_COMMON u8 address_space_id; |
266 | u16 length; | ||
267 | u8 address_space_id; | ||
268 | u8 bit_width; | 255 | u8 bit_width; |
269 | u8 bit_offset; | 256 | u8 bit_offset; |
270 | u8 access_size; /* ACPI 3.0, was Reserved */ | 257 | u8 access_size; /* ACPI 3.0, was Reserved */ |
@@ -280,13 +267,14 @@ struct asl_general_register_desc { | |||
280 | union asl_resource_desc { | 267 | union asl_resource_desc { |
281 | struct asl_irq_format_desc irq; | 268 | struct asl_irq_format_desc irq; |
282 | struct asl_dma_format_desc dma; | 269 | struct asl_dma_format_desc dma; |
283 | struct asl_start_dependent_desc std; | ||
284 | struct asl_end_dependent_desc end; | ||
285 | struct asl_io_port_desc iop; | 270 | struct asl_io_port_desc iop; |
286 | struct asl_fixed_io_port_desc fio; | 271 | struct asl_fixed_io_port_desc fio; |
272 | struct asl_start_dependent_desc std; | ||
273 | struct asl_end_dependent_desc end; | ||
287 | struct asl_small_vendor_desc smv; | 274 | struct asl_small_vendor_desc smv; |
288 | struct asl_end_tag_desc et; | 275 | struct asl_end_tag_desc et; |
289 | 276 | ||
277 | struct asl_large_header lhd; | ||
290 | struct asl_memory_24_desc M24; | 278 | struct asl_memory_24_desc M24; |
291 | struct asl_large_vendor_desc lgv; | 279 | struct asl_large_vendor_desc lgv; |
292 | struct asl_memory_32_desc M32; | 280 | struct asl_memory_32_desc M32; |
@@ -296,7 +284,7 @@ union asl_resource_desc { | |||
296 | struct asl_word_address_desc was; | 284 | struct asl_word_address_desc was; |
297 | struct asl_extended_address_desc eas; | 285 | struct asl_extended_address_desc eas; |
298 | struct asl_extended_xrupt_desc exx; | 286 | struct asl_extended_xrupt_desc exx; |
299 | struct asl_general_register_desc grg; | 287 | struct asl_generic_register_desc grg; |
300 | u32 u32_item; | 288 | u32 u32_item; |
301 | u16 u16_item; | 289 | u16 u16_item; |
302 | u8 U8item; | 290 | u8 U8item; |