Merge branch 'r6040-next'
[linux/fpc-iii.git] / drivers / acpi / acpica / rsdumpinfo.c
blob61e8f16c857d66413e7dfc5fc52255fb482434fc
1 /*******************************************************************************
3 * Module Name: rsdumpinfo - Tables used to display resource descriptors.
5 ******************************************************************************/
7 /*
8 * Copyright (C) 2000 - 2016, Intel Corp.
9 * All rights reserved.
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions, and the following disclaimer,
16 * without modification.
17 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 * substantially similar to the "NO WARRANTY" disclaimer below
19 * ("Disclaimer") and any redistribution must be conditioned upon
20 * including a substantially similar Disclaimer requirement for further
21 * binary redistribution.
22 * 3. Neither the names of the above-listed copyright holders nor the names
23 * of any contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
26 * Alternatively, this software may be distributed under the terms of the
27 * GNU General Public License ("GPL") version 2 as published by the Free
28 * Software Foundation.
30 * NO WARRANTY
31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 * POSSIBILITY OF SUCH DAMAGES.
44 #include <acpi/acpi.h>
45 #include "accommon.h"
46 #include "acresrc.h"
48 #define _COMPONENT ACPI_RESOURCES
49 ACPI_MODULE_NAME("rsdumpinfo")
51 #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DISASSEMBLER) || defined(ACPI_DEBUGGER)
52 #define ACPI_RSD_OFFSET(f) (u8) ACPI_OFFSET (union acpi_resource_data,f)
53 #define ACPI_PRT_OFFSET(f) (u8) ACPI_OFFSET (struct acpi_pci_routing_table,f)
54 #define ACPI_RSD_TABLE_SIZE(name) (sizeof(name) / sizeof (struct acpi_rsdump_info))
55 /*******************************************************************************
57 * Resource Descriptor info tables
59 * Note: The first table entry must be a Title or Literal and must contain
60 * the table length (number of table entries)
62 ******************************************************************************/
63 struct acpi_rsdump_info acpi_rs_dump_irq[7] = {
64 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_irq), "IRQ", NULL},
65 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(irq.descriptor_length),
66 "Descriptor Length", NULL},
67 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(irq.triggering), "Triggering",
68 acpi_gbl_he_decode},
69 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(irq.polarity), "Polarity",
70 acpi_gbl_ll_decode},
71 {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(irq.sharable), "Sharing",
72 acpi_gbl_shr_decode},
73 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(irq.interrupt_count),
74 "Interrupt Count", NULL},
75 {ACPI_RSD_SHORTLIST, ACPI_RSD_OFFSET(irq.interrupts[0]),
76 "Interrupt List", NULL}
79 struct acpi_rsdump_info acpi_rs_dump_dma[6] = {
80 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_dma), "DMA", NULL},
81 {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(dma.type), "Speed",
82 acpi_gbl_typ_decode},
83 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(dma.bus_master), "Mastering",
84 acpi_gbl_bm_decode},
85 {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(dma.transfer), "Transfer Type",
86 acpi_gbl_siz_decode},
87 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(dma.channel_count), "Channel Count",
88 NULL},
89 {ACPI_RSD_SHORTLIST, ACPI_RSD_OFFSET(dma.channels[0]), "Channel List",
90 NULL}
93 struct acpi_rsdump_info acpi_rs_dump_start_dpf[4] = {
94 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_start_dpf),
95 "Start-Dependent-Functions", NULL},
96 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(start_dpf.descriptor_length),
97 "Descriptor Length", NULL},
98 {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(start_dpf.compatibility_priority),
99 "Compatibility Priority", acpi_gbl_config_decode},
100 {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(start_dpf.performance_robustness),
101 "Performance/Robustness", acpi_gbl_config_decode}
104 struct acpi_rsdump_info acpi_rs_dump_end_dpf[1] = {
105 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_end_dpf),
106 "End-Dependent-Functions", NULL}
109 struct acpi_rsdump_info acpi_rs_dump_io[6] = {
110 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_io), "I/O", NULL},
111 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(io.io_decode), "Address Decoding",
112 acpi_gbl_io_decode},
113 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(io.minimum), "Address Minimum", NULL},
114 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(io.maximum), "Address Maximum", NULL},
115 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(io.alignment), "Alignment", NULL},
116 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(io.address_length), "Address Length",
117 NULL}
120 struct acpi_rsdump_info acpi_rs_dump_fixed_io[3] = {
121 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_fixed_io),
122 "Fixed I/O", NULL},
123 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(fixed_io.address), "Address", NULL},
124 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(fixed_io.address_length),
125 "Address Length", NULL}
128 struct acpi_rsdump_info acpi_rs_dump_vendor[3] = {
129 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_vendor),
130 "Vendor Specific", NULL},
131 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(vendor.byte_length), "Length", NULL},
132 {ACPI_RSD_LONGLIST, ACPI_RSD_OFFSET(vendor.byte_data[0]), "Vendor Data",
133 NULL}
136 struct acpi_rsdump_info acpi_rs_dump_end_tag[1] = {
137 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_end_tag), "EndTag",
138 NULL}
141 struct acpi_rsdump_info acpi_rs_dump_memory24[6] = {
142 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_memory24),
143 "24-Bit Memory Range", NULL},
144 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(memory24.write_protect),
145 "Write Protect", acpi_gbl_rw_decode},
146 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(memory24.minimum), "Address Minimum",
147 NULL},
148 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(memory24.maximum), "Address Maximum",
149 NULL},
150 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(memory24.alignment), "Alignment",
151 NULL},
152 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(memory24.address_length),
153 "Address Length", NULL}
156 struct acpi_rsdump_info acpi_rs_dump_memory32[6] = {
157 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_memory32),
158 "32-Bit Memory Range", NULL},
159 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(memory32.write_protect),
160 "Write Protect", acpi_gbl_rw_decode},
161 {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(memory32.minimum), "Address Minimum",
162 NULL},
163 {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(memory32.maximum), "Address Maximum",
164 NULL},
165 {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(memory32.alignment), "Alignment",
166 NULL},
167 {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(memory32.address_length),
168 "Address Length", NULL}
171 struct acpi_rsdump_info acpi_rs_dump_fixed_memory32[4] = {
172 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_fixed_memory32),
173 "32-Bit Fixed Memory Range", NULL},
174 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(fixed_memory32.write_protect),
175 "Write Protect", acpi_gbl_rw_decode},
176 {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(fixed_memory32.address), "Address",
177 NULL},
178 {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(fixed_memory32.address_length),
179 "Address Length", NULL}
182 struct acpi_rsdump_info acpi_rs_dump_address16[8] = {
183 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_address16),
184 "16-Bit WORD Address Space", NULL},
185 {ACPI_RSD_ADDRESS, 0, NULL, NULL},
186 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(address16.address.granularity),
187 "Granularity", NULL},
188 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(address16.address.minimum),
189 "Address Minimum", NULL},
190 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(address16.address.maximum),
191 "Address Maximum", NULL},
192 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(address16.address.translation_offset),
193 "Translation Offset", NULL},
194 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(address16.address.address_length),
195 "Address Length", NULL},
196 {ACPI_RSD_SOURCE, ACPI_RSD_OFFSET(address16.resource_source), NULL, NULL}
199 struct acpi_rsdump_info acpi_rs_dump_address32[8] = {
200 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_address32),
201 "32-Bit DWORD Address Space", NULL},
202 {ACPI_RSD_ADDRESS, 0, NULL, NULL},
203 {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(address32.address.granularity),
204 "Granularity", NULL},
205 {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(address32.address.minimum),
206 "Address Minimum", NULL},
207 {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(address32.address.maximum),
208 "Address Maximum", NULL},
209 {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(address32.address.translation_offset),
210 "Translation Offset", NULL},
211 {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(address32.address.address_length),
212 "Address Length", NULL},
213 {ACPI_RSD_SOURCE, ACPI_RSD_OFFSET(address32.resource_source), NULL, NULL}
216 struct acpi_rsdump_info acpi_rs_dump_address64[8] = {
217 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_address64),
218 "64-Bit QWORD Address Space", NULL},
219 {ACPI_RSD_ADDRESS, 0, NULL, NULL},
220 {ACPI_RSD_UINT64, ACPI_RSD_OFFSET(address64.address.granularity),
221 "Granularity", NULL},
222 {ACPI_RSD_UINT64, ACPI_RSD_OFFSET(address64.address.minimum),
223 "Address Minimum", NULL},
224 {ACPI_RSD_UINT64, ACPI_RSD_OFFSET(address64.address.maximum),
225 "Address Maximum", NULL},
226 {ACPI_RSD_UINT64, ACPI_RSD_OFFSET(address64.address.translation_offset),
227 "Translation Offset", NULL},
228 {ACPI_RSD_UINT64, ACPI_RSD_OFFSET(address64.address.address_length),
229 "Address Length", NULL},
230 {ACPI_RSD_SOURCE, ACPI_RSD_OFFSET(address64.resource_source), NULL, NULL}
233 struct acpi_rsdump_info acpi_rs_dump_ext_address64[8] = {
234 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_ext_address64),
235 "64-Bit Extended Address Space", NULL},
236 {ACPI_RSD_ADDRESS, 0, NULL, NULL},
237 {ACPI_RSD_UINT64, ACPI_RSD_OFFSET(ext_address64.address.granularity),
238 "Granularity", NULL},
239 {ACPI_RSD_UINT64, ACPI_RSD_OFFSET(ext_address64.address.minimum),
240 "Address Minimum", NULL},
241 {ACPI_RSD_UINT64, ACPI_RSD_OFFSET(ext_address64.address.maximum),
242 "Address Maximum", NULL},
243 {ACPI_RSD_UINT64,
244 ACPI_RSD_OFFSET(ext_address64.address.translation_offset),
245 "Translation Offset", NULL},
246 {ACPI_RSD_UINT64, ACPI_RSD_OFFSET(ext_address64.address.address_length),
247 "Address Length", NULL},
248 {ACPI_RSD_UINT64, ACPI_RSD_OFFSET(ext_address64.type_specific),
249 "Type-Specific Attribute", NULL}
252 struct acpi_rsdump_info acpi_rs_dump_ext_irq[8] = {
253 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_ext_irq),
254 "Extended IRQ", NULL},
255 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(extended_irq.producer_consumer),
256 "Type", acpi_gbl_consume_decode},
257 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(extended_irq.triggering),
258 "Triggering", acpi_gbl_he_decode},
259 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(extended_irq.polarity), "Polarity",
260 acpi_gbl_ll_decode},
261 {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(extended_irq.sharable), "Sharing",
262 acpi_gbl_shr_decode},
263 {ACPI_RSD_SOURCE, ACPI_RSD_OFFSET(extended_irq.resource_source), NULL,
264 NULL},
265 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(extended_irq.interrupt_count),
266 "Interrupt Count", NULL},
267 {ACPI_RSD_DWORDLIST, ACPI_RSD_OFFSET(extended_irq.interrupts[0]),
268 "Interrupt List", NULL}
271 struct acpi_rsdump_info acpi_rs_dump_generic_reg[6] = {
272 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_generic_reg),
273 "Generic Register", NULL},
274 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(generic_reg.space_id), "Space ID",
275 NULL},
276 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(generic_reg.bit_width), "Bit Width",
277 NULL},
278 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(generic_reg.bit_offset), "Bit Offset",
279 NULL},
280 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(generic_reg.access_size),
281 "Access Size", NULL},
282 {ACPI_RSD_UINT64, ACPI_RSD_OFFSET(generic_reg.address), "Address", NULL}
285 struct acpi_rsdump_info acpi_rs_dump_gpio[16] = {
286 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_gpio), "GPIO", NULL},
287 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(gpio.revision_id), "RevisionId", NULL},
288 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(gpio.connection_type),
289 "ConnectionType", acpi_gbl_ct_decode},
290 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(gpio.producer_consumer),
291 "ProducerConsumer", acpi_gbl_consume_decode},
292 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(gpio.pin_config), "PinConfig",
293 acpi_gbl_ppc_decode},
294 {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(gpio.sharable), "Sharing",
295 acpi_gbl_shr_decode},
296 {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(gpio.io_restriction),
297 "IoRestriction", acpi_gbl_ior_decode},
298 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(gpio.triggering), "Triggering",
299 acpi_gbl_he_decode},
300 {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(gpio.polarity), "Polarity",
301 acpi_gbl_ll_decode},
302 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(gpio.drive_strength), "DriveStrength",
303 NULL},
304 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(gpio.debounce_timeout),
305 "DebounceTimeout", NULL},
306 {ACPI_RSD_SOURCE, ACPI_RSD_OFFSET(gpio.resource_source),
307 "ResourceSource", NULL},
308 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(gpio.pin_table_length),
309 "PinTableLength", NULL},
310 {ACPI_RSD_WORDLIST, ACPI_RSD_OFFSET(gpio.pin_table), "PinTable", NULL},
311 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(gpio.vendor_length), "VendorLength",
312 NULL},
313 {ACPI_RSD_SHORTLISTX, ACPI_RSD_OFFSET(gpio.vendor_data), "VendorData",
314 NULL},
317 struct acpi_rsdump_info acpi_rs_dump_fixed_dma[4] = {
318 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_fixed_dma),
319 "FixedDma", NULL},
320 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(fixed_dma.request_lines),
321 "RequestLines", NULL},
322 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(fixed_dma.channels), "Channels",
323 NULL},
324 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(fixed_dma.width), "TransferWidth",
325 acpi_gbl_dts_decode},
328 #define ACPI_RS_DUMP_COMMON_SERIAL_BUS \
329 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET (common_serial_bus.revision_id), "RevisionId", NULL}, \
330 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET (common_serial_bus.type), "Type", acpi_gbl_sbt_decode}, \
331 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (common_serial_bus.producer_consumer), "ProducerConsumer", acpi_gbl_consume_decode}, \
332 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (common_serial_bus.slave_mode), "SlaveMode", acpi_gbl_sm_decode}, \
333 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (common_serial_bus.connection_sharing),"ConnectionSharing", acpi_gbl_shr_decode}, \
334 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET (common_serial_bus.type_revision_id), "TypeRevisionId", NULL}, \
335 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET (common_serial_bus.type_data_length), "TypeDataLength", NULL}, \
336 {ACPI_RSD_SOURCE, ACPI_RSD_OFFSET (common_serial_bus.resource_source), "ResourceSource", NULL}, \
337 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET (common_serial_bus.vendor_length), "VendorLength", NULL}, \
338 {ACPI_RSD_SHORTLISTX,ACPI_RSD_OFFSET (common_serial_bus.vendor_data), "VendorData", NULL},
340 struct acpi_rsdump_info acpi_rs_dump_common_serial_bus[11] = {
341 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_common_serial_bus),
342 "Common Serial Bus", NULL},
343 ACPI_RS_DUMP_COMMON_SERIAL_BUS
346 struct acpi_rsdump_info acpi_rs_dump_i2c_serial_bus[14] = {
347 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_i2c_serial_bus),
348 "I2C Serial Bus", NULL},
349 ACPI_RS_DUMP_COMMON_SERIAL_BUS {ACPI_RSD_1BITFLAG,
350 ACPI_RSD_OFFSET(i2c_serial_bus.
351 access_mode),
352 "AccessMode", acpi_gbl_am_decode},
353 {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(i2c_serial_bus.connection_speed),
354 "ConnectionSpeed", NULL},
355 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(i2c_serial_bus.slave_address),
356 "SlaveAddress", NULL},
359 struct acpi_rsdump_info acpi_rs_dump_spi_serial_bus[18] = {
360 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_spi_serial_bus),
361 "Spi Serial Bus", NULL},
362 ACPI_RS_DUMP_COMMON_SERIAL_BUS {ACPI_RSD_1BITFLAG,
363 ACPI_RSD_OFFSET(spi_serial_bus.
364 wire_mode), "WireMode",
365 acpi_gbl_wm_decode},
366 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(spi_serial_bus.device_polarity),
367 "DevicePolarity", acpi_gbl_dp_decode},
368 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(spi_serial_bus.data_bit_length),
369 "DataBitLength", NULL},
370 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(spi_serial_bus.clock_phase),
371 "ClockPhase", acpi_gbl_cph_decode},
372 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(spi_serial_bus.clock_polarity),
373 "ClockPolarity", acpi_gbl_cpo_decode},
374 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(spi_serial_bus.device_selection),
375 "DeviceSelection", NULL},
376 {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(spi_serial_bus.connection_speed),
377 "ConnectionSpeed", NULL},
380 struct acpi_rsdump_info acpi_rs_dump_uart_serial_bus[20] = {
381 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_uart_serial_bus),
382 "Uart Serial Bus", NULL},
383 ACPI_RS_DUMP_COMMON_SERIAL_BUS {ACPI_RSD_2BITFLAG,
384 ACPI_RSD_OFFSET(uart_serial_bus.
385 flow_control),
386 "FlowControl", acpi_gbl_fc_decode},
387 {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(uart_serial_bus.stop_bits),
388 "StopBits", acpi_gbl_sb_decode},
389 {ACPI_RSD_3BITFLAG, ACPI_RSD_OFFSET(uart_serial_bus.data_bits),
390 "DataBits", acpi_gbl_bpb_decode},
391 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(uart_serial_bus.endian), "Endian",
392 acpi_gbl_ed_decode},
393 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(uart_serial_bus.parity), "Parity",
394 acpi_gbl_pt_decode},
395 {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(uart_serial_bus.lines_enabled),
396 "LinesEnabled", NULL},
397 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(uart_serial_bus.rx_fifo_size),
398 "RxFifoSize", NULL},
399 {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(uart_serial_bus.tx_fifo_size),
400 "TxFifoSize", NULL},
401 {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(uart_serial_bus.default_baud_rate),
402 "ConnectionSpeed", NULL},
406 * Tables used for common address descriptor flag fields
408 struct acpi_rsdump_info acpi_rs_dump_general_flags[5] = {
409 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_general_flags), NULL,
410 NULL},
411 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.producer_consumer),
412 "Consumer/Producer", acpi_gbl_consume_decode},
413 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.decode), "Address Decode",
414 acpi_gbl_dec_decode},
415 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.min_address_fixed),
416 "Min Relocatability", acpi_gbl_min_decode},
417 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.max_address_fixed),
418 "Max Relocatability", acpi_gbl_max_decode}
421 struct acpi_rsdump_info acpi_rs_dump_memory_flags[5] = {
422 {ACPI_RSD_LITERAL, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_memory_flags),
423 "Resource Type", (void *)"Memory Range"},
424 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.info.mem.write_protect),
425 "Write Protect", acpi_gbl_rw_decode},
426 {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(address.info.mem.caching),
427 "Caching", acpi_gbl_mem_decode},
428 {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(address.info.mem.range_type),
429 "Range Type", acpi_gbl_mtp_decode},
430 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.info.mem.translation),
431 "Translation", acpi_gbl_ttp_decode}
434 struct acpi_rsdump_info acpi_rs_dump_io_flags[4] = {
435 {ACPI_RSD_LITERAL, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_io_flags),
436 "Resource Type", (void *)"I/O Range"},
437 {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(address.info.io.range_type),
438 "Range Type", acpi_gbl_rng_decode},
439 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.info.io.translation),
440 "Translation", acpi_gbl_ttp_decode},
441 {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.info.io.translation_type),
442 "Translation Type", acpi_gbl_trs_decode}
446 * Table used to dump _PRT contents
448 struct acpi_rsdump_info acpi_rs_dump_prt[5] = {
449 {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_prt), NULL, NULL},
450 {ACPI_RSD_UINT64, ACPI_PRT_OFFSET(address), "Address", NULL},
451 {ACPI_RSD_UINT32, ACPI_PRT_OFFSET(pin), "Pin", NULL},
452 {ACPI_RSD_STRING, ACPI_PRT_OFFSET(source[0]), "Source", NULL},
453 {ACPI_RSD_UINT32, ACPI_PRT_OFFSET(source_index), "Source Index", NULL}
456 #endif