acrestyp.h 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622
  1. /******************************************************************************
  2. *
  3. * Name: acrestyp.h - Defines, types, and structures for resource descriptors
  4. *
  5. *****************************************************************************/
  6. /*
  7. * Copyright (C) 2000 - 2015, Intel Corp.
  8. * All rights reserved.
  9. *
  10. * Redistribution and use in source and binary forms, with or without
  11. * modification, are permitted provided that the following conditions
  12. * are met:
  13. * 1. Redistributions of source code must retain the above copyright
  14. * notice, this list of conditions, and the following disclaimer,
  15. * without modification.
  16. * 2. Redistributions in binary form must reproduce at minimum a disclaimer
  17. * substantially similar to the "NO WARRANTY" disclaimer below
  18. * ("Disclaimer") and any redistribution must be conditioned upon
  19. * including a substantially similar Disclaimer requirement for further
  20. * binary redistribution.
  21. * 3. Neither the names of the above-listed copyright holders nor the names
  22. * of any contributors may be used to endorse or promote products derived
  23. * from this software without specific prior written permission.
  24. *
  25. * Alternatively, this software may be distributed under the terms of the
  26. * GNU General Public License ("GPL") version 2 as published by the Free
  27. * Software Foundation.
  28. *
  29. * NO WARRANTY
  30. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  31. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  32. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
  33. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  34. * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  35. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  36. * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  37. * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
  38. * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
  39. * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  40. * POSSIBILITY OF SUCH DAMAGES.
  41. */
  42. #ifndef __ACRESTYP_H__
  43. #define __ACRESTYP_H__
  44. /*
  45. * Definitions for Resource Attributes
  46. */
  47. typedef u16 acpi_rs_length; /* Resource Length field is fixed at 16 bits */
  48. typedef u32 acpi_rsdesc_size; /* Max Resource Descriptor size is (Length+3) = (64K-1)+3 */
  49. /*
  50. * Memory Attributes
  51. */
  52. #define ACPI_READ_ONLY_MEMORY (u8) 0x00
  53. #define ACPI_READ_WRITE_MEMORY (u8) 0x01
  54. #define ACPI_NON_CACHEABLE_MEMORY (u8) 0x00
  55. #define ACPI_CACHABLE_MEMORY (u8) 0x01
  56. #define ACPI_WRITE_COMBINING_MEMORY (u8) 0x02
  57. #define ACPI_PREFETCHABLE_MEMORY (u8) 0x03
  58. /*! [Begin] no source code translation */
  59. /*
  60. * IO Attributes
  61. * The ISA IO ranges are: n000-n0FFh, n400-n4FFh, n800-n8FFh, nC00-nCFFh.
  62. * The non-ISA IO ranges are: n100-n3FFh, n500-n7FFh, n900-nBFFh, nCD0-nFFFh.
  63. */
  64. /*! [End] no source code translation !*/
  65. #define ACPI_NON_ISA_ONLY_RANGES (u8) 0x01
  66. #define ACPI_ISA_ONLY_RANGES (u8) 0x02
  67. #define ACPI_ENTIRE_RANGE (ACPI_NON_ISA_ONLY_RANGES | ACPI_ISA_ONLY_RANGES)
  68. /* Type of translation - 1=Sparse, 0=Dense */
  69. #define ACPI_SPARSE_TRANSLATION (u8) 0x01
  70. /*
  71. * IO Port Descriptor Decode
  72. */
  73. #define ACPI_DECODE_10 (u8) 0x00 /* 10-bit IO address decode */
  74. #define ACPI_DECODE_16 (u8) 0x01 /* 16-bit IO address decode */
  75. /*
  76. * Interrupt attributes - used in multiple descriptors
  77. */
  78. /* Triggering */
  79. #define ACPI_LEVEL_SENSITIVE (u8) 0x00
  80. #define ACPI_EDGE_SENSITIVE (u8) 0x01
  81. /* Polarity */
  82. #define ACPI_ACTIVE_HIGH (u8) 0x00
  83. #define ACPI_ACTIVE_LOW (u8) 0x01
  84. #define ACPI_ACTIVE_BOTH (u8) 0x02
  85. /* Sharing */
  86. #define ACPI_EXCLUSIVE (u8) 0x00
  87. #define ACPI_SHARED (u8) 0x01
  88. /* Wake */
  89. #define ACPI_NOT_WAKE_CAPABLE (u8) 0x00
  90. #define ACPI_WAKE_CAPABLE (u8) 0x01
  91. /*
  92. * DMA Attributes
  93. */
  94. #define ACPI_COMPATIBILITY (u8) 0x00
  95. #define ACPI_TYPE_A (u8) 0x01
  96. #define ACPI_TYPE_B (u8) 0x02
  97. #define ACPI_TYPE_F (u8) 0x03
  98. #define ACPI_NOT_BUS_MASTER (u8) 0x00
  99. #define ACPI_BUS_MASTER (u8) 0x01
  100. #define ACPI_TRANSFER_8 (u8) 0x00
  101. #define ACPI_TRANSFER_8_16 (u8) 0x01
  102. #define ACPI_TRANSFER_16 (u8) 0x02
  103. /*
  104. * Start Dependent Functions Priority definitions
  105. */
  106. #define ACPI_GOOD_CONFIGURATION (u8) 0x00
  107. #define ACPI_ACCEPTABLE_CONFIGURATION (u8) 0x01
  108. #define ACPI_SUB_OPTIMAL_CONFIGURATION (u8) 0x02
  109. /*
  110. * 16, 32 and 64-bit Address Descriptor resource types
  111. */
  112. #define ACPI_MEMORY_RANGE (u8) 0x00
  113. #define ACPI_IO_RANGE (u8) 0x01
  114. #define ACPI_BUS_NUMBER_RANGE (u8) 0x02
  115. #define ACPI_ADDRESS_NOT_FIXED (u8) 0x00
  116. #define ACPI_ADDRESS_FIXED (u8) 0x01
  117. #define ACPI_POS_DECODE (u8) 0x00
  118. #define ACPI_SUB_DECODE (u8) 0x01
  119. /* Producer/Consumer */
  120. #define ACPI_PRODUCER (u8) 0x00
  121. #define ACPI_CONSUMER (u8) 0x01
  122. /*
  123. * If possible, pack the following structures to byte alignment
  124. */
  125. #ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED
  126. #pragma pack(1)
  127. #endif
  128. /* UUID data structures for use in vendor-defined resource descriptors */
  129. struct acpi_uuid {
  130. u8 data[ACPI_UUID_LENGTH];
  131. };
  132. struct acpi_vendor_uuid {
  133. u8 subtype;
  134. u8 data[ACPI_UUID_LENGTH];
  135. };
  136. /*
  137. * Structures used to describe device resources
  138. */
  139. struct acpi_resource_irq {
  140. u8 descriptor_length;
  141. u8 triggering;
  142. u8 polarity;
  143. u8 sharable;
  144. u8 wake_capable;
  145. u8 interrupt_count;
  146. u8 interrupts[1];
  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. struct acpi_resource_start_dependent {
  156. u8 descriptor_length;
  157. u8 compatibility_priority;
  158. u8 performance_robustness;
  159. };
  160. /*
  161. * The END_DEPENDENT_FUNCTIONS_RESOURCE struct is not
  162. * needed because it has no fields
  163. */
  164. struct acpi_resource_io {
  165. u8 io_decode;
  166. u8 alignment;
  167. u8 address_length;
  168. u16 minimum;
  169. u16 maximum;
  170. };
  171. struct acpi_resource_fixed_io {
  172. u16 address;
  173. u8 address_length;
  174. };
  175. struct acpi_resource_fixed_dma {
  176. u16 request_lines;
  177. u16 channels;
  178. u8 width;
  179. };
  180. /* Values for Width field above */
  181. #define ACPI_DMA_WIDTH8 0
  182. #define ACPI_DMA_WIDTH16 1
  183. #define ACPI_DMA_WIDTH32 2
  184. #define ACPI_DMA_WIDTH64 3
  185. #define ACPI_DMA_WIDTH128 4
  186. #define ACPI_DMA_WIDTH256 5
  187. struct acpi_resource_vendor {
  188. u16 byte_length;
  189. u8 byte_data[1];
  190. };
  191. /* Vendor resource with UUID info (introduced in ACPI 3.0) */
  192. struct acpi_resource_vendor_typed {
  193. u16 byte_length;
  194. u8 uuid_subtype;
  195. u8 uuid[ACPI_UUID_LENGTH];
  196. u8 byte_data[1];
  197. };
  198. struct acpi_resource_end_tag {
  199. u8 checksum;
  200. };
  201. struct acpi_resource_memory24 {
  202. u8 write_protect;
  203. u16 minimum;
  204. u16 maximum;
  205. u16 alignment;
  206. u16 address_length;
  207. };
  208. struct acpi_resource_memory32 {
  209. u8 write_protect;
  210. u32 minimum;
  211. u32 maximum;
  212. u32 alignment;
  213. u32 address_length;
  214. };
  215. struct acpi_resource_fixed_memory32 {
  216. u8 write_protect;
  217. u32 address;
  218. u32 address_length;
  219. };
  220. struct acpi_memory_attribute {
  221. u8 write_protect;
  222. u8 caching;
  223. u8 range_type;
  224. u8 translation;
  225. };
  226. struct acpi_io_attribute {
  227. u8 range_type;
  228. u8 translation;
  229. u8 translation_type;
  230. u8 reserved1;
  231. };
  232. union acpi_resource_attribute {
  233. struct acpi_memory_attribute mem;
  234. struct acpi_io_attribute io;
  235. /* Used for the *word_space macros */
  236. u8 type_specific;
  237. };
  238. struct acpi_resource_source {
  239. u8 index;
  240. u16 string_length;
  241. char *string_ptr;
  242. };
  243. /* Fields common to all address descriptors, 16/32/64 bit */
  244. #define ACPI_RESOURCE_ADDRESS_COMMON \
  245. u8 resource_type; \
  246. u8 producer_consumer; \
  247. u8 decode; \
  248. u8 min_address_fixed; \
  249. u8 max_address_fixed; \
  250. union acpi_resource_attribute info;
  251. struct acpi_address16_attribute {
  252. u16 granularity;
  253. u16 minimum;
  254. u16 maximum;
  255. u16 translation_offset;
  256. u16 address_length;
  257. };
  258. struct acpi_address32_attribute {
  259. u32 granularity;
  260. u32 minimum;
  261. u32 maximum;
  262. u32 translation_offset;
  263. u32 address_length;
  264. };
  265. struct acpi_address64_attribute {
  266. u64 granularity;
  267. u64 minimum;
  268. u64 maximum;
  269. u64 translation_offset;
  270. u64 address_length;
  271. };
  272. struct acpi_resource_address {
  273. ACPI_RESOURCE_ADDRESS_COMMON};
  274. struct acpi_resource_address16 {
  275. ACPI_RESOURCE_ADDRESS_COMMON struct acpi_address16_attribute address;
  276. struct acpi_resource_source resource_source;
  277. };
  278. struct acpi_resource_address32 {
  279. ACPI_RESOURCE_ADDRESS_COMMON struct acpi_address32_attribute address;
  280. struct acpi_resource_source resource_source;
  281. };
  282. struct acpi_resource_address64 {
  283. ACPI_RESOURCE_ADDRESS_COMMON struct acpi_address64_attribute address;
  284. struct acpi_resource_source resource_source;
  285. };
  286. struct acpi_resource_extended_address64 {
  287. ACPI_RESOURCE_ADDRESS_COMMON u8 revision_ID;
  288. struct acpi_address64_attribute address;
  289. u64 type_specific;
  290. };
  291. struct acpi_resource_extended_irq {
  292. u8 producer_consumer;
  293. u8 triggering;
  294. u8 polarity;
  295. u8 sharable;
  296. u8 wake_capable;
  297. u8 interrupt_count;
  298. struct acpi_resource_source resource_source;
  299. u32 interrupts[1];
  300. };
  301. struct acpi_resource_generic_register {
  302. u8 space_id;
  303. u8 bit_width;
  304. u8 bit_offset;
  305. u8 access_size;
  306. u64 address;
  307. };
  308. struct acpi_resource_gpio {
  309. u8 revision_id;
  310. u8 connection_type;
  311. u8 producer_consumer; /* For values, see Producer/Consumer above */
  312. u8 pin_config;
  313. u8 sharable; /* For values, see Interrupt Attributes above */
  314. u8 wake_capable; /* For values, see Interrupt Attributes above */
  315. u8 io_restriction;
  316. u8 triggering; /* For values, see Interrupt Attributes above */
  317. u8 polarity; /* For values, see Interrupt Attributes above */
  318. u16 drive_strength;
  319. u16 debounce_timeout;
  320. u16 pin_table_length;
  321. u16 vendor_length;
  322. struct acpi_resource_source resource_source;
  323. u16 *pin_table;
  324. u8 *vendor_data;
  325. };
  326. /* Values for GPIO connection_type field above */
  327. #define ACPI_RESOURCE_GPIO_TYPE_INT 0
  328. #define ACPI_RESOURCE_GPIO_TYPE_IO 1
  329. /* Values for pin_config field above */
  330. #define ACPI_PIN_CONFIG_DEFAULT 0
  331. #define ACPI_PIN_CONFIG_PULLUP 1
  332. #define ACPI_PIN_CONFIG_PULLDOWN 2
  333. #define ACPI_PIN_CONFIG_NOPULL 3
  334. /* Values for io_restriction field above */
  335. #define ACPI_IO_RESTRICT_NONE 0
  336. #define ACPI_IO_RESTRICT_INPUT 1
  337. #define ACPI_IO_RESTRICT_OUTPUT 2
  338. #define ACPI_IO_RESTRICT_NONE_PRESERVE 3
  339. /* Common structure for I2C, SPI, and UART serial descriptors */
  340. #define ACPI_RESOURCE_SERIAL_COMMON \
  341. u8 revision_id; \
  342. u8 type; \
  343. u8 producer_consumer; /* For values, see Producer/Consumer above */\
  344. u8 slave_mode; \
  345. u8 type_revision_id; \
  346. u16 type_data_length; \
  347. u16 vendor_length; \
  348. struct acpi_resource_source resource_source; \
  349. u8 *vendor_data;
  350. struct acpi_resource_common_serialbus {
  351. ACPI_RESOURCE_SERIAL_COMMON};
  352. /* Values for the Type field above */
  353. #define ACPI_RESOURCE_SERIAL_TYPE_I2C 1
  354. #define ACPI_RESOURCE_SERIAL_TYPE_SPI 2
  355. #define ACPI_RESOURCE_SERIAL_TYPE_UART 3
  356. /* Values for slave_mode field above */
  357. #define ACPI_CONTROLLER_INITIATED 0
  358. #define ACPI_DEVICE_INITIATED 1
  359. struct acpi_resource_i2c_serialbus {
  360. ACPI_RESOURCE_SERIAL_COMMON u8 access_mode;
  361. u16 slave_address;
  362. u32 connection_speed;
  363. };
  364. /* Values for access_mode field above */
  365. #define ACPI_I2C_7BIT_MODE 0
  366. #define ACPI_I2C_10BIT_MODE 1
  367. struct acpi_resource_spi_serialbus {
  368. ACPI_RESOURCE_SERIAL_COMMON u8 wire_mode;
  369. u8 device_polarity;
  370. u8 data_bit_length;
  371. u8 clock_phase;
  372. u8 clock_polarity;
  373. u16 device_selection;
  374. u32 connection_speed;
  375. };
  376. /* Values for wire_mode field above */
  377. #define ACPI_SPI_4WIRE_MODE 0
  378. #define ACPI_SPI_3WIRE_MODE 1
  379. /* Values for device_polarity field above */
  380. #define ACPI_SPI_ACTIVE_LOW 0
  381. #define ACPI_SPI_ACTIVE_HIGH 1
  382. /* Values for clock_phase field above */
  383. #define ACPI_SPI_FIRST_PHASE 0
  384. #define ACPI_SPI_SECOND_PHASE 1
  385. /* Values for clock_polarity field above */
  386. #define ACPI_SPI_START_LOW 0
  387. #define ACPI_SPI_START_HIGH 1
  388. struct acpi_resource_uart_serialbus {
  389. ACPI_RESOURCE_SERIAL_COMMON u8 endian;
  390. u8 data_bits;
  391. u8 stop_bits;
  392. u8 flow_control;
  393. u8 parity;
  394. u8 lines_enabled;
  395. u16 rx_fifo_size;
  396. u16 tx_fifo_size;
  397. u32 default_baud_rate;
  398. };
  399. /* Values for Endian field above */
  400. #define ACPI_UART_LITTLE_ENDIAN 0
  401. #define ACPI_UART_BIG_ENDIAN 1
  402. /* Values for data_bits field above */
  403. #define ACPI_UART_5_DATA_BITS 0
  404. #define ACPI_UART_6_DATA_BITS 1
  405. #define ACPI_UART_7_DATA_BITS 2
  406. #define ACPI_UART_8_DATA_BITS 3
  407. #define ACPI_UART_9_DATA_BITS 4
  408. /* Values for stop_bits field above */
  409. #define ACPI_UART_NO_STOP_BITS 0
  410. #define ACPI_UART_1_STOP_BIT 1
  411. #define ACPI_UART_1P5_STOP_BITS 2
  412. #define ACPI_UART_2_STOP_BITS 3
  413. /* Values for flow_control field above */
  414. #define ACPI_UART_FLOW_CONTROL_NONE 0
  415. #define ACPI_UART_FLOW_CONTROL_HW 1
  416. #define ACPI_UART_FLOW_CONTROL_XON_XOFF 2
  417. /* Values for Parity field above */
  418. #define ACPI_UART_PARITY_NONE 0
  419. #define ACPI_UART_PARITY_EVEN 1
  420. #define ACPI_UART_PARITY_ODD 2
  421. #define ACPI_UART_PARITY_MARK 3
  422. #define ACPI_UART_PARITY_SPACE 4
  423. /* Values for lines_enabled bitfield above */
  424. #define ACPI_UART_CARRIER_DETECT (1<<2)
  425. #define ACPI_UART_RING_INDICATOR (1<<3)
  426. #define ACPI_UART_DATA_SET_READY (1<<4)
  427. #define ACPI_UART_DATA_TERMINAL_READY (1<<5)
  428. #define ACPI_UART_CLEAR_TO_SEND (1<<6)
  429. #define ACPI_UART_REQUEST_TO_SEND (1<<7)
  430. /* ACPI_RESOURCE_TYPEs */
  431. #define ACPI_RESOURCE_TYPE_IRQ 0
  432. #define ACPI_RESOURCE_TYPE_DMA 1
  433. #define ACPI_RESOURCE_TYPE_START_DEPENDENT 2
  434. #define ACPI_RESOURCE_TYPE_END_DEPENDENT 3
  435. #define ACPI_RESOURCE_TYPE_IO 4
  436. #define ACPI_RESOURCE_TYPE_FIXED_IO 5
  437. #define ACPI_RESOURCE_TYPE_VENDOR 6
  438. #define ACPI_RESOURCE_TYPE_END_TAG 7
  439. #define ACPI_RESOURCE_TYPE_MEMORY24 8
  440. #define ACPI_RESOURCE_TYPE_MEMORY32 9
  441. #define ACPI_RESOURCE_TYPE_FIXED_MEMORY32 10
  442. #define ACPI_RESOURCE_TYPE_ADDRESS16 11
  443. #define ACPI_RESOURCE_TYPE_ADDRESS32 12
  444. #define ACPI_RESOURCE_TYPE_ADDRESS64 13
  445. #define ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64 14 /* ACPI 3.0 */
  446. #define ACPI_RESOURCE_TYPE_EXTENDED_IRQ 15
  447. #define ACPI_RESOURCE_TYPE_GENERIC_REGISTER 16
  448. #define ACPI_RESOURCE_TYPE_GPIO 17 /* ACPI 5.0 */
  449. #define ACPI_RESOURCE_TYPE_FIXED_DMA 18 /* ACPI 5.0 */
  450. #define ACPI_RESOURCE_TYPE_SERIAL_BUS 19 /* ACPI 5.0 */
  451. #define ACPI_RESOURCE_TYPE_MAX 19
  452. /* Master union for resource descriptors */
  453. union acpi_resource_data {
  454. struct acpi_resource_irq irq;
  455. struct acpi_resource_dma dma;
  456. struct acpi_resource_start_dependent start_dpf;
  457. struct acpi_resource_io io;
  458. struct acpi_resource_fixed_io fixed_io;
  459. struct acpi_resource_fixed_dma fixed_dma;
  460. struct acpi_resource_vendor vendor;
  461. struct acpi_resource_vendor_typed vendor_typed;
  462. struct acpi_resource_end_tag end_tag;
  463. struct acpi_resource_memory24 memory24;
  464. struct acpi_resource_memory32 memory32;
  465. struct acpi_resource_fixed_memory32 fixed_memory32;
  466. struct acpi_resource_address16 address16;
  467. struct acpi_resource_address32 address32;
  468. struct acpi_resource_address64 address64;
  469. struct acpi_resource_extended_address64 ext_address64;
  470. struct acpi_resource_extended_irq extended_irq;
  471. struct acpi_resource_generic_register generic_reg;
  472. struct acpi_resource_gpio gpio;
  473. struct acpi_resource_i2c_serialbus i2c_serial_bus;
  474. struct acpi_resource_spi_serialbus spi_serial_bus;
  475. struct acpi_resource_uart_serialbus uart_serial_bus;
  476. struct acpi_resource_common_serialbus common_serial_bus;
  477. /* Common fields */
  478. struct acpi_resource_address address; /* Common 16/32/64 address fields */
  479. };
  480. /* Common resource header */
  481. struct acpi_resource {
  482. u32 type;
  483. u32 length;
  484. union acpi_resource_data data;
  485. };
  486. /* restore default alignment */
  487. #pragma pack()
  488. #define ACPI_RS_SIZE_NO_DATA 8 /* Id + Length fields */
  489. #define ACPI_RS_SIZE_MIN (u32) ACPI_ROUND_UP_TO_NATIVE_WORD (12)
  490. #define ACPI_RS_SIZE(type) (u32) (ACPI_RS_SIZE_NO_DATA + sizeof (type))
  491. /* Macro for walking resource templates with multiple descriptors */
  492. #define ACPI_NEXT_RESOURCE(res) \
  493. ACPI_ADD_PTR (struct acpi_resource, (res), (res)->length)
  494. struct acpi_pci_routing_table {
  495. u32 length;
  496. u32 pin;
  497. u64 address; /* here for 64-bit alignment */
  498. u32 source_index;
  499. char source[4]; /* pad to 64 bits so sizeof() works in all cases */
  500. };
  501. #endif /* __ACRESTYP_H__ */