| 1 |
|
| 2 | |
| 3 | *
|
| 4 | * Name: acrestyp.h - Defines, types, and structures for resource descriptors
|
| 5 | *
|
| 6 | * Copyright (C) 2000 - 2026, 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;
|
| 17 | typedef u32 acpi_rsdesc_size;
|
| 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 |
|
| 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 |
|
| 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 |
|
| 43 |
|
| 44 | #define ACPI_SPARSE_TRANSLATION (u8) 0x01
|
| 45 |
|
| 46 | |
| 47 | * IO Port Descriptor Decode
|
| 48 |
|
| 49 | #define ACPI_DECODE_10 (u8) 0x00
|
| 50 | #define ACPI_DECODE_16 (u8) 0x01
|
| 51 |
|
| 52 | |
| 53 | * Interrupt attributes - used in multiple descriptors
|
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
|
| 58 | #define ACPI_LEVEL_SENSITIVE (u8) 0x00
|
| 59 | #define ACPI_EDGE_SENSITIVE (u8) 0x01
|
| 60 |
|
| 61 |
|
| 62 |
|
| 63 | #define ACPI_ACTIVE_HIGH (u8) 0x00
|
| 64 | #define ACPI_ACTIVE_LOW (u8) 0x01
|
| 65 | #define ACPI_ACTIVE_BOTH (u8) 0x02
|
| 66 |
|
| 67 |
|
| 68 |
|
| 69 | #define ACPI_EXCLUSIVE (u8) 0x00
|
| 70 | #define ACPI_SHARED (u8) 0x01
|
| 71 |
|
| 72 |
|
| 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 |
|
| 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 |
|
| 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 | union {
|
| 146 | u8 interrupt;
|
| 147 | ACPI_FLEX_ARRAY(u8, interrupts);
|
| 148 | };
|
| 149 | };
|
| 150 |
|
| 151 | struct acpi_resource_dma {
|
| 152 | u8 type;
|
| 153 | u8 bus_master;
|
| 154 | u8 transfer;
|
| 155 | u8 channel_count;
|
| 156 | union {
|
| 157 | u8 channel;
|
| 158 | ACPI_FLEX_ARRAY(u8, channels);
|
| 159 | };
|
| 160 | };
|
| 161 |
|
| 162 | struct acpi_resource_start_dependent {
|
| 163 | u8 descriptor_length;
|
| 164 | u8 compatibility_priority;
|
| 165 | u8 performance_robustness;
|
| 166 | };
|
| 167 |
|
| 168 | |
| 169 | * The END_DEPENDENT_FUNCTIONS_RESOURCE struct is not
|
| 170 | * needed because it has no fields
|
| 171 |
|
| 172 |
|
| 173 | struct acpi_resource_io {
|
| 174 | u8 io_decode;
|
| 175 | u8 alignment;
|
| 176 | u8 address_length;
|
| 177 | u16 minimum;
|
| 178 | u16 maximum;
|
| 179 | };
|
| 180 |
|
| 181 | struct acpi_resource_fixed_io {
|
| 182 | u16 address;
|
| 183 | u8 address_length;
|
| 184 | };
|
| 185 |
|
| 186 | struct acpi_resource_fixed_dma {
|
| 187 | u16 request_lines;
|
| 188 | u16 channels;
|
| 189 | u8 width;
|
| 190 | };
|
| 191 |
|
| 192 |
|
| 193 |
|
| 194 | #define ACPI_DMA_WIDTH8 0
|
| 195 | #define ACPI_DMA_WIDTH16 1
|
| 196 | #define ACPI_DMA_WIDTH32 2
|
| 197 | #define ACPI_DMA_WIDTH64 3
|
| 198 | #define ACPI_DMA_WIDTH128 4
|
| 199 | #define ACPI_DMA_WIDTH256 5
|
| 200 |
|
| 201 | struct acpi_resource_vendor {
|
| 202 | u16 byte_length;
|
| 203 | u8 byte_data[];
|
| 204 | };
|
| 205 |
|
| 206 |
|
| 207 |
|
| 208 | struct acpi_resource_vendor_typed {
|
| 209 | u16 byte_length;
|
| 210 | u8 uuid_subtype;
|
| 211 | u8 uuid[ACPI_UUID_LENGTH];
|
| 212 | u8 byte_data[];
|
| 213 | };
|
| 214 |
|
| 215 | struct acpi_resource_end_tag {
|
| 216 | u8 checksum;
|
| 217 | };
|
| 218 |
|
| 219 | struct acpi_resource_memory24 {
|
| 220 | u8 write_protect;
|
| 221 | u16 minimum;
|
| 222 | u16 maximum;
|
| 223 | u16 alignment;
|
| 224 | u16 address_length;
|
| 225 | };
|
| 226 |
|
| 227 | struct acpi_resource_memory32 {
|
| 228 | u8 write_protect;
|
| 229 | u32 minimum;
|
| 230 | u32 maximum;
|
| 231 | u32 alignment;
|
| 232 | u32 address_length;
|
| 233 | };
|
| 234 |
|
| 235 | struct acpi_resource_fixed_memory32 {
|
| 236 | u8 write_protect;
|
| 237 | u32 address;
|
| 238 | u32 address_length;
|
| 239 | };
|
| 240 |
|
| 241 | struct acpi_memory_attribute {
|
| 242 | u8 write_protect;
|
| 243 | u8 caching;
|
| 244 | u8 range_type;
|
| 245 | u8 translation;
|
| 246 | };
|
| 247 |
|
| 248 | struct acpi_io_attribute {
|
| 249 | u8 range_type;
|
| 250 | u8 translation;
|
| 251 | u8 translation_type;
|
| 252 | u8 reserved1;
|
| 253 | };
|
| 254 |
|
| 255 | union acpi_resource_attribute {
|
| 256 | struct acpi_memory_attribute mem;
|
| 257 | struct acpi_io_attribute io;
|
| 258 |
|
| 259 |
|
| 260 |
|
| 261 | u8 type_specific;
|
| 262 | };
|
| 263 |
|
| 264 | struct acpi_resource_label {
|
| 265 | u16 string_length;
|
| 266 | char *string_ptr;
|
| 267 | };
|
| 268 |
|
| 269 | struct acpi_resource_source {
|
| 270 | u8 index;
|
| 271 | u16 string_length;
|
| 272 | char *string_ptr;
|
| 273 | };
|
| 274 |
|
| 275 |
|
| 276 |
|
| 277 | #define ACPI_RESOURCE_ADDRESS_COMMON \
|
| 278 | u8 resource_type; \
|
| 279 | u8 producer_consumer; \
|
| 280 | u8 decode; \
|
| 281 | u8 min_address_fixed; \
|
| 282 | u8 max_address_fixed; \
|
| 283 | union acpi_resource_attribute info;
|
| 284 |
|
| 285 | struct acpi_address16_attribute {
|
| 286 | u16 granularity;
|
| 287 | u16 minimum;
|
| 288 | u16 maximum;
|
| 289 | u16 translation_offset;
|
| 290 | u16 address_length;
|
| 291 | };
|
| 292 |
|
| 293 | struct acpi_address32_attribute {
|
| 294 | u32 granularity;
|
| 295 | u32 minimum;
|
| 296 | u32 maximum;
|
| 297 | u32 translation_offset;
|
| 298 | u32 address_length;
|
| 299 | };
|
| 300 |
|
| 301 | struct acpi_address64_attribute {
|
| 302 | u64 granularity;
|
| 303 | u64 minimum;
|
| 304 | u64 maximum;
|
| 305 | u64 translation_offset;
|
| 306 | u64 address_length;
|
| 307 | };
|
| 308 |
|
| 309 | struct acpi_resource_address {
|
| 310 | ACPI_RESOURCE_ADDRESS_COMMON};
|
| 311 |
|
| 312 | struct acpi_resource_address16 {
|
| 313 | ACPI_RESOURCE_ADDRESS_COMMON struct acpi_address16_attribute address;
|
| 314 | struct acpi_resource_source resource_source;
|
| 315 | };
|
| 316 |
|
| 317 | struct acpi_resource_address32 {
|
| 318 | ACPI_RESOURCE_ADDRESS_COMMON struct acpi_address32_attribute address;
|
| 319 | struct acpi_resource_source resource_source;
|
| 320 | };
|
| 321 |
|
| 322 | struct acpi_resource_address64 {
|
| 323 | ACPI_RESOURCE_ADDRESS_COMMON struct acpi_address64_attribute address;
|
| 324 | struct acpi_resource_source resource_source;
|
| 325 | };
|
| 326 |
|
| 327 | struct acpi_resource_extended_address64 {
|
| 328 | ACPI_RESOURCE_ADDRESS_COMMON u8 revision_ID;
|
| 329 | struct acpi_address64_attribute address;
|
| 330 | u64 type_specific;
|
| 331 | };
|
| 332 |
|
| 333 | struct acpi_resource_extended_irq {
|
| 334 | u8 producer_consumer;
|
| 335 | u8 triggering;
|
| 336 | u8 polarity;
|
| 337 | u8 shareable;
|
| 338 | u8 wake_capable;
|
| 339 | u8 interrupt_count;
|
| 340 | struct acpi_resource_source resource_source;
|
| 341 | union {
|
| 342 | u32 interrupt;
|
| 343 | ACPI_FLEX_ARRAY(u32, interrupts);
|
| 344 | };
|
| 345 | };
|
| 346 |
|
| 347 | struct acpi_resource_generic_register {
|
| 348 | u8 space_id;
|
| 349 | u8 bit_width;
|
| 350 | u8 bit_offset;
|
| 351 | u8 access_size;
|
| 352 | u64 address;
|
| 353 | };
|
| 354 |
|
| 355 | struct acpi_resource_gpio {
|
| 356 | u8 revision_id;
|
| 357 | u8 connection_type;
|
| 358 | u8 producer_consumer;
|
| 359 | u8 pin_config;
|
| 360 | u8 shareable;
|
| 361 | u8 wake_capable;
|
| 362 | u8 io_restriction;
|
| 363 | u8 triggering;
|
| 364 | u8 polarity;
|
| 365 | u16 drive_strength;
|
| 366 | u16 debounce_timeout;
|
| 367 | u16 pin_table_length;
|
| 368 | u16 vendor_length;
|
| 369 | struct acpi_resource_source resource_source;
|
| 370 | u16 *pin_table;
|
| 371 | u8 *vendor_data;
|
| 372 | };
|
| 373 |
|
| 374 |
|
| 375 |
|
| 376 | #define ACPI_RESOURCE_GPIO_TYPE_INT 0
|
| 377 | #define ACPI_RESOURCE_GPIO_TYPE_IO 1
|
| 378 |
|
| 379 |
|
| 380 |
|
| 381 | #define ACPI_PIN_CONFIG_DEFAULT 0
|
| 382 | #define ACPI_PIN_CONFIG_PULLUP 1
|
| 383 | #define ACPI_PIN_CONFIG_PULLDOWN 2
|
| 384 | #define ACPI_PIN_CONFIG_NOPULL 3
|
| 385 |
|
| 386 |
|
| 387 |
|
| 388 | #define ACPI_IO_RESTRICT_NONE 0
|
| 389 | #define ACPI_IO_RESTRICT_INPUT 1
|
| 390 | #define ACPI_IO_RESTRICT_OUTPUT 2
|
| 391 | #define ACPI_IO_RESTRICT_NONE_PRESERVE 3
|
| 392 |
|
| 393 |
|
| 394 |
|
| 395 | #define ACPI_RESOURCE_SERIAL_COMMON \
|
| 396 | u8 revision_id; \
|
| 397 | u8 type; \
|
| 398 | u8 producer_consumer; \
|
| 399 | u8 slave_mode; \
|
| 400 | u8 connection_sharing; \
|
| 401 | u8 type_revision_id; \
|
| 402 | u16 type_data_length; \
|
| 403 | u16 vendor_length; \
|
| 404 | struct acpi_resource_source resource_source; \
|
| 405 | u8 *vendor_data;
|
| 406 |
|
| 407 | struct acpi_resource_common_serialbus {
|
| 408 | ACPI_RESOURCE_SERIAL_COMMON};
|
| 409 |
|
| 410 |
|
| 411 |
|
| 412 | #define ACPI_RESOURCE_SERIAL_TYPE_I2C 1
|
| 413 | #define ACPI_RESOURCE_SERIAL_TYPE_SPI 2
|
| 414 | #define ACPI_RESOURCE_SERIAL_TYPE_UART 3
|
| 415 | #define ACPI_RESOURCE_SERIAL_TYPE_CSI2 4
|
| 416 |
|
| 417 |
|
| 418 |
|
| 419 | #define ACPI_CONTROLLER_INITIATED 0
|
| 420 | #define ACPI_DEVICE_INITIATED 1
|
| 421 |
|
| 422 | struct acpi_resource_i2c_serialbus {
|
| 423 | ACPI_RESOURCE_SERIAL_COMMON u8 access_mode;
|
| 424 | u16 slave_address;
|
| 425 | u32 connection_speed;
|
| 426 | u8 lvr;
|
| 427 | };
|
| 428 |
|
| 429 |
|
| 430 |
|
| 431 | #define ACPI_I2C_7BIT_MODE 0
|
| 432 | #define ACPI_I2C_10BIT_MODE 1
|
| 433 |
|
| 434 | struct acpi_resource_spi_serialbus {
|
| 435 | ACPI_RESOURCE_SERIAL_COMMON u8 wire_mode;
|
| 436 | u8 device_polarity;
|
| 437 | u8 data_bit_length;
|
| 438 | u8 clock_phase;
|
| 439 | u8 clock_polarity;
|
| 440 | u16 device_selection;
|
| 441 | u32 connection_speed;
|
| 442 | };
|
| 443 |
|
| 444 |
|
| 445 |
|
| 446 | #define ACPI_SPI_4WIRE_MODE 0
|
| 447 | #define ACPI_SPI_3WIRE_MODE 1
|
| 448 |
|
| 449 |
|
| 450 |
|
| 451 | #define ACPI_SPI_ACTIVE_LOW 0
|
| 452 | #define ACPI_SPI_ACTIVE_HIGH 1
|
| 453 |
|
| 454 |
|
| 455 |
|
| 456 | #define ACPI_SPI_FIRST_PHASE 0
|
| 457 | #define ACPI_SPI_SECOND_PHASE 1
|
| 458 |
|
| 459 |
|
| 460 |
|
| 461 | #define ACPI_SPI_START_LOW 0
|
| 462 | #define ACPI_SPI_START_HIGH 1
|
| 463 |
|
| 464 | struct acpi_resource_uart_serialbus {
|
| 465 | ACPI_RESOURCE_SERIAL_COMMON u8 endian;
|
| 466 | u8 data_bits;
|
| 467 | u8 stop_bits;
|
| 468 | u8 flow_control;
|
| 469 | u8 parity;
|
| 470 | u8 lines_enabled;
|
| 471 | u16 rx_fifo_size;
|
| 472 | u16 tx_fifo_size;
|
| 473 | u32 default_baud_rate;
|
| 474 | };
|
| 475 |
|
| 476 |
|
| 477 |
|
| 478 | #define ACPI_UART_LITTLE_ENDIAN 0
|
| 479 | #define ACPI_UART_BIG_ENDIAN 1
|
| 480 |
|
| 481 |
|
| 482 |
|
| 483 | #define ACPI_UART_5_DATA_BITS 0
|
| 484 | #define ACPI_UART_6_DATA_BITS 1
|
| 485 | #define ACPI_UART_7_DATA_BITS 2
|
| 486 | #define ACPI_UART_8_DATA_BITS 3
|
| 487 | #define ACPI_UART_9_DATA_BITS 4
|
| 488 |
|
| 489 |
|
| 490 |
|
| 491 | #define ACPI_UART_NO_STOP_BITS 0
|
| 492 | #define ACPI_UART_1_STOP_BIT 1
|
| 493 | #define ACPI_UART_1P5_STOP_BITS 2
|
| 494 | #define ACPI_UART_2_STOP_BITS 3
|
| 495 |
|
| 496 |
|
| 497 |
|
| 498 | #define ACPI_UART_FLOW_CONTROL_NONE 0
|
| 499 | #define ACPI_UART_FLOW_CONTROL_HW 1
|
| 500 | #define ACPI_UART_FLOW_CONTROL_XON_XOFF 2
|
| 501 |
|
| 502 |
|
| 503 |
|
| 504 | #define ACPI_UART_PARITY_NONE 0
|
| 505 | #define ACPI_UART_PARITY_EVEN 1
|
| 506 | #define ACPI_UART_PARITY_ODD 2
|
| 507 | #define ACPI_UART_PARITY_MARK 3
|
| 508 | #define ACPI_UART_PARITY_SPACE 4
|
| 509 |
|
| 510 |
|
| 511 |
|
| 512 | #define ACPI_UART_CARRIER_DETECT (1<<2)
|
| 513 | #define ACPI_UART_RING_INDICATOR (1<<3)
|
| 514 | #define ACPI_UART_DATA_SET_READY (1<<4)
|
| 515 | #define ACPI_UART_DATA_TERMINAL_READY (1<<5)
|
| 516 | #define ACPI_UART_CLEAR_TO_SEND (1<<6)
|
| 517 | #define ACPI_UART_REQUEST_TO_SEND (1<<7)
|
| 518 |
|
| 519 | struct acpi_resource_csi2_serialbus {
|
| 520 | ACPI_RESOURCE_SERIAL_COMMON u8 local_port_instance;
|
| 521 | u8 phy_type;
|
| 522 | };
|
| 523 |
|
| 524 | struct acpi_resource_pin_function {
|
| 525 | u8 revision_id;
|
| 526 | u8 pin_config;
|
| 527 | u8 shareable;
|
| 528 | u16 function_number;
|
| 529 | u16 pin_table_length;
|
| 530 | u16 vendor_length;
|
| 531 | struct acpi_resource_source resource_source;
|
| 532 | u16 *pin_table;
|
| 533 | u8 *vendor_data;
|
| 534 | };
|
| 535 |
|
| 536 | struct acpi_resource_pin_config {
|
| 537 | u8 revision_id;
|
| 538 | u8 producer_consumer;
|
| 539 | u8 shareable;
|
| 540 | u8 pin_config_type;
|
| 541 | u32 pin_config_value;
|
| 542 | u16 pin_table_length;
|
| 543 | u16 vendor_length;
|
| 544 | struct acpi_resource_source resource_source;
|
| 545 | u16 *pin_table;
|
| 546 | u8 *vendor_data;
|
| 547 | };
|
| 548 |
|
| 549 | struct acpi_resource_clock_input {
|
| 550 | u8 revision_id;
|
| 551 | u8 mode;
|
| 552 | u8 scale;
|
| 553 | u16 frequency_divisor;
|
| 554 | u32 frequency_numerator;
|
| 555 | struct acpi_resource_source resource_source;
|
| 556 | };
|
| 557 |
|
| 558 |
|
| 559 |
|
| 560 | #define ACPI_PIN_CONFIG_DEFAULT 0
|
| 561 | #define ACPI_PIN_CONFIG_BIAS_PULL_UP 1
|
| 562 | #define ACPI_PIN_CONFIG_BIAS_PULL_DOWN 2
|
| 563 | #define ACPI_PIN_CONFIG_BIAS_DEFAULT 3
|
| 564 | #define ACPI_PIN_CONFIG_BIAS_DISABLE 4
|
| 565 | #define ACPI_PIN_CONFIG_BIAS_HIGH_IMPEDANCE 5
|
| 566 | #define ACPI_PIN_CONFIG_BIAS_BUS_HOLD 6
|
| 567 | #define ACPI_PIN_CONFIG_DRIVE_OPEN_DRAIN 7
|
| 568 | #define ACPI_PIN_CONFIG_DRIVE_OPEN_SOURCE 8
|
| 569 | #define ACPI_PIN_CONFIG_DRIVE_PUSH_PULL 9
|
| 570 | #define ACPI_PIN_CONFIG_DRIVE_STRENGTH 10
|
| 571 | #define ACPI_PIN_CONFIG_SLEW_RATE 11
|
| 572 | #define ACPI_PIN_CONFIG_INPUT_DEBOUNCE 12
|
| 573 | #define ACPI_PIN_CONFIG_INPUT_SCHMITT_TRIGGER 13
|
| 574 |
|
| 575 | struct acpi_resource_pin_group {
|
| 576 | u8 revision_id;
|
| 577 | u8 producer_consumer;
|
| 578 | u16 pin_table_length;
|
| 579 | u16 vendor_length;
|
| 580 | u16 *pin_table;
|
| 581 | struct acpi_resource_label resource_label;
|
| 582 | u8 *vendor_data;
|
| 583 | };
|
| 584 |
|
| 585 | struct acpi_resource_pin_group_function {
|
| 586 | u8 revision_id;
|
| 587 | u8 producer_consumer;
|
| 588 | u8 shareable;
|
| 589 | u16 function_number;
|
| 590 | u16 vendor_length;
|
| 591 | struct acpi_resource_source resource_source;
|
| 592 | struct acpi_resource_label resource_source_label;
|
| 593 | u8 *vendor_data;
|
| 594 | };
|
| 595 |
|
| 596 | struct acpi_resource_pin_group_config {
|
| 597 | u8 revision_id;
|
| 598 | u8 producer_consumer;
|
| 599 | u8 shareable;
|
| 600 | u8 pin_config_type;
|
| 601 | u32 pin_config_value;
|
| 602 | u16 vendor_length;
|
| 603 | struct acpi_resource_source resource_source;
|
| 604 | struct acpi_resource_label resource_source_label;
|
| 605 | u8 *vendor_data;
|
| 606 | };
|
| 607 |
|
| 608 |
|
| 609 |
|
| 610 | #define ACPI_RESOURCE_TYPE_IRQ 0
|
| 611 | #define ACPI_RESOURCE_TYPE_DMA 1
|
| 612 | #define ACPI_RESOURCE_TYPE_START_DEPENDENT 2
|
| 613 | #define ACPI_RESOURCE_TYPE_END_DEPENDENT 3
|
| 614 | #define ACPI_RESOURCE_TYPE_IO 4
|
| 615 | #define ACPI_RESOURCE_TYPE_FIXED_IO 5
|
| 616 | #define ACPI_RESOURCE_TYPE_VENDOR 6
|
| 617 | #define ACPI_RESOURCE_TYPE_END_TAG 7
|
| 618 | #define ACPI_RESOURCE_TYPE_MEMORY24 8
|
| 619 | #define ACPI_RESOURCE_TYPE_MEMORY32 9
|
| 620 | #define ACPI_RESOURCE_TYPE_FIXED_MEMORY32 10
|
| 621 | #define ACPI_RESOURCE_TYPE_ADDRESS16 11
|
| 622 | #define ACPI_RESOURCE_TYPE_ADDRESS32 12
|
| 623 | #define ACPI_RESOURCE_TYPE_ADDRESS64 13
|
| 624 | #define ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64 14
|
| 625 | #define ACPI_RESOURCE_TYPE_EXTENDED_IRQ 15
|
| 626 | #define ACPI_RESOURCE_TYPE_GENERIC_REGISTER 16
|
| 627 | #define ACPI_RESOURCE_TYPE_GPIO 17
|
| 628 | #define ACPI_RESOURCE_TYPE_FIXED_DMA 18
|
| 629 | #define ACPI_RESOURCE_TYPE_SERIAL_BUS 19
|
| 630 | #define ACPI_RESOURCE_TYPE_PIN_FUNCTION 20
|
| 631 | #define ACPI_RESOURCE_TYPE_PIN_CONFIG 21
|
| 632 | #define ACPI_RESOURCE_TYPE_PIN_GROUP 22
|
| 633 | #define ACPI_RESOURCE_TYPE_PIN_GROUP_FUNCTION 23
|
| 634 | #define ACPI_RESOURCE_TYPE_PIN_GROUP_CONFIG 24
|
| 635 | #define ACPI_RESOURCE_TYPE_CLOCK_INPUT 25
|
| 636 | #define ACPI_RESOURCE_TYPE_MAX 25
|
| 637 |
|
| 638 |
|
| 639 |
|
| 640 | union acpi_resource_data {
|
| 641 | struct acpi_resource_irq irq;
|
| 642 | struct acpi_resource_dma dma;
|
| 643 | struct acpi_resource_start_dependent start_dpf;
|
| 644 | struct acpi_resource_io io;
|
| 645 | struct acpi_resource_fixed_io fixed_io;
|
| 646 | struct acpi_resource_fixed_dma fixed_dma;
|
| 647 | struct acpi_resource_vendor vendor;
|
| 648 | struct acpi_resource_vendor_typed vendor_typed;
|
| 649 | struct acpi_resource_end_tag end_tag;
|
| 650 | struct acpi_resource_memory24 memory24;
|
| 651 | struct acpi_resource_memory32 memory32;
|
| 652 | struct acpi_resource_fixed_memory32 fixed_memory32;
|
| 653 | struct acpi_resource_address16 address16;
|
| 654 | struct acpi_resource_address32 address32;
|
| 655 | struct acpi_resource_address64 address64;
|
| 656 | struct acpi_resource_extended_address64 ext_address64;
|
| 657 | struct acpi_resource_extended_irq extended_irq;
|
| 658 | struct acpi_resource_generic_register generic_reg;
|
| 659 | struct acpi_resource_gpio gpio;
|
| 660 | struct acpi_resource_i2c_serialbus i2c_serial_bus;
|
| 661 | struct acpi_resource_spi_serialbus spi_serial_bus;
|
| 662 | struct acpi_resource_uart_serialbus uart_serial_bus;
|
| 663 | struct acpi_resource_csi2_serialbus csi2_serial_bus;
|
| 664 | struct acpi_resource_common_serialbus common_serial_bus;
|
| 665 | struct acpi_resource_pin_function pin_function;
|
| 666 | struct acpi_resource_pin_config pin_config;
|
| 667 | struct acpi_resource_pin_group pin_group;
|
| 668 | struct acpi_resource_pin_group_function pin_group_function;
|
| 669 | struct acpi_resource_pin_group_config pin_group_config;
|
| 670 | struct acpi_resource_clock_input clock_input;
|
| 671 |
|
| 672 |
|
| 673 |
|
| 674 | struct acpi_resource_address address;
|
| 675 | };
|
| 676 |
|
| 677 |
|
| 678 |
|
| 679 | struct acpi_resource {
|
| 680 | u32 type;
|
| 681 | u32 length;
|
| 682 | union acpi_resource_data data;
|
| 683 | };
|
| 684 |
|
| 685 |
|
| 686 |
|
| 687 | #pragma pack()
|
| 688 |
|
| 689 | #define ACPI_RS_SIZE_NO_DATA 8
|
| 690 | #define ACPI_RS_SIZE_MIN (u32) ACPI_ROUND_UP_TO_NATIVE_WORD (12)
|
| 691 | #define ACPI_RS_SIZE(type) (u32) (ACPI_RS_SIZE_NO_DATA + sizeof (type))
|
| 692 |
|
| 693 |
|
| 694 |
|
| 695 | #define ACPI_NEXT_RESOURCE(res) \
|
| 696 | ACPI_ADD_PTR (struct acpi_resource, (res), (res)->length)
|
| 697 |
|
| 698 | struct acpi_pci_routing_table {
|
| 699 | u32 length;
|
| 700 | u32 pin;
|
| 701 | u64 address;
|
| 702 | u32 source_index;
|
| 703 | union {
|
| 704 | char pad[4];
|
| 705 | ACPI_FLEX_ARRAY(char, source);
|
| 706 | };
|
| 707 | };
|
| 708 |
|
| 709 | #endif
|