xref: /openbmc/linux/include/acpi/acrestyp.h (revision 63705da3)
1 /* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */
2 /******************************************************************************
3  *
4  * Name: acrestyp.h - Defines, types, and structures for resource descriptors
5  *
6  * Copyright (C) 2000 - 2021, Intel Corp.
7  *
8  *****************************************************************************/
9 
10 #ifndef __ACRESTYP_H__
11 #define __ACRESTYP_H__
12 
13 /*
14  * Definitions for Resource Attributes
15  */
16 typedef u16 acpi_rs_length;	/* Resource Length field is fixed at 16 bits */
17 typedef u32 acpi_rsdesc_size;	/* Max Resource Descriptor size is (Length+3) = (64K-1)+3 */
18 
19 /*
20  * Memory Attributes
21  */
22 #define ACPI_READ_ONLY_MEMORY           (u8) 0x00
23 #define ACPI_READ_WRITE_MEMORY          (u8) 0x01
24 
25 #define ACPI_NON_CACHEABLE_MEMORY       (u8) 0x00
26 #define ACPI_CACHABLE_MEMORY            (u8) 0x01
27 #define ACPI_WRITE_COMBINING_MEMORY     (u8) 0x02
28 #define ACPI_PREFETCHABLE_MEMORY        (u8) 0x03
29 
30 /*! [Begin] no source code translation */
31 /*
32  * IO Attributes
33  * The ISA IO ranges are:     n000-n0FFh,  n400-n4FFh, n800-n8FFh, nC00-nCFFh.
34  * The non-ISA IO ranges are: n100-n3FFh,  n500-n7FFh, n900-nBFFh, nCD0-nFFFh.
35  */
36 /*! [End] no source code translation !*/
37 
38 #define ACPI_NON_ISA_ONLY_RANGES        (u8) 0x01
39 #define ACPI_ISA_ONLY_RANGES            (u8) 0x02
40 #define ACPI_ENTIRE_RANGE               (ACPI_NON_ISA_ONLY_RANGES | ACPI_ISA_ONLY_RANGES)
41 
42 /* Type of translation - 1=Sparse, 0=Dense */
43 
44 #define ACPI_SPARSE_TRANSLATION         (u8) 0x01
45 
46 /*
47  * IO Port Descriptor Decode
48  */
49 #define ACPI_DECODE_10                  (u8) 0x00	/* 10-bit IO address decode */
50 #define ACPI_DECODE_16                  (u8) 0x01	/* 16-bit IO address decode */
51 
52 /*
53  * Interrupt attributes - used in multiple descriptors
54  */
55 
56 /* Triggering */
57 
58 #define ACPI_LEVEL_SENSITIVE            (u8) 0x00
59 #define ACPI_EDGE_SENSITIVE             (u8) 0x01
60 
61 /* Polarity */
62 
63 #define ACPI_ACTIVE_HIGH                (u8) 0x00
64 #define ACPI_ACTIVE_LOW                 (u8) 0x01
65 #define ACPI_ACTIVE_BOTH                (u8) 0x02
66 
67 /* Sharing */
68 
69 #define ACPI_EXCLUSIVE                  (u8) 0x00
70 #define ACPI_SHARED                     (u8) 0x01
71 
72 /* Wake */
73 
74 #define ACPI_NOT_WAKE_CAPABLE           (u8) 0x00
75 #define ACPI_WAKE_CAPABLE               (u8) 0x01
76 
77 /*
78  * DMA Attributes
79  */
80 #define ACPI_COMPATIBILITY              (u8) 0x00
81 #define ACPI_TYPE_A                     (u8) 0x01
82 #define ACPI_TYPE_B                     (u8) 0x02
83 #define ACPI_TYPE_F                     (u8) 0x03
84 
85 #define ACPI_NOT_BUS_MASTER             (u8) 0x00
86 #define ACPI_BUS_MASTER                 (u8) 0x01
87 
88 #define ACPI_TRANSFER_8                 (u8) 0x00
89 #define ACPI_TRANSFER_8_16              (u8) 0x01
90 #define ACPI_TRANSFER_16                (u8) 0x02
91 
92 /*
93  * Start Dependent Functions Priority definitions
94  */
95 #define ACPI_GOOD_CONFIGURATION         (u8) 0x00
96 #define ACPI_ACCEPTABLE_CONFIGURATION   (u8) 0x01
97 #define ACPI_SUB_OPTIMAL_CONFIGURATION  (u8) 0x02
98 
99 /*
100  * 16, 32 and 64-bit Address Descriptor resource types
101  */
102 #define ACPI_MEMORY_RANGE               (u8) 0x00
103 #define ACPI_IO_RANGE                   (u8) 0x01
104 #define ACPI_BUS_NUMBER_RANGE           (u8) 0x02
105 
106 #define ACPI_ADDRESS_NOT_FIXED          (u8) 0x00
107 #define ACPI_ADDRESS_FIXED              (u8) 0x01
108 
109 #define ACPI_POS_DECODE                 (u8) 0x00
110 #define ACPI_SUB_DECODE                 (u8) 0x01
111 
112 /* Producer/Consumer */
113 
114 #define ACPI_PRODUCER                   (u8) 0x00
115 #define ACPI_CONSUMER                   (u8) 0x01
116 
117 /*
118  * If possible, pack the following structures to byte alignment
119  */
120 #ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED
121 #pragma pack(1)
122 #endif
123 
124 /* UUID data structures for use in vendor-defined resource descriptors */
125 
126 struct acpi_uuid {
127 	u8 data[ACPI_UUID_LENGTH];
128 };
129 
130 struct acpi_vendor_uuid {
131 	u8 subtype;
132 	u8 data[ACPI_UUID_LENGTH];
133 };
134 
135 /*
136  * Structures used to describe device resources
137  */
138 struct acpi_resource_irq {
139 	u8 descriptor_length;
140 	u8 triggering;
141 	u8 polarity;
142 	u8 shareable;
143 	u8 wake_capable;
144 	u8 interrupt_count;
145 	u8 interrupts[1];
146 };
147 
148 struct acpi_resource_dma {
149 	u8 type;
150 	u8 bus_master;
151 	u8 transfer;
152 	u8 channel_count;
153 	u8 channels[1];
154 };
155 
156 struct acpi_resource_start_dependent {
157 	u8 descriptor_length;
158 	u8 compatibility_priority;
159 	u8 performance_robustness;
160 };
161 
162 /*
163  * The END_DEPENDENT_FUNCTIONS_RESOURCE struct is not
164  * needed because it has no fields
165  */
166 
167 struct acpi_resource_io {
168 	u8 io_decode;
169 	u8 alignment;
170 	u8 address_length;
171 	u16 minimum;
172 	u16 maximum;
173 };
174 
175 struct acpi_resource_fixed_io {
176 	u16 address;
177 	u8 address_length;
178 };
179 
180 struct acpi_resource_fixed_dma {
181 	u16 request_lines;
182 	u16 channels;
183 	u8 width;
184 };
185 
186 /* Values for Width field above */
187 
188 #define ACPI_DMA_WIDTH8                         0
189 #define ACPI_DMA_WIDTH16                        1
190 #define ACPI_DMA_WIDTH32                        2
191 #define ACPI_DMA_WIDTH64                        3
192 #define ACPI_DMA_WIDTH128                       4
193 #define ACPI_DMA_WIDTH256                       5
194 
195 struct acpi_resource_vendor {
196 	u16 byte_length;
197 	u8 byte_data[1];
198 };
199 
200 /* Vendor resource with UUID info (introduced in ACPI 3.0) */
201 
202 struct acpi_resource_vendor_typed {
203 	u16 byte_length;
204 	u8 uuid_subtype;
205 	u8 uuid[ACPI_UUID_LENGTH];
206 	u8 byte_data[1];
207 };
208 
209 struct acpi_resource_end_tag {
210 	u8 checksum;
211 };
212 
213 struct acpi_resource_memory24 {
214 	u8 write_protect;
215 	u16 minimum;
216 	u16 maximum;
217 	u16 alignment;
218 	u16 address_length;
219 };
220 
221 struct acpi_resource_memory32 {
222 	u8 write_protect;
223 	u32 minimum;
224 	u32 maximum;
225 	u32 alignment;
226 	u32 address_length;
227 };
228 
229 struct acpi_resource_fixed_memory32 {
230 	u8 write_protect;
231 	u32 address;
232 	u32 address_length;
233 };
234 
235 struct acpi_memory_attribute {
236 	u8 write_protect;
237 	u8 caching;
238 	u8 range_type;
239 	u8 translation;
240 };
241 
242 struct acpi_io_attribute {
243 	u8 range_type;
244 	u8 translation;
245 	u8 translation_type;
246 	u8 reserved1;
247 };
248 
249 union acpi_resource_attribute {
250 	struct acpi_memory_attribute mem;
251 	struct acpi_io_attribute io;
252 
253 	/* Used for the *word_space macros */
254 
255 	u8 type_specific;
256 };
257 
258 struct acpi_resource_label {
259 	u16 string_length;
260 	char *string_ptr;
261 };
262 
263 struct acpi_resource_source {
264 	u8 index;
265 	u16 string_length;
266 	char *string_ptr;
267 };
268 
269 /* Fields common to all address descriptors, 16/32/64 bit */
270 
271 #define ACPI_RESOURCE_ADDRESS_COMMON \
272 	u8                                      resource_type; \
273 	u8                                      producer_consumer; \
274 	u8                                      decode; \
275 	u8                                      min_address_fixed; \
276 	u8                                      max_address_fixed; \
277 	union acpi_resource_attribute           info;
278 
279 struct acpi_address16_attribute {
280 	u16 granularity;
281 	u16 minimum;
282 	u16 maximum;
283 	u16 translation_offset;
284 	u16 address_length;
285 };
286 
287 struct acpi_address32_attribute {
288 	u32 granularity;
289 	u32 minimum;
290 	u32 maximum;
291 	u32 translation_offset;
292 	u32 address_length;
293 };
294 
295 struct acpi_address64_attribute {
296 	u64 granularity;
297 	u64 minimum;
298 	u64 maximum;
299 	u64 translation_offset;
300 	u64 address_length;
301 };
302 
303 struct acpi_resource_address {
304 ACPI_RESOURCE_ADDRESS_COMMON};
305 
306 struct acpi_resource_address16 {
307 	ACPI_RESOURCE_ADDRESS_COMMON struct acpi_address16_attribute address;
308 	struct acpi_resource_source resource_source;
309 };
310 
311 struct acpi_resource_address32 {
312 	ACPI_RESOURCE_ADDRESS_COMMON struct acpi_address32_attribute address;
313 	struct acpi_resource_source resource_source;
314 };
315 
316 struct acpi_resource_address64 {
317 	ACPI_RESOURCE_ADDRESS_COMMON struct acpi_address64_attribute address;
318 	struct acpi_resource_source resource_source;
319 };
320 
321 struct acpi_resource_extended_address64 {
322 	ACPI_RESOURCE_ADDRESS_COMMON u8 revision_ID;
323 	struct acpi_address64_attribute address;
324 	u64 type_specific;
325 };
326 
327 struct acpi_resource_extended_irq {
328 	u8 producer_consumer;
329 	u8 triggering;
330 	u8 polarity;
331 	u8 shareable;
332 	u8 wake_capable;
333 	u8 interrupt_count;
334 	struct acpi_resource_source resource_source;
335 	u32 interrupts[1];
336 };
337 
338 struct acpi_resource_generic_register {
339 	u8 space_id;
340 	u8 bit_width;
341 	u8 bit_offset;
342 	u8 access_size;
343 	u64 address;
344 };
345 
346 struct acpi_resource_gpio {
347 	u8 revision_id;
348 	u8 connection_type;
349 	u8 producer_consumer;	/* For values, see Producer/Consumer above */
350 	u8 pin_config;
351 	u8 shareable;		/* For values, see Interrupt Attributes above */
352 	u8 wake_capable;	/* For values, see Interrupt Attributes above */
353 	u8 io_restriction;
354 	u8 triggering;		/* For values, see Interrupt Attributes above */
355 	u8 polarity;		/* For values, see Interrupt Attributes above */
356 	u16 drive_strength;
357 	u16 debounce_timeout;
358 	u16 pin_table_length;
359 	u16 vendor_length;
360 	struct acpi_resource_source resource_source;
361 	u16 *pin_table;
362 	u8 *vendor_data;
363 };
364 
365 /* Values for GPIO connection_type field above */
366 
367 #define ACPI_RESOURCE_GPIO_TYPE_INT             0
368 #define ACPI_RESOURCE_GPIO_TYPE_IO              1
369 
370 /* Values for pin_config field above */
371 
372 #define ACPI_PIN_CONFIG_DEFAULT                 0
373 #define ACPI_PIN_CONFIG_PULLUP                  1
374 #define ACPI_PIN_CONFIG_PULLDOWN                2
375 #define ACPI_PIN_CONFIG_NOPULL                  3
376 
377 /* Values for io_restriction field above */
378 
379 #define ACPI_IO_RESTRICT_NONE                   0
380 #define ACPI_IO_RESTRICT_INPUT                  1
381 #define ACPI_IO_RESTRICT_OUTPUT                 2
382 #define ACPI_IO_RESTRICT_NONE_PRESERVE          3
383 
384 /* Common structure for I2C, SPI, UART, CSI2 serial descriptors */
385 
386 #define ACPI_RESOURCE_SERIAL_COMMON \
387 	u8                                      revision_id; \
388 	u8                                      type; \
389 	u8                                      producer_consumer;   /* For values, see Producer/Consumer above */\
390 	u8                                      slave_mode; \
391 	u8                                      connection_sharing; \
392 	u8                                      type_revision_id; \
393 	u16                                     type_data_length; \
394 	u16                                     vendor_length; \
395 	struct acpi_resource_source             resource_source; \
396 	u8                                      *vendor_data;
397 
398 struct acpi_resource_common_serialbus {
399 ACPI_RESOURCE_SERIAL_COMMON};
400 
401 /* Values for the Type field above */
402 
403 #define ACPI_RESOURCE_SERIAL_TYPE_I2C           1
404 #define ACPI_RESOURCE_SERIAL_TYPE_SPI           2
405 #define ACPI_RESOURCE_SERIAL_TYPE_UART          3
406 #define ACPI_RESOURCE_SERIAL_TYPE_CSI2          4
407 
408 /* Values for slave_mode field above */
409 
410 #define ACPI_CONTROLLER_INITIATED               0
411 #define ACPI_DEVICE_INITIATED                   1
412 
413 struct acpi_resource_i2c_serialbus {
414 	ACPI_RESOURCE_SERIAL_COMMON u8 access_mode;
415 	u16 slave_address;
416 	u32 connection_speed;
417 };
418 
419 /* Values for access_mode field above */
420 
421 #define ACPI_I2C_7BIT_MODE                      0
422 #define ACPI_I2C_10BIT_MODE                     1
423 
424 struct acpi_resource_spi_serialbus {
425 	ACPI_RESOURCE_SERIAL_COMMON u8 wire_mode;
426 	u8 device_polarity;
427 	u8 data_bit_length;
428 	u8 clock_phase;
429 	u8 clock_polarity;
430 	u16 device_selection;
431 	u32 connection_speed;
432 };
433 
434 /* Values for wire_mode field above */
435 
436 #define ACPI_SPI_4WIRE_MODE                     0
437 #define ACPI_SPI_3WIRE_MODE                     1
438 
439 /* Values for device_polarity field above */
440 
441 #define ACPI_SPI_ACTIVE_LOW                     0
442 #define ACPI_SPI_ACTIVE_HIGH                    1
443 
444 /* Values for clock_phase field above */
445 
446 #define ACPI_SPI_FIRST_PHASE                    0
447 #define ACPI_SPI_SECOND_PHASE                   1
448 
449 /* Values for clock_polarity field above */
450 
451 #define ACPI_SPI_START_LOW                      0
452 #define ACPI_SPI_START_HIGH                     1
453 
454 struct acpi_resource_uart_serialbus {
455 	ACPI_RESOURCE_SERIAL_COMMON u8 endian;
456 	u8 data_bits;
457 	u8 stop_bits;
458 	u8 flow_control;
459 	u8 parity;
460 	u8 lines_enabled;
461 	u16 rx_fifo_size;
462 	u16 tx_fifo_size;
463 	u32 default_baud_rate;
464 };
465 
466 /* Values for Endian field above */
467 
468 #define ACPI_UART_LITTLE_ENDIAN                 0
469 #define ACPI_UART_BIG_ENDIAN                    1
470 
471 /* Values for data_bits field above */
472 
473 #define ACPI_UART_5_DATA_BITS                   0
474 #define ACPI_UART_6_DATA_BITS                   1
475 #define ACPI_UART_7_DATA_BITS                   2
476 #define ACPI_UART_8_DATA_BITS                   3
477 #define ACPI_UART_9_DATA_BITS                   4
478 
479 /* Values for stop_bits field above */
480 
481 #define ACPI_UART_NO_STOP_BITS                  0
482 #define ACPI_UART_1_STOP_BIT                    1
483 #define ACPI_UART_1P5_STOP_BITS                 2
484 #define ACPI_UART_2_STOP_BITS                   3
485 
486 /* Values for flow_control field above */
487 
488 #define ACPI_UART_FLOW_CONTROL_NONE             0
489 #define ACPI_UART_FLOW_CONTROL_HW               1
490 #define ACPI_UART_FLOW_CONTROL_XON_XOFF         2
491 
492 /* Values for Parity field above */
493 
494 #define ACPI_UART_PARITY_NONE                   0
495 #define ACPI_UART_PARITY_EVEN                   1
496 #define ACPI_UART_PARITY_ODD                    2
497 #define ACPI_UART_PARITY_MARK                   3
498 #define ACPI_UART_PARITY_SPACE                  4
499 
500 /* Values for lines_enabled bitfield above */
501 
502 #define ACPI_UART_CARRIER_DETECT                (1<<2)
503 #define ACPI_UART_RING_INDICATOR                (1<<3)
504 #define ACPI_UART_DATA_SET_READY                (1<<4)
505 #define ACPI_UART_DATA_TERMINAL_READY           (1<<5)
506 #define ACPI_UART_CLEAR_TO_SEND                 (1<<6)
507 #define ACPI_UART_REQUEST_TO_SEND               (1<<7)
508 
509 struct acpi_resource_csi2_serialbus {
510 	ACPI_RESOURCE_SERIAL_COMMON u8 local_port_instance;
511 	u8 phy_type;
512 };
513 
514 struct acpi_resource_pin_function {
515 	u8 revision_id;
516 	u8 pin_config;
517 	u8 shareable;		/* For values, see Interrupt Attributes above */
518 	u16 function_number;
519 	u16 pin_table_length;
520 	u16 vendor_length;
521 	struct acpi_resource_source resource_source;
522 	u16 *pin_table;
523 	u8 *vendor_data;
524 };
525 
526 struct acpi_resource_pin_config {
527 	u8 revision_id;
528 	u8 producer_consumer;	/* For values, see Producer/Consumer above */
529 	u8 shareable;		/* For values, see Interrupt Attributes above */
530 	u8 pin_config_type;
531 	u32 pin_config_value;
532 	u16 pin_table_length;
533 	u16 vendor_length;
534 	struct acpi_resource_source resource_source;
535 	u16 *pin_table;
536 	u8 *vendor_data;
537 };
538 
539 /* Values for pin_config_type field above */
540 
541 #define ACPI_PIN_CONFIG_DEFAULT                 0
542 #define ACPI_PIN_CONFIG_BIAS_PULL_UP            1
543 #define ACPI_PIN_CONFIG_BIAS_PULL_DOWN          2
544 #define ACPI_PIN_CONFIG_BIAS_DEFAULT            3
545 #define ACPI_PIN_CONFIG_BIAS_DISABLE            4
546 #define ACPI_PIN_CONFIG_BIAS_HIGH_IMPEDANCE     5
547 #define ACPI_PIN_CONFIG_BIAS_BUS_HOLD           6
548 #define ACPI_PIN_CONFIG_DRIVE_OPEN_DRAIN        7
549 #define ACPI_PIN_CONFIG_DRIVE_OPEN_SOURCE       8
550 #define ACPI_PIN_CONFIG_DRIVE_PUSH_PULL         9
551 #define ACPI_PIN_CONFIG_DRIVE_STRENGTH          10
552 #define ACPI_PIN_CONFIG_SLEW_RATE               11
553 #define ACPI_PIN_CONFIG_INPUT_DEBOUNCE          12
554 #define ACPI_PIN_CONFIG_INPUT_SCHMITT_TRIGGER   13
555 
556 struct acpi_resource_pin_group {
557 	u8 revision_id;
558 	u8 producer_consumer;	/* For values, see Producer/Consumer above */
559 	u16 pin_table_length;
560 	u16 vendor_length;
561 	u16 *pin_table;
562 	struct acpi_resource_label resource_label;
563 	u8 *vendor_data;
564 };
565 
566 struct acpi_resource_pin_group_function {
567 	u8 revision_id;
568 	u8 producer_consumer;	/* For values, see Producer/Consumer above */
569 	u8 shareable;		/* For values, see Interrupt Attributes above */
570 	u16 function_number;
571 	u16 vendor_length;
572 	struct acpi_resource_source resource_source;
573 	struct acpi_resource_label resource_source_label;
574 	u8 *vendor_data;
575 };
576 
577 struct acpi_resource_pin_group_config {
578 	u8 revision_id;
579 	u8 producer_consumer;	/* For values, see Producer/Consumer above */
580 	u8 shareable;		/* For values, see Interrupt Attributes above */
581 	u8 pin_config_type;	/* For values, see pin_config_type above */
582 	u32 pin_config_value;
583 	u16 vendor_length;
584 	struct acpi_resource_source resource_source;
585 	struct acpi_resource_label resource_source_label;
586 	u8 *vendor_data;
587 };
588 
589 /* ACPI_RESOURCE_TYPEs */
590 
591 #define ACPI_RESOURCE_TYPE_IRQ                  0
592 #define ACPI_RESOURCE_TYPE_DMA                  1
593 #define ACPI_RESOURCE_TYPE_START_DEPENDENT      2
594 #define ACPI_RESOURCE_TYPE_END_DEPENDENT        3
595 #define ACPI_RESOURCE_TYPE_IO                   4
596 #define ACPI_RESOURCE_TYPE_FIXED_IO             5
597 #define ACPI_RESOURCE_TYPE_VENDOR               6
598 #define ACPI_RESOURCE_TYPE_END_TAG              7
599 #define ACPI_RESOURCE_TYPE_MEMORY24             8
600 #define ACPI_RESOURCE_TYPE_MEMORY32             9
601 #define ACPI_RESOURCE_TYPE_FIXED_MEMORY32       10
602 #define ACPI_RESOURCE_TYPE_ADDRESS16            11
603 #define ACPI_RESOURCE_TYPE_ADDRESS32            12
604 #define ACPI_RESOURCE_TYPE_ADDRESS64            13
605 #define ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64   14	/* ACPI 3.0 */
606 #define ACPI_RESOURCE_TYPE_EXTENDED_IRQ         15
607 #define ACPI_RESOURCE_TYPE_GENERIC_REGISTER     16
608 #define ACPI_RESOURCE_TYPE_GPIO                 17	/* ACPI 5.0 */
609 #define ACPI_RESOURCE_TYPE_FIXED_DMA            18	/* ACPI 5.0 */
610 #define ACPI_RESOURCE_TYPE_SERIAL_BUS           19	/* ACPI 5.0 */
611 #define ACPI_RESOURCE_TYPE_PIN_FUNCTION         20	/* ACPI 6.2 */
612 #define ACPI_RESOURCE_TYPE_PIN_CONFIG           21	/* ACPI 6.2 */
613 #define ACPI_RESOURCE_TYPE_PIN_GROUP            22	/* ACPI 6.2 */
614 #define ACPI_RESOURCE_TYPE_PIN_GROUP_FUNCTION   23	/* ACPI 6.2 */
615 #define ACPI_RESOURCE_TYPE_PIN_GROUP_CONFIG     24	/* ACPI 6.2 */
616 #define ACPI_RESOURCE_TYPE_MAX                  24
617 
618 /* Master union for resource descriptors */
619 
620 union acpi_resource_data {
621 	struct acpi_resource_irq irq;
622 	struct acpi_resource_dma dma;
623 	struct acpi_resource_start_dependent start_dpf;
624 	struct acpi_resource_io io;
625 	struct acpi_resource_fixed_io fixed_io;
626 	struct acpi_resource_fixed_dma fixed_dma;
627 	struct acpi_resource_vendor vendor;
628 	struct acpi_resource_vendor_typed vendor_typed;
629 	struct acpi_resource_end_tag end_tag;
630 	struct acpi_resource_memory24 memory24;
631 	struct acpi_resource_memory32 memory32;
632 	struct acpi_resource_fixed_memory32 fixed_memory32;
633 	struct acpi_resource_address16 address16;
634 	struct acpi_resource_address32 address32;
635 	struct acpi_resource_address64 address64;
636 	struct acpi_resource_extended_address64 ext_address64;
637 	struct acpi_resource_extended_irq extended_irq;
638 	struct acpi_resource_generic_register generic_reg;
639 	struct acpi_resource_gpio gpio;
640 	struct acpi_resource_i2c_serialbus i2c_serial_bus;
641 	struct acpi_resource_spi_serialbus spi_serial_bus;
642 	struct acpi_resource_uart_serialbus uart_serial_bus;
643 	struct acpi_resource_csi2_serialbus csi2_serial_bus;
644 	struct acpi_resource_common_serialbus common_serial_bus;
645 	struct acpi_resource_pin_function pin_function;
646 	struct acpi_resource_pin_config pin_config;
647 	struct acpi_resource_pin_group pin_group;
648 	struct acpi_resource_pin_group_function pin_group_function;
649 	struct acpi_resource_pin_group_config pin_group_config;
650 
651 	/* Common fields */
652 
653 	struct acpi_resource_address address;	/* Common 16/32/64 address fields */
654 };
655 
656 /* Common resource header */
657 
658 struct acpi_resource {
659 	u32 type;
660 	u32 length;
661 	union acpi_resource_data data;
662 };
663 
664 /* restore default alignment */
665 
666 #pragma pack()
667 
668 #define ACPI_RS_SIZE_NO_DATA                8	/* Id + Length fields */
669 #define ACPI_RS_SIZE_MIN                    (u32) ACPI_ROUND_UP_TO_NATIVE_WORD (12)
670 #define ACPI_RS_SIZE(type)                  (u32) (ACPI_RS_SIZE_NO_DATA + sizeof (type))
671 
672 /* Macro for walking resource templates with multiple descriptors */
673 
674 #define ACPI_NEXT_RESOURCE(res) \
675 	ACPI_ADD_PTR (struct acpi_resource, (res), (res)->length)
676 
677 struct acpi_pci_routing_table {
678 	u32 length;
679 	u32 pin;
680 	u64 address;		/* here for 64-bit alignment */
681 	u32 source_index;
682 	char source[4];		/* pad to 64 bits so sizeof() works in all cases */
683 };
684 
685 #endif				/* __ACRESTYP_H__ */
686