diff options
author | Lin Ming <ming.m.lin@intel.com> | 2011-11-16 01:38:13 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2012-01-17 03:36:30 -0500 |
commit | e0fe0a8d4ed5474261d0ee1452f5d9ae77236958 (patch) | |
tree | cec332ccaab7fa0dd03cbc87ea1212f7182c2309 /drivers/acpi/acpica/amlresrc.h | |
parent | 2da120b6847f85c406f9afa13853e2755684389e (diff) |
ACPI 5.0: Support for all new resource descriptors
FixedDMA, GPIO descriptors, SerialBus descriptors
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/amlresrc.h')
-rw-r--r-- | drivers/acpi/acpica/amlresrc.h | 136 |
1 files changed, 136 insertions, 0 deletions
diff --git a/drivers/acpi/acpica/amlresrc.h b/drivers/acpi/acpica/amlresrc.h index 59122cde247c..d4c30511aca9 100644 --- a/drivers/acpi/acpica/amlresrc.h +++ b/drivers/acpi/acpica/amlresrc.h | |||
@@ -58,29 +58,48 @@ | |||
58 | #define ACPI_RESTAG_TYPESPECIFICATTRIBUTES "_ATT" | 58 | #define ACPI_RESTAG_TYPESPECIFICATTRIBUTES "_ATT" |
59 | #define ACPI_RESTAG_BASEADDRESS "_BAS" | 59 | #define ACPI_RESTAG_BASEADDRESS "_BAS" |
60 | #define ACPI_RESTAG_BUSMASTER "_BM_" /* Master(1), Slave(0) */ | 60 | #define ACPI_RESTAG_BUSMASTER "_BM_" /* Master(1), Slave(0) */ |
61 | #define ACPI_RESTAG_DEBOUNCETIME "_DBT" | ||
61 | #define ACPI_RESTAG_DECODE "_DEC" | 62 | #define ACPI_RESTAG_DECODE "_DEC" |
63 | #define ACPI_RESTAG_DEVICEPOLARITY "_DPL" | ||
62 | #define ACPI_RESTAG_DMA "_DMA" | 64 | #define ACPI_RESTAG_DMA "_DMA" |
63 | #define ACPI_RESTAG_DMATYPE "_TYP" /* Compatible(0), A(1), B(2), F(3) */ | 65 | #define ACPI_RESTAG_DMATYPE "_TYP" /* Compatible(0), A(1), B(2), F(3) */ |
66 | #define ACPI_RESTAG_DRIVESTRENGTH "_DRS" | ||
67 | #define ACPI_RESTAG_ENDIANNESS "_END" | ||
68 | #define ACPI_RESTAG_FLOWCONTROL "_FLC" | ||
64 | #define ACPI_RESTAG_GRANULARITY "_GRA" | 69 | #define ACPI_RESTAG_GRANULARITY "_GRA" |
65 | #define ACPI_RESTAG_INTERRUPT "_INT" | 70 | #define ACPI_RESTAG_INTERRUPT "_INT" |
66 | #define ACPI_RESTAG_INTERRUPTLEVEL "_LL_" /* active_lo(1), active_hi(0) */ | 71 | #define ACPI_RESTAG_INTERRUPTLEVEL "_LL_" /* active_lo(1), active_hi(0) */ |
67 | #define ACPI_RESTAG_INTERRUPTSHARE "_SHR" /* Shareable(1), no_share(0) */ | 72 | #define ACPI_RESTAG_INTERRUPTSHARE "_SHR" /* Shareable(1), no_share(0) */ |
68 | #define ACPI_RESTAG_INTERRUPTTYPE "_HE_" /* Edge(1), Level(0) */ | 73 | #define ACPI_RESTAG_INTERRUPTTYPE "_HE_" /* Edge(1), Level(0) */ |
74 | #define ACPI_RESTAG_IORESTRICTION "_IOR" | ||
69 | #define ACPI_RESTAG_LENGTH "_LEN" | 75 | #define ACPI_RESTAG_LENGTH "_LEN" |
76 | #define ACPI_RESTAG_LINE "_LIN" | ||
70 | #define ACPI_RESTAG_MEMATTRIBUTES "_MTP" /* Memory(0), Reserved(1), ACPI(2), NVS(3) */ | 77 | #define ACPI_RESTAG_MEMATTRIBUTES "_MTP" /* Memory(0), Reserved(1), ACPI(2), NVS(3) */ |
71 | #define ACPI_RESTAG_MEMTYPE "_MEM" /* non_cache(0), Cacheable(1) Cache+combine(2), Cache+prefetch(3) */ | 78 | #define ACPI_RESTAG_MEMTYPE "_MEM" /* non_cache(0), Cacheable(1) Cache+combine(2), Cache+prefetch(3) */ |
72 | #define ACPI_RESTAG_MAXADDR "_MAX" | 79 | #define ACPI_RESTAG_MAXADDR "_MAX" |
73 | #define ACPI_RESTAG_MINADDR "_MIN" | 80 | #define ACPI_RESTAG_MINADDR "_MIN" |
74 | #define ACPI_RESTAG_MAXTYPE "_MAF" | 81 | #define ACPI_RESTAG_MAXTYPE "_MAF" |
75 | #define ACPI_RESTAG_MINTYPE "_MIF" | 82 | #define ACPI_RESTAG_MINTYPE "_MIF" |
83 | #define ACPI_RESTAG_MODE "_MOD" | ||
84 | #define ACPI_RESTAG_PARITY "_PAR" | ||
85 | #define ACPI_RESTAG_PHASE "_PHA" | ||
86 | #define ACPI_RESTAG_PIN "_PIN" | ||
87 | #define ACPI_RESTAG_PINCONFIG "_PPI" | ||
88 | #define ACPI_RESTAG_POLARITY "_POL" | ||
76 | #define ACPI_RESTAG_REGISTERBITOFFSET "_RBO" | 89 | #define ACPI_RESTAG_REGISTERBITOFFSET "_RBO" |
77 | #define ACPI_RESTAG_REGISTERBITWIDTH "_RBW" | 90 | #define ACPI_RESTAG_REGISTERBITWIDTH "_RBW" |
78 | #define ACPI_RESTAG_RANGETYPE "_RNG" | 91 | #define ACPI_RESTAG_RANGETYPE "_RNG" |
79 | #define ACPI_RESTAG_READWRITETYPE "_RW_" /* read_only(0), Writeable (1) */ | 92 | #define ACPI_RESTAG_READWRITETYPE "_RW_" /* read_only(0), Writeable (1) */ |
93 | #define ACPI_RESTAG_LENGTH_RX "_RXL" | ||
94 | #define ACPI_RESTAG_LENGTH_TX "_TXL" | ||
95 | #define ACPI_RESTAG_SLAVEMODE "_SLV" | ||
96 | #define ACPI_RESTAG_SPEED "_SPE" | ||
97 | #define ACPI_RESTAG_STOPBITS "_STB" | ||
80 | #define ACPI_RESTAG_TRANSLATION "_TRA" | 98 | #define ACPI_RESTAG_TRANSLATION "_TRA" |
81 | #define ACPI_RESTAG_TRANSTYPE "_TRS" /* Sparse(1), Dense(0) */ | 99 | #define ACPI_RESTAG_TRANSTYPE "_TRS" /* Sparse(1), Dense(0) */ |
82 | #define ACPI_RESTAG_TYPE "_TTP" /* Translation(1), Static (0) */ | 100 | #define ACPI_RESTAG_TYPE "_TTP" /* Translation(1), Static (0) */ |
83 | #define ACPI_RESTAG_XFERTYPE "_SIZ" /* 8(0), 8_and16(1), 16(2) */ | 101 | #define ACPI_RESTAG_XFERTYPE "_SIZ" /* 8(0), 8_and16(1), 16(2) */ |
102 | #define ACPI_RESTAG_VENDORDATA "_VEN" | ||
84 | 103 | ||
85 | /* Default sizes for "small" resource descriptors */ | 104 | /* Default sizes for "small" resource descriptors */ |
86 | 105 | ||
@@ -90,6 +109,7 @@ | |||
90 | #define ASL_RDESC_END_DEPEND_SIZE 0x00 | 109 | #define ASL_RDESC_END_DEPEND_SIZE 0x00 |
91 | #define ASL_RDESC_IO_SIZE 0x07 | 110 | #define ASL_RDESC_IO_SIZE 0x07 |
92 | #define ASL_RDESC_FIXED_IO_SIZE 0x03 | 111 | #define ASL_RDESC_FIXED_IO_SIZE 0x03 |
112 | #define ASL_RDESC_FIXED_DMA_SIZE 0x05 | ||
93 | #define ASL_RDESC_END_TAG_SIZE 0x01 | 113 | #define ASL_RDESC_END_TAG_SIZE 0x01 |
94 | 114 | ||
95 | struct asl_resource_node { | 115 | struct asl_resource_node { |
@@ -164,6 +184,12 @@ struct aml_resource_end_tag { | |||
164 | AML_RESOURCE_SMALL_HEADER_COMMON u8 checksum; | 184 | AML_RESOURCE_SMALL_HEADER_COMMON u8 checksum; |
165 | }; | 185 | }; |
166 | 186 | ||
187 | struct aml_resource_fixed_dma { | ||
188 | AML_RESOURCE_SMALL_HEADER_COMMON u16 request_lines; | ||
189 | u16 channels; | ||
190 | u8 width; | ||
191 | }; | ||
192 | |||
167 | /* | 193 | /* |
168 | * LARGE descriptors | 194 | * LARGE descriptors |
169 | */ | 195 | */ |
@@ -263,6 +289,110 @@ struct aml_resource_generic_register { | |||
263 | u64 address; | 289 | u64 address; |
264 | }; | 290 | }; |
265 | 291 | ||
292 | /* Common descriptor for gpio_int and gpio_io (ACPI 5.0) */ | ||
293 | |||
294 | struct aml_resource_gpio { | ||
295 | AML_RESOURCE_LARGE_HEADER_COMMON u8 revision_id; | ||
296 | u8 connection_type; | ||
297 | u16 flags; | ||
298 | u16 int_flags; | ||
299 | u8 pin_config; | ||
300 | u16 drive_strength; | ||
301 | u16 debounce_timeout; | ||
302 | u16 pin_table_offset; | ||
303 | u8 res_source_index; | ||
304 | u16 res_source_offset; | ||
305 | u16 vendor_offset; | ||
306 | u16 vendor_length; | ||
307 | /* | ||
308 | * Optional fields follow immediately: | ||
309 | * 1) PIN list (Words) | ||
310 | * 2) Resource Source String | ||
311 | * 3) Vendor Data bytes | ||
312 | */ | ||
313 | }; | ||
314 | |||
315 | #define AML_RESOURCE_GPIO_REVISION 1 /* ACPI 5.0 */ | ||
316 | |||
317 | /* Values for connection_type above */ | ||
318 | |||
319 | #define AML_RESOURCE_GPIO_TYPE_INT 0 | ||
320 | #define AML_RESOURCE_GPIO_TYPE_IO 1 | ||
321 | #define AML_RESOURCE_MAX_GPIOTYPE 1 | ||
322 | |||
323 | /* Common preamble for all serial descriptors (ACPI 5.0) */ | ||
324 | |||
325 | #define AML_RESOURCE_SERIAL_COMMON \ | ||
326 | u8 revision_id; \ | ||
327 | u8 res_source_index; \ | ||
328 | u8 type; \ | ||
329 | u8 flags; \ | ||
330 | u16 type_specific_flags; \ | ||
331 | u8 type_revision_id; \ | ||
332 | u16 type_data_length; \ | ||
333 | |||
334 | /* Values for the type field above */ | ||
335 | |||
336 | #define AML_RESOURCE_I2C_SERIALBUSTYPE 1 | ||
337 | #define AML_RESOURCE_SPI_SERIALBUSTYPE 2 | ||
338 | #define AML_RESOURCE_UART_SERIALBUSTYPE 3 | ||
339 | #define AML_RESOURCE_MAX_SERIALBUSTYPE 3 | ||
340 | #define AML_RESOURCE_VENDOR_SERIALBUSTYPE 192 /* Vendor defined is 0xC0-0xFF (NOT SUPPORTED) */ | ||
341 | |||
342 | struct aml_resource_common_serialbus { | ||
343 | AML_RESOURCE_LARGE_HEADER_COMMON AML_RESOURCE_SERIAL_COMMON}; | ||
344 | |||
345 | struct aml_resource_i2c_serialbus { | ||
346 | AML_RESOURCE_LARGE_HEADER_COMMON | ||
347 | AML_RESOURCE_SERIAL_COMMON u32 connection_speed; | ||
348 | u16 slave_address; | ||
349 | /* | ||
350 | * Optional fields follow immediately: | ||
351 | * 1) Vendor Data bytes | ||
352 | * 2) Resource Source String | ||
353 | */ | ||
354 | }; | ||
355 | |||
356 | #define AML_RESOURCE_I2C_REVISION 1 /* ACPI 5.0 */ | ||
357 | #define AML_RESOURCE_I2C_TYPE_REVISION 1 /* ACPI 5.0 */ | ||
358 | #define AML_RESOURCE_I2C_MIN_DATA_LEN 6 | ||
359 | |||
360 | struct aml_resource_spi_serialbus { | ||
361 | AML_RESOURCE_LARGE_HEADER_COMMON | ||
362 | AML_RESOURCE_SERIAL_COMMON u32 connection_speed; | ||
363 | u8 data_bit_length; | ||
364 | u8 clock_phase; | ||
365 | u8 clock_polarity; | ||
366 | u16 device_selection; | ||
367 | /* | ||
368 | * Optional fields follow immediately: | ||
369 | * 1) Vendor Data bytes | ||
370 | * 2) Resource Source String | ||
371 | */ | ||
372 | }; | ||
373 | |||
374 | #define AML_RESOURCE_SPI_REVISION 1 /* ACPI 5.0 */ | ||
375 | #define AML_RESOURCE_SPI_TYPE_REVISION 1 /* ACPI 5.0 */ | ||
376 | #define AML_RESOURCE_SPI_MIN_DATA_LEN 9 | ||
377 | |||
378 | struct aml_resource_uart_serialbus { | ||
379 | AML_RESOURCE_LARGE_HEADER_COMMON | ||
380 | AML_RESOURCE_SERIAL_COMMON u32 default_baud_rate; | ||
381 | u16 rx_fifo_size; | ||
382 | u16 tx_fifo_size; | ||
383 | u8 parity; | ||
384 | u8 lines_enabled; | ||
385 | /* | ||
386 | * Optional fields follow immediately: | ||
387 | * 1) Vendor Data bytes | ||
388 | * 2) Resource Source String | ||
389 | */ | ||
390 | }; | ||
391 | |||
392 | #define AML_RESOURCE_UART_REVISION 1 /* ACPI 5.0 */ | ||
393 | #define AML_RESOURCE_UART_TYPE_REVISION 1 /* ACPI 5.0 */ | ||
394 | #define AML_RESOURCE_UART_MIN_DATA_LEN 10 | ||
395 | |||
266 | /* restore default alignment */ | 396 | /* restore default alignment */ |
267 | 397 | ||
268 | #pragma pack() | 398 | #pragma pack() |
@@ -284,6 +414,7 @@ union aml_resource { | |||
284 | struct aml_resource_end_dependent end_dpf; | 414 | struct aml_resource_end_dependent end_dpf; |
285 | struct aml_resource_io io; | 415 | struct aml_resource_io io; |
286 | struct aml_resource_fixed_io fixed_io; | 416 | struct aml_resource_fixed_io fixed_io; |
417 | struct aml_resource_fixed_dma fixed_dma; | ||
287 | struct aml_resource_vendor_small vendor_small; | 418 | struct aml_resource_vendor_small vendor_small; |
288 | struct aml_resource_end_tag end_tag; | 419 | struct aml_resource_end_tag end_tag; |
289 | 420 | ||
@@ -299,6 +430,11 @@ union aml_resource { | |||
299 | struct aml_resource_address64 address64; | 430 | struct aml_resource_address64 address64; |
300 | struct aml_resource_extended_address64 ext_address64; | 431 | struct aml_resource_extended_address64 ext_address64; |
301 | struct aml_resource_extended_irq extended_irq; | 432 | struct aml_resource_extended_irq extended_irq; |
433 | struct aml_resource_gpio gpio; | ||
434 | struct aml_resource_i2c_serialbus i2c_serial_bus; | ||
435 | struct aml_resource_spi_serialbus spi_serial_bus; | ||
436 | struct aml_resource_uart_serialbus uart_serial_bus; | ||
437 | struct aml_resource_common_serialbus common_serial_bus; | ||
302 | 438 | ||
303 | /* Utility overlays */ | 439 | /* Utility overlays */ |
304 | 440 | ||