diff options
author | Bob Moore <robert.moore@intel.com> | 2013-01-11 07:08:51 -0500 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-01-11 07:08:51 -0500 |
commit | 42f8fb75c43cc67f06424f991009b3af674f93eb (patch) | |
tree | 01821d5eca5f97d474bee62e7f92fe481adb31b8 /drivers/acpi/acpica/rsdump.c | |
parent | 4f8429166818dd615891990040ce13373893ee9a (diff) |
ACPICA: Source restructuring: split large files into 8 new files.
Created logical splits for eight new files. Improves modularity
and configurability.
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/rsdump.c')
-rw-r--r-- | drivers/acpi/acpica/rsdump.c | 409 |
1 files changed, 3 insertions, 406 deletions
diff --git a/drivers/acpi/acpica/rsdump.c b/drivers/acpi/acpica/rsdump.c index 203b4aea53cd..6e8f9bd08fc1 100644 --- a/drivers/acpi/acpica/rsdump.c +++ b/drivers/acpi/acpica/rsdump.c | |||
@@ -77,419 +77,16 @@ static void acpi_rs_dump_address_common(union acpi_resource_data *resource); | |||
77 | static void | 77 | static void |
78 | acpi_rs_dump_descriptor(void *resource, struct acpi_rsdump_info *table); | 78 | acpi_rs_dump_descriptor(void *resource, struct acpi_rsdump_info *table); |
79 | 79 | ||
80 | #define ACPI_RSD_OFFSET(f) (u8) ACPI_OFFSET (union acpi_resource_data,f) | ||
81 | #define ACPI_PRT_OFFSET(f) (u8) ACPI_OFFSET (struct acpi_pci_routing_table,f) | ||
82 | #define ACPI_RSD_TABLE_SIZE(name) (sizeof(name) / sizeof (struct acpi_rsdump_info)) | ||
83 | |||
84 | /******************************************************************************* | ||
85 | * | ||
86 | * Resource Descriptor info tables | ||
87 | * | ||
88 | * Note: The first table entry must be a Title or Literal and must contain | ||
89 | * the table length (number of table entries) | ||
90 | * | ||
91 | ******************************************************************************/ | ||
92 | |||
93 | struct acpi_rsdump_info acpi_rs_dump_irq[7] = { | ||
94 | {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_irq), "IRQ", NULL}, | ||
95 | {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(irq.descriptor_length), | ||
96 | "Descriptor Length", NULL}, | ||
97 | {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(irq.triggering), "Triggering", | ||
98 | acpi_gbl_he_decode}, | ||
99 | {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(irq.polarity), "Polarity", | ||
100 | acpi_gbl_ll_decode}, | ||
101 | {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(irq.sharable), "Sharing", | ||
102 | acpi_gbl_shr_decode}, | ||
103 | {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(irq.interrupt_count), | ||
104 | "Interrupt Count", NULL}, | ||
105 | {ACPI_RSD_SHORTLIST, ACPI_RSD_OFFSET(irq.interrupts[0]), | ||
106 | "Interrupt List", NULL} | ||
107 | }; | ||
108 | |||
109 | struct acpi_rsdump_info acpi_rs_dump_dma[6] = { | ||
110 | {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_dma), "DMA", NULL}, | ||
111 | {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(dma.type), "Speed", | ||
112 | acpi_gbl_typ_decode}, | ||
113 | {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(dma.bus_master), "Mastering", | ||
114 | acpi_gbl_bm_decode}, | ||
115 | {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(dma.transfer), "Transfer Type", | ||
116 | acpi_gbl_siz_decode}, | ||
117 | {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(dma.channel_count), "Channel Count", | ||
118 | NULL}, | ||
119 | {ACPI_RSD_SHORTLIST, ACPI_RSD_OFFSET(dma.channels[0]), "Channel List", | ||
120 | NULL} | ||
121 | }; | ||
122 | |||
123 | struct acpi_rsdump_info acpi_rs_dump_start_dpf[4] = { | ||
124 | {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_start_dpf), | ||
125 | "Start-Dependent-Functions", NULL}, | ||
126 | {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(start_dpf.descriptor_length), | ||
127 | "Descriptor Length", NULL}, | ||
128 | {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(start_dpf.compatibility_priority), | ||
129 | "Compatibility Priority", acpi_gbl_config_decode}, | ||
130 | {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(start_dpf.performance_robustness), | ||
131 | "Performance/Robustness", acpi_gbl_config_decode} | ||
132 | }; | ||
133 | |||
134 | struct acpi_rsdump_info acpi_rs_dump_end_dpf[1] = { | ||
135 | {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_end_dpf), | ||
136 | "End-Dependent-Functions", NULL} | ||
137 | }; | ||
138 | |||
139 | struct acpi_rsdump_info acpi_rs_dump_io[6] = { | ||
140 | {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_io), "I/O", NULL}, | ||
141 | {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(io.io_decode), "Address Decoding", | ||
142 | acpi_gbl_io_decode}, | ||
143 | {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(io.minimum), "Address Minimum", NULL}, | ||
144 | {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(io.maximum), "Address Maximum", NULL}, | ||
145 | {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(io.alignment), "Alignment", NULL}, | ||
146 | {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(io.address_length), "Address Length", | ||
147 | NULL} | ||
148 | }; | ||
149 | |||
150 | struct acpi_rsdump_info acpi_rs_dump_fixed_io[3] = { | ||
151 | {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_fixed_io), | ||
152 | "Fixed I/O", NULL}, | ||
153 | {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(fixed_io.address), "Address", NULL}, | ||
154 | {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(fixed_io.address_length), | ||
155 | "Address Length", NULL} | ||
156 | }; | ||
157 | |||
158 | struct acpi_rsdump_info acpi_rs_dump_vendor[3] = { | ||
159 | {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_vendor), | ||
160 | "Vendor Specific", NULL}, | ||
161 | {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(vendor.byte_length), "Length", NULL}, | ||
162 | {ACPI_RSD_LONGLIST, ACPI_RSD_OFFSET(vendor.byte_data[0]), "Vendor Data", | ||
163 | NULL} | ||
164 | }; | ||
165 | |||
166 | struct acpi_rsdump_info acpi_rs_dump_end_tag[1] = { | ||
167 | {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_end_tag), "EndTag", | ||
168 | NULL} | ||
169 | }; | ||
170 | |||
171 | struct acpi_rsdump_info acpi_rs_dump_memory24[6] = { | ||
172 | {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_memory24), | ||
173 | "24-Bit Memory Range", NULL}, | ||
174 | {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(memory24.write_protect), | ||
175 | "Write Protect", acpi_gbl_rw_decode}, | ||
176 | {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(memory24.minimum), "Address Minimum", | ||
177 | NULL}, | ||
178 | {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(memory24.maximum), "Address Maximum", | ||
179 | NULL}, | ||
180 | {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(memory24.alignment), "Alignment", | ||
181 | NULL}, | ||
182 | {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(memory24.address_length), | ||
183 | "Address Length", NULL} | ||
184 | }; | ||
185 | |||
186 | struct acpi_rsdump_info acpi_rs_dump_memory32[6] = { | ||
187 | {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_memory32), | ||
188 | "32-Bit Memory Range", NULL}, | ||
189 | {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(memory32.write_protect), | ||
190 | "Write Protect", acpi_gbl_rw_decode}, | ||
191 | {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(memory32.minimum), "Address Minimum", | ||
192 | NULL}, | ||
193 | {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(memory32.maximum), "Address Maximum", | ||
194 | NULL}, | ||
195 | {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(memory32.alignment), "Alignment", | ||
196 | NULL}, | ||
197 | {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(memory32.address_length), | ||
198 | "Address Length", NULL} | ||
199 | }; | ||
200 | |||
201 | struct acpi_rsdump_info acpi_rs_dump_fixed_memory32[4] = { | ||
202 | {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_fixed_memory32), | ||
203 | "32-Bit Fixed Memory Range", NULL}, | ||
204 | {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(fixed_memory32.write_protect), | ||
205 | "Write Protect", acpi_gbl_rw_decode}, | ||
206 | {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(fixed_memory32.address), "Address", | ||
207 | NULL}, | ||
208 | {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(fixed_memory32.address_length), | ||
209 | "Address Length", NULL} | ||
210 | }; | ||
211 | |||
212 | struct acpi_rsdump_info acpi_rs_dump_address16[8] = { | ||
213 | {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_address16), | ||
214 | "16-Bit WORD Address Space", NULL}, | ||
215 | {ACPI_RSD_ADDRESS, 0, NULL, NULL}, | ||
216 | {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(address16.granularity), "Granularity", | ||
217 | NULL}, | ||
218 | {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(address16.minimum), "Address Minimum", | ||
219 | NULL}, | ||
220 | {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(address16.maximum), "Address Maximum", | ||
221 | NULL}, | ||
222 | {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(address16.translation_offset), | ||
223 | "Translation Offset", NULL}, | ||
224 | {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(address16.address_length), | ||
225 | "Address Length", NULL}, | ||
226 | {ACPI_RSD_SOURCE, ACPI_RSD_OFFSET(address16.resource_source), NULL, NULL} | ||
227 | }; | ||
228 | |||
229 | struct acpi_rsdump_info acpi_rs_dump_address32[8] = { | ||
230 | {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_address32), | ||
231 | "32-Bit DWORD Address Space", NULL}, | ||
232 | {ACPI_RSD_ADDRESS, 0, NULL, NULL}, | ||
233 | {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(address32.granularity), "Granularity", | ||
234 | NULL}, | ||
235 | {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(address32.minimum), "Address Minimum", | ||
236 | NULL}, | ||
237 | {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(address32.maximum), "Address Maximum", | ||
238 | NULL}, | ||
239 | {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(address32.translation_offset), | ||
240 | "Translation Offset", NULL}, | ||
241 | {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(address32.address_length), | ||
242 | "Address Length", NULL}, | ||
243 | {ACPI_RSD_SOURCE, ACPI_RSD_OFFSET(address32.resource_source), NULL, NULL} | ||
244 | }; | ||
245 | |||
246 | struct acpi_rsdump_info acpi_rs_dump_address64[8] = { | ||
247 | {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_address64), | ||
248 | "64-Bit QWORD Address Space", NULL}, | ||
249 | {ACPI_RSD_ADDRESS, 0, NULL, NULL}, | ||
250 | {ACPI_RSD_UINT64, ACPI_RSD_OFFSET(address64.granularity), "Granularity", | ||
251 | NULL}, | ||
252 | {ACPI_RSD_UINT64, ACPI_RSD_OFFSET(address64.minimum), "Address Minimum", | ||
253 | NULL}, | ||
254 | {ACPI_RSD_UINT64, ACPI_RSD_OFFSET(address64.maximum), "Address Maximum", | ||
255 | NULL}, | ||
256 | {ACPI_RSD_UINT64, ACPI_RSD_OFFSET(address64.translation_offset), | ||
257 | "Translation Offset", NULL}, | ||
258 | {ACPI_RSD_UINT64, ACPI_RSD_OFFSET(address64.address_length), | ||
259 | "Address Length", NULL}, | ||
260 | {ACPI_RSD_SOURCE, ACPI_RSD_OFFSET(address64.resource_source), NULL, NULL} | ||
261 | }; | ||
262 | |||
263 | struct acpi_rsdump_info acpi_rs_dump_ext_address64[8] = { | ||
264 | {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_ext_address64), | ||
265 | "64-Bit Extended Address Space", NULL}, | ||
266 | {ACPI_RSD_ADDRESS, 0, NULL, NULL}, | ||
267 | {ACPI_RSD_UINT64, ACPI_RSD_OFFSET(ext_address64.granularity), | ||
268 | "Granularity", NULL}, | ||
269 | {ACPI_RSD_UINT64, ACPI_RSD_OFFSET(ext_address64.minimum), | ||
270 | "Address Minimum", NULL}, | ||
271 | {ACPI_RSD_UINT64, ACPI_RSD_OFFSET(ext_address64.maximum), | ||
272 | "Address Maximum", NULL}, | ||
273 | {ACPI_RSD_UINT64, ACPI_RSD_OFFSET(ext_address64.translation_offset), | ||
274 | "Translation Offset", NULL}, | ||
275 | {ACPI_RSD_UINT64, ACPI_RSD_OFFSET(ext_address64.address_length), | ||
276 | "Address Length", NULL}, | ||
277 | {ACPI_RSD_UINT64, ACPI_RSD_OFFSET(ext_address64.type_specific), | ||
278 | "Type-Specific Attribute", NULL} | ||
279 | }; | ||
280 | |||
281 | struct acpi_rsdump_info acpi_rs_dump_ext_irq[8] = { | ||
282 | {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_ext_irq), | ||
283 | "Extended IRQ", NULL}, | ||
284 | {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(extended_irq.producer_consumer), | ||
285 | "Type", acpi_gbl_consume_decode}, | ||
286 | {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(extended_irq.triggering), | ||
287 | "Triggering", acpi_gbl_he_decode}, | ||
288 | {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(extended_irq.polarity), "Polarity", | ||
289 | acpi_gbl_ll_decode}, | ||
290 | {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(extended_irq.sharable), "Sharing", | ||
291 | acpi_gbl_shr_decode}, | ||
292 | {ACPI_RSD_SOURCE, ACPI_RSD_OFFSET(extended_irq.resource_source), NULL, | ||
293 | NULL}, | ||
294 | {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(extended_irq.interrupt_count), | ||
295 | "Interrupt Count", NULL}, | ||
296 | {ACPI_RSD_DWORDLIST, ACPI_RSD_OFFSET(extended_irq.interrupts[0]), | ||
297 | "Interrupt List", NULL} | ||
298 | }; | ||
299 | |||
300 | struct acpi_rsdump_info acpi_rs_dump_generic_reg[6] = { | ||
301 | {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_generic_reg), | ||
302 | "Generic Register", NULL}, | ||
303 | {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(generic_reg.space_id), "Space ID", | ||
304 | NULL}, | ||
305 | {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(generic_reg.bit_width), "Bit Width", | ||
306 | NULL}, | ||
307 | {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(generic_reg.bit_offset), "Bit Offset", | ||
308 | NULL}, | ||
309 | {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(generic_reg.access_size), | ||
310 | "Access Size", NULL}, | ||
311 | {ACPI_RSD_UINT64, ACPI_RSD_OFFSET(generic_reg.address), "Address", NULL} | ||
312 | }; | ||
313 | |||
314 | struct acpi_rsdump_info acpi_rs_dump_gpio[16] = { | ||
315 | {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_gpio), "GPIO", NULL}, | ||
316 | {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(gpio.revision_id), "RevisionId", NULL}, | ||
317 | {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(gpio.connection_type), | ||
318 | "ConnectionType", acpi_gbl_ct_decode}, | ||
319 | {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(gpio.producer_consumer), | ||
320 | "ProducerConsumer", acpi_gbl_consume_decode}, | ||
321 | {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(gpio.pin_config), "PinConfig", | ||
322 | acpi_gbl_ppc_decode}, | ||
323 | {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(gpio.sharable), "Sharing", | ||
324 | acpi_gbl_shr_decode}, | ||
325 | {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(gpio.io_restriction), | ||
326 | "IoRestriction", acpi_gbl_ior_decode}, | ||
327 | {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(gpio.triggering), "Triggering", | ||
328 | acpi_gbl_he_decode}, | ||
329 | {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(gpio.polarity), "Polarity", | ||
330 | acpi_gbl_ll_decode}, | ||
331 | {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(gpio.drive_strength), "DriveStrength", | ||
332 | NULL}, | ||
333 | {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(gpio.debounce_timeout), | ||
334 | "DebounceTimeout", NULL}, | ||
335 | {ACPI_RSD_SOURCE, ACPI_RSD_OFFSET(gpio.resource_source), | ||
336 | "ResourceSource", NULL}, | ||
337 | {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(gpio.pin_table_length), | ||
338 | "PinTableLength", NULL}, | ||
339 | {ACPI_RSD_WORDLIST, ACPI_RSD_OFFSET(gpio.pin_table), "PinTable", NULL}, | ||
340 | {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(gpio.vendor_length), "VendorLength", | ||
341 | NULL}, | ||
342 | {ACPI_RSD_SHORTLISTX, ACPI_RSD_OFFSET(gpio.vendor_data), "VendorData", | ||
343 | NULL}, | ||
344 | }; | ||
345 | |||
346 | struct acpi_rsdump_info acpi_rs_dump_fixed_dma[4] = { | ||
347 | {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_fixed_dma), | ||
348 | "FixedDma", NULL}, | ||
349 | {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(fixed_dma.request_lines), | ||
350 | "RequestLines", NULL}, | ||
351 | {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(fixed_dma.channels), "Channels", | ||
352 | NULL}, | ||
353 | {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(fixed_dma.width), "TransferWidth", | ||
354 | acpi_gbl_dts_decode}, | ||
355 | }; | ||
356 | |||
357 | #define ACPI_RS_DUMP_COMMON_SERIAL_BUS \ | ||
358 | {ACPI_RSD_UINT8, ACPI_RSD_OFFSET (common_serial_bus.revision_id), "RevisionId", NULL}, \ | ||
359 | {ACPI_RSD_UINT8, ACPI_RSD_OFFSET (common_serial_bus.type), "Type", acpi_gbl_sbt_decode}, \ | ||
360 | {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (common_serial_bus.producer_consumer), "ProducerConsumer", acpi_gbl_consume_decode}, \ | ||
361 | {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (common_serial_bus.slave_mode), "SlaveMode", acpi_gbl_sm_decode}, \ | ||
362 | {ACPI_RSD_UINT8, ACPI_RSD_OFFSET (common_serial_bus.type_revision_id), "TypeRevisionId", NULL}, \ | ||
363 | {ACPI_RSD_UINT16, ACPI_RSD_OFFSET (common_serial_bus.type_data_length), "TypeDataLength", NULL}, \ | ||
364 | {ACPI_RSD_SOURCE, ACPI_RSD_OFFSET (common_serial_bus.resource_source), "ResourceSource", NULL}, \ | ||
365 | {ACPI_RSD_UINT16, ACPI_RSD_OFFSET (common_serial_bus.vendor_length), "VendorLength", NULL}, \ | ||
366 | {ACPI_RSD_SHORTLISTX,ACPI_RSD_OFFSET (common_serial_bus.vendor_data), "VendorData", NULL}, | ||
367 | |||
368 | struct acpi_rsdump_info acpi_rs_dump_common_serial_bus[10] = { | ||
369 | {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_common_serial_bus), | ||
370 | "Common Serial Bus", NULL}, | ||
371 | ACPI_RS_DUMP_COMMON_SERIAL_BUS | ||
372 | }; | ||
373 | |||
374 | struct acpi_rsdump_info acpi_rs_dump_i2c_serial_bus[13] = { | ||
375 | {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_i2c_serial_bus), | ||
376 | "I2C Serial Bus", NULL}, | ||
377 | ACPI_RS_DUMP_COMMON_SERIAL_BUS {ACPI_RSD_1BITFLAG, | ||
378 | ACPI_RSD_OFFSET(i2c_serial_bus. | ||
379 | access_mode), | ||
380 | "AccessMode", acpi_gbl_am_decode}, | ||
381 | {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(i2c_serial_bus.connection_speed), | ||
382 | "ConnectionSpeed", NULL}, | ||
383 | {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(i2c_serial_bus.slave_address), | ||
384 | "SlaveAddress", NULL}, | ||
385 | }; | ||
386 | |||
387 | struct acpi_rsdump_info acpi_rs_dump_spi_serial_bus[17] = { | ||
388 | {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_spi_serial_bus), | ||
389 | "Spi Serial Bus", NULL}, | ||
390 | ACPI_RS_DUMP_COMMON_SERIAL_BUS {ACPI_RSD_1BITFLAG, | ||
391 | ACPI_RSD_OFFSET(spi_serial_bus. | ||
392 | wire_mode), "WireMode", | ||
393 | acpi_gbl_wm_decode}, | ||
394 | {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(spi_serial_bus.device_polarity), | ||
395 | "DevicePolarity", acpi_gbl_dp_decode}, | ||
396 | {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(spi_serial_bus.data_bit_length), | ||
397 | "DataBitLength", NULL}, | ||
398 | {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(spi_serial_bus.clock_phase), | ||
399 | "ClockPhase", acpi_gbl_cph_decode}, | ||
400 | {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(spi_serial_bus.clock_polarity), | ||
401 | "ClockPolarity", acpi_gbl_cpo_decode}, | ||
402 | {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(spi_serial_bus.device_selection), | ||
403 | "DeviceSelection", NULL}, | ||
404 | {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(spi_serial_bus.connection_speed), | ||
405 | "ConnectionSpeed", NULL}, | ||
406 | }; | ||
407 | |||
408 | struct acpi_rsdump_info acpi_rs_dump_uart_serial_bus[19] = { | ||
409 | {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_uart_serial_bus), | ||
410 | "Uart Serial Bus", NULL}, | ||
411 | ACPI_RS_DUMP_COMMON_SERIAL_BUS {ACPI_RSD_2BITFLAG, | ||
412 | ACPI_RSD_OFFSET(uart_serial_bus. | ||
413 | flow_control), | ||
414 | "FlowControl", acpi_gbl_fc_decode}, | ||
415 | {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(uart_serial_bus.stop_bits), | ||
416 | "StopBits", acpi_gbl_sb_decode}, | ||
417 | {ACPI_RSD_3BITFLAG, ACPI_RSD_OFFSET(uart_serial_bus.data_bits), | ||
418 | "DataBits", acpi_gbl_bpb_decode}, | ||
419 | {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(uart_serial_bus.endian), "Endian", | ||
420 | acpi_gbl_ed_decode}, | ||
421 | {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(uart_serial_bus.parity), "Parity", | ||
422 | acpi_gbl_pt_decode}, | ||
423 | {ACPI_RSD_UINT8, ACPI_RSD_OFFSET(uart_serial_bus.lines_enabled), | ||
424 | "LinesEnabled", NULL}, | ||
425 | {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(uart_serial_bus.rx_fifo_size), | ||
426 | "RxFifoSize", NULL}, | ||
427 | {ACPI_RSD_UINT16, ACPI_RSD_OFFSET(uart_serial_bus.tx_fifo_size), | ||
428 | "TxFifoSize", NULL}, | ||
429 | {ACPI_RSD_UINT32, ACPI_RSD_OFFSET(uart_serial_bus.default_baud_rate), | ||
430 | "ConnectionSpeed", NULL}, | ||
431 | }; | ||
432 | |||
433 | /* | ||
434 | * Tables used for common address descriptor flag fields | ||
435 | */ | ||
436 | static struct acpi_rsdump_info acpi_rs_dump_general_flags[5] = { | ||
437 | {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_general_flags), NULL, | ||
438 | NULL}, | ||
439 | {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.producer_consumer), | ||
440 | "Consumer/Producer", acpi_gbl_consume_decode}, | ||
441 | {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.decode), "Address Decode", | ||
442 | acpi_gbl_dec_decode}, | ||
443 | {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.min_address_fixed), | ||
444 | "Min Relocatability", acpi_gbl_min_decode}, | ||
445 | {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.max_address_fixed), | ||
446 | "Max Relocatability", acpi_gbl_max_decode} | ||
447 | }; | ||
448 | |||
449 | static struct acpi_rsdump_info acpi_rs_dump_memory_flags[5] = { | ||
450 | {ACPI_RSD_LITERAL, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_memory_flags), | ||
451 | "Resource Type", (void *)"Memory Range"}, | ||
452 | {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.info.mem.write_protect), | ||
453 | "Write Protect", acpi_gbl_rw_decode}, | ||
454 | {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(address.info.mem.caching), | ||
455 | "Caching", acpi_gbl_mem_decode}, | ||
456 | {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(address.info.mem.range_type), | ||
457 | "Range Type", acpi_gbl_mtp_decode}, | ||
458 | {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.info.mem.translation), | ||
459 | "Translation", acpi_gbl_ttp_decode} | ||
460 | }; | ||
461 | |||
462 | static struct acpi_rsdump_info acpi_rs_dump_io_flags[4] = { | ||
463 | {ACPI_RSD_LITERAL, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_io_flags), | ||
464 | "Resource Type", (void *)"I/O Range"}, | ||
465 | {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET(address.info.io.range_type), | ||
466 | "Range Type", acpi_gbl_rng_decode}, | ||
467 | {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.info.io.translation), | ||
468 | "Translation", acpi_gbl_ttp_decode}, | ||
469 | {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET(address.info.io.translation_type), | ||
470 | "Translation Type", acpi_gbl_trs_decode} | ||
471 | }; | ||
472 | |||
473 | /* | ||
474 | * Table used to dump _PRT contents | ||
475 | */ | ||
476 | static struct acpi_rsdump_info acpi_rs_dump_prt[5] = { | ||
477 | {ACPI_RSD_TITLE, ACPI_RSD_TABLE_SIZE(acpi_rs_dump_prt), NULL, NULL}, | ||
478 | {ACPI_RSD_UINT64, ACPI_PRT_OFFSET(address), "Address", NULL}, | ||
479 | {ACPI_RSD_UINT32, ACPI_PRT_OFFSET(pin), "Pin", NULL}, | ||
480 | {ACPI_RSD_STRING, ACPI_PRT_OFFSET(source[0]), "Source", NULL}, | ||
481 | {ACPI_RSD_UINT32, ACPI_PRT_OFFSET(source_index), "Source Index", NULL} | ||
482 | }; | ||
483 | |||
484 | /******************************************************************************* | 80 | /******************************************************************************* |
485 | * | 81 | * |
486 | * FUNCTION: acpi_rs_dump_descriptor | 82 | * FUNCTION: acpi_rs_dump_descriptor |
487 | * | 83 | * |
488 | * PARAMETERS: Resource | 84 | * PARAMETERS: resource - Buffer containing the resource |
85 | * table - Table entry to decode the resource | ||
489 | * | 86 | * |
490 | * RETURN: None | 87 | * RETURN: None |
491 | * | 88 | * |
492 | * DESCRIPTION: | 89 | * DESCRIPTION: Dump a resource descriptor based on a dump table entry. |
493 | * | 90 | * |
494 | ******************************************************************************/ | 91 | ******************************************************************************/ |
495 | 92 | ||