~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/acpi/acrestyp.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /include/acpi/acrestyp.h (Architecture mips) and /include/acpi/acrestyp.h (Architecture m68k)


  1 /* SPDX-License-Identifier: BSD-3-Clause OR GP      1 /* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */
  2 /*********************************************      2 /******************************************************************************
  3  *                                                  3  *
  4  * Name: acrestyp.h - Defines, types, and stru      4  * Name: acrestyp.h - Defines, types, and structures for resource descriptors
  5  *                                                  5  *
  6  * Copyright (C) 2000 - 2023, Intel Corp.           6  * Copyright (C) 2000 - 2023, Intel Corp.
  7  *                                                  7  *
  8  *********************************************      8  *****************************************************************************/
  9                                                     9 
 10 #ifndef __ACRESTYP_H__                             10 #ifndef __ACRESTYP_H__
 11 #define __ACRESTYP_H__                             11 #define __ACRESTYP_H__
 12                                                    12 
 13 /*                                                 13 /*
 14  * Definitions for Resource Attributes             14  * Definitions for Resource Attributes
 15  */                                                15  */
 16 typedef u16 acpi_rs_length;     /* Resource Le     16 typedef u16 acpi_rs_length;     /* Resource Length field is fixed at 16 bits */
 17 typedef u32 acpi_rsdesc_size;   /* Max Resourc     17 typedef u32 acpi_rsdesc_size;   /* Max Resource Descriptor size is (Length+3) = (64K-1)+3 */
 18                                                    18 
 19 /*                                                 19 /*
 20  * Memory Attributes                               20  * Memory Attributes
 21  */                                                21  */
 22 #define ACPI_READ_ONLY_MEMORY           (u8) 0     22 #define ACPI_READ_ONLY_MEMORY           (u8) 0x00
 23 #define ACPI_READ_WRITE_MEMORY          (u8) 0     23 #define ACPI_READ_WRITE_MEMORY          (u8) 0x01
 24                                                    24 
 25 #define ACPI_NON_CACHEABLE_MEMORY       (u8) 0     25 #define ACPI_NON_CACHEABLE_MEMORY       (u8) 0x00
 26 #define ACPI_CACHABLE_MEMORY            (u8) 0     26 #define ACPI_CACHABLE_MEMORY            (u8) 0x01
 27 #define ACPI_WRITE_COMBINING_MEMORY     (u8) 0     27 #define ACPI_WRITE_COMBINING_MEMORY     (u8) 0x02
 28 #define ACPI_PREFETCHABLE_MEMORY        (u8) 0     28 #define ACPI_PREFETCHABLE_MEMORY        (u8) 0x03
 29                                                    29 
 30 /*! [Begin] no source code translation */          30 /*! [Begin] no source code translation */
 31 /*                                                 31 /*
 32  * IO Attributes                                   32  * IO Attributes
 33  * The ISA IO ranges are:     n000-n0FFh,  n40     33  * The ISA IO ranges are:     n000-n0FFh,  n400-n4FFh, n800-n8FFh, nC00-nCFFh.
 34  * The non-ISA IO ranges are: n100-n3FFh,  n50     34  * The non-ISA IO ranges are: n100-n3FFh,  n500-n7FFh, n900-nBFFh, nCD0-nFFFh.
 35  */                                                35  */
 36 /*! [End] no source code translation !*/           36 /*! [End] no source code translation !*/
 37                                                    37 
 38 #define ACPI_NON_ISA_ONLY_RANGES        (u8) 0     38 #define ACPI_NON_ISA_ONLY_RANGES        (u8) 0x01
 39 #define ACPI_ISA_ONLY_RANGES            (u8) 0     39 #define ACPI_ISA_ONLY_RANGES            (u8) 0x02
 40 #define ACPI_ENTIRE_RANGE               (ACPI_     40 #define ACPI_ENTIRE_RANGE               (ACPI_NON_ISA_ONLY_RANGES | ACPI_ISA_ONLY_RANGES)
 41                                                    41 
 42 /* Type of translation - 1=Sparse, 0=Dense */      42 /* Type of translation - 1=Sparse, 0=Dense */
 43                                                    43 
 44 #define ACPI_SPARSE_TRANSLATION         (u8) 0     44 #define ACPI_SPARSE_TRANSLATION         (u8) 0x01
 45                                                    45 
 46 /*                                                 46 /*
 47  * IO Port Descriptor Decode                       47  * IO Port Descriptor Decode
 48  */                                                48  */
 49 #define ACPI_DECODE_10                  (u8) 0     49 #define ACPI_DECODE_10                  (u8) 0x00       /* 10-bit IO address decode */
 50 #define ACPI_DECODE_16                  (u8) 0     50 #define ACPI_DECODE_16                  (u8) 0x01       /* 16-bit IO address decode */
 51                                                    51 
 52 /*                                                 52 /*
 53  * Interrupt attributes - used in multiple des     53  * Interrupt attributes - used in multiple descriptors
 54  */                                                54  */
 55                                                    55 
 56 /* Triggering */                                   56 /* Triggering */
 57                                                    57 
 58 #define ACPI_LEVEL_SENSITIVE            (u8) 0     58 #define ACPI_LEVEL_SENSITIVE            (u8) 0x00
 59 #define ACPI_EDGE_SENSITIVE             (u8) 0     59 #define ACPI_EDGE_SENSITIVE             (u8) 0x01
 60                                                    60 
 61 /* Polarity */                                     61 /* Polarity */
 62                                                    62 
 63 #define ACPI_ACTIVE_HIGH                (u8) 0     63 #define ACPI_ACTIVE_HIGH                (u8) 0x00
 64 #define ACPI_ACTIVE_LOW                 (u8) 0     64 #define ACPI_ACTIVE_LOW                 (u8) 0x01
 65 #define ACPI_ACTIVE_BOTH                (u8) 0     65 #define ACPI_ACTIVE_BOTH                (u8) 0x02
 66                                                    66 
 67 /* Sharing */                                      67 /* Sharing */
 68                                                    68 
 69 #define ACPI_EXCLUSIVE                  (u8) 0     69 #define ACPI_EXCLUSIVE                  (u8) 0x00
 70 #define ACPI_SHARED                     (u8) 0     70 #define ACPI_SHARED                     (u8) 0x01
 71                                                    71 
 72 /* Wake */                                         72 /* Wake */
 73                                                    73 
 74 #define ACPI_NOT_WAKE_CAPABLE           (u8) 0     74 #define ACPI_NOT_WAKE_CAPABLE           (u8) 0x00
 75 #define ACPI_WAKE_CAPABLE               (u8) 0     75 #define ACPI_WAKE_CAPABLE               (u8) 0x01
 76                                                    76 
 77 /*                                                 77 /*
 78  * DMA Attributes                                  78  * DMA Attributes
 79  */                                                79  */
 80 #define ACPI_COMPATIBILITY              (u8) 0     80 #define ACPI_COMPATIBILITY              (u8) 0x00
 81 #define ACPI_TYPE_A                     (u8) 0     81 #define ACPI_TYPE_A                     (u8) 0x01
 82 #define ACPI_TYPE_B                     (u8) 0     82 #define ACPI_TYPE_B                     (u8) 0x02
 83 #define ACPI_TYPE_F                     (u8) 0     83 #define ACPI_TYPE_F                     (u8) 0x03
 84                                                    84 
 85 #define ACPI_NOT_BUS_MASTER             (u8) 0     85 #define ACPI_NOT_BUS_MASTER             (u8) 0x00
 86 #define ACPI_BUS_MASTER                 (u8) 0     86 #define ACPI_BUS_MASTER                 (u8) 0x01
 87                                                    87 
 88 #define ACPI_TRANSFER_8                 (u8) 0     88 #define ACPI_TRANSFER_8                 (u8) 0x00
 89 #define ACPI_TRANSFER_8_16              (u8) 0     89 #define ACPI_TRANSFER_8_16              (u8) 0x01
 90 #define ACPI_TRANSFER_16                (u8) 0     90 #define ACPI_TRANSFER_16                (u8) 0x02
 91                                                    91 
 92 /*                                                 92 /*
 93  * Start Dependent Functions Priority definiti     93  * Start Dependent Functions Priority definitions
 94  */                                                94  */
 95 #define ACPI_GOOD_CONFIGURATION         (u8) 0     95 #define ACPI_GOOD_CONFIGURATION         (u8) 0x00
 96 #define ACPI_ACCEPTABLE_CONFIGURATION   (u8) 0     96 #define ACPI_ACCEPTABLE_CONFIGURATION   (u8) 0x01
 97 #define ACPI_SUB_OPTIMAL_CONFIGURATION  (u8) 0     97 #define ACPI_SUB_OPTIMAL_CONFIGURATION  (u8) 0x02
 98                                                    98 
 99 /*                                                 99 /*
100  * 16, 32 and 64-bit Address Descriptor resour    100  * 16, 32 and 64-bit Address Descriptor resource types
101  */                                               101  */
102 #define ACPI_MEMORY_RANGE               (u8) 0    102 #define ACPI_MEMORY_RANGE               (u8) 0x00
103 #define ACPI_IO_RANGE                   (u8) 0    103 #define ACPI_IO_RANGE                   (u8) 0x01
104 #define ACPI_BUS_NUMBER_RANGE           (u8) 0    104 #define ACPI_BUS_NUMBER_RANGE           (u8) 0x02
105                                                   105 
106 #define ACPI_ADDRESS_NOT_FIXED          (u8) 0    106 #define ACPI_ADDRESS_NOT_FIXED          (u8) 0x00
107 #define ACPI_ADDRESS_FIXED              (u8) 0    107 #define ACPI_ADDRESS_FIXED              (u8) 0x01
108                                                   108 
109 #define ACPI_POS_DECODE                 (u8) 0    109 #define ACPI_POS_DECODE                 (u8) 0x00
110 #define ACPI_SUB_DECODE                 (u8) 0    110 #define ACPI_SUB_DECODE                 (u8) 0x01
111                                                   111 
112 /* Producer/Consumer */                           112 /* Producer/Consumer */
113                                                   113 
114 #define ACPI_PRODUCER                   (u8) 0    114 #define ACPI_PRODUCER                   (u8) 0x00
115 #define ACPI_CONSUMER                   (u8) 0    115 #define ACPI_CONSUMER                   (u8) 0x01
116                                                   116 
117 /*                                                117 /*
118  * If possible, pack the following structures     118  * If possible, pack the following structures to byte alignment
119  */                                               119  */
120 #ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED           120 #ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED
121 #pragma pack(1)                                   121 #pragma pack(1)
122 #endif                                            122 #endif
123                                                   123 
124 /* UUID data structures for use in vendor-defi    124 /* UUID data structures for use in vendor-defined resource descriptors */
125                                                   125 
126 struct acpi_uuid {                                126 struct acpi_uuid {
127         u8 data[ACPI_UUID_LENGTH];                127         u8 data[ACPI_UUID_LENGTH];
128 };                                                128 };
129                                                   129 
130 struct acpi_vendor_uuid {                         130 struct acpi_vendor_uuid {
131         u8 subtype;                               131         u8 subtype;
132         u8 data[ACPI_UUID_LENGTH];                132         u8 data[ACPI_UUID_LENGTH];
133 };                                                133 };
134                                                   134 
135 /*                                                135 /*
136  * Structures used to describe device resource    136  * Structures used to describe device resources
137  */                                               137  */
138 struct acpi_resource_irq {                        138 struct acpi_resource_irq {
139         u8 descriptor_length;                     139         u8 descriptor_length;
140         u8 triggering;                            140         u8 triggering;
141         u8 polarity;                              141         u8 polarity;
142         u8 shareable;                             142         u8 shareable;
143         u8 wake_capable;                          143         u8 wake_capable;
144         u8 interrupt_count;                       144         u8 interrupt_count;
145         union {                                   145         union {
146                 u8 interrupt;                     146                 u8 interrupt;
147                  ACPI_FLEX_ARRAY(u8, interrupt    147                  ACPI_FLEX_ARRAY(u8, interrupts);
148         };                                        148         };
149 };                                                149 };
150                                                   150 
151 struct acpi_resource_dma {                        151 struct acpi_resource_dma {
152         u8 type;                                  152         u8 type;
153         u8 bus_master;                            153         u8 bus_master;
154         u8 transfer;                              154         u8 transfer;
155         u8 channel_count;                         155         u8 channel_count;
156         union {                                   156         union {
157                 u8 channel;                       157                 u8 channel;
158                  ACPI_FLEX_ARRAY(u8, channels)    158                  ACPI_FLEX_ARRAY(u8, channels);
159         };                                        159         };
160 };                                                160 };
161                                                   161 
162 struct acpi_resource_start_dependent {            162 struct acpi_resource_start_dependent {
163         u8 descriptor_length;                     163         u8 descriptor_length;
164         u8 compatibility_priority;                164         u8 compatibility_priority;
165         u8 performance_robustness;                165         u8 performance_robustness;
166 };                                                166 };
167                                                   167 
168 /*                                                168 /*
169  * The END_DEPENDENT_FUNCTIONS_RESOURCE struct    169  * The END_DEPENDENT_FUNCTIONS_RESOURCE struct is not
170  * needed because it has no fields                170  * needed because it has no fields
171  */                                               171  */
172                                                   172 
173 struct acpi_resource_io {                         173 struct acpi_resource_io {
174         u8 io_decode;                             174         u8 io_decode;
175         u8 alignment;                             175         u8 alignment;
176         u8 address_length;                        176         u8 address_length;
177         u16 minimum;                              177         u16 minimum;
178         u16 maximum;                              178         u16 maximum;
179 };                                                179 };
180                                                   180 
181 struct acpi_resource_fixed_io {                   181 struct acpi_resource_fixed_io {
182         u16 address;                              182         u16 address;
183         u8 address_length;                        183         u8 address_length;
184 };                                                184 };
185                                                   185 
186 struct acpi_resource_fixed_dma {                  186 struct acpi_resource_fixed_dma {
187         u16 request_lines;                        187         u16 request_lines;
188         u16 channels;                             188         u16 channels;
189         u8 width;                                 189         u8 width;
190 };                                                190 };
191                                                   191 
192 /* Values for Width field above */                192 /* Values for Width field above */
193                                                   193 
194 #define ACPI_DMA_WIDTH8                           194 #define ACPI_DMA_WIDTH8                         0
195 #define ACPI_DMA_WIDTH16                          195 #define ACPI_DMA_WIDTH16                        1
196 #define ACPI_DMA_WIDTH32                          196 #define ACPI_DMA_WIDTH32                        2
197 #define ACPI_DMA_WIDTH64                          197 #define ACPI_DMA_WIDTH64                        3
198 #define ACPI_DMA_WIDTH128                         198 #define ACPI_DMA_WIDTH128                       4
199 #define ACPI_DMA_WIDTH256                         199 #define ACPI_DMA_WIDTH256                       5
200                                                   200 
201 struct acpi_resource_vendor {                     201 struct acpi_resource_vendor {
202         u16 byte_length;                          202         u16 byte_length;
203         u8 byte_data[];                           203         u8 byte_data[];
204 };                                                204 };
205                                                   205 
206 /* Vendor resource with UUID info (introduced     206 /* Vendor resource with UUID info (introduced in ACPI 3.0) */
207                                                   207 
208 struct acpi_resource_vendor_typed {               208 struct acpi_resource_vendor_typed {
209         u16 byte_length;                          209         u16 byte_length;
210         u8 uuid_subtype;                          210         u8 uuid_subtype;
211         u8 uuid[ACPI_UUID_LENGTH];                211         u8 uuid[ACPI_UUID_LENGTH];
212         u8 byte_data[];                           212         u8 byte_data[];
213 };                                                213 };
214                                                   214 
215 struct acpi_resource_end_tag {                    215 struct acpi_resource_end_tag {
216         u8 checksum;                              216         u8 checksum;
217 };                                                217 };
218                                                   218 
219 struct acpi_resource_memory24 {                   219 struct acpi_resource_memory24 {
220         u8 write_protect;                         220         u8 write_protect;
221         u16 minimum;                              221         u16 minimum;
222         u16 maximum;                              222         u16 maximum;
223         u16 alignment;                            223         u16 alignment;
224         u16 address_length;                       224         u16 address_length;
225 };                                                225 };
226                                                   226 
227 struct acpi_resource_memory32 {                   227 struct acpi_resource_memory32 {
228         u8 write_protect;                         228         u8 write_protect;
229         u32 minimum;                              229         u32 minimum;
230         u32 maximum;                              230         u32 maximum;
231         u32 alignment;                            231         u32 alignment;
232         u32 address_length;                       232         u32 address_length;
233 };                                                233 };
234                                                   234 
235 struct acpi_resource_fixed_memory32 {             235 struct acpi_resource_fixed_memory32 {
236         u8 write_protect;                         236         u8 write_protect;
237         u32 address;                              237         u32 address;
238         u32 address_length;                       238         u32 address_length;
239 };                                                239 };
240                                                   240 
241 struct acpi_memory_attribute {                    241 struct acpi_memory_attribute {
242         u8 write_protect;                         242         u8 write_protect;
243         u8 caching;                               243         u8 caching;
244         u8 range_type;                            244         u8 range_type;
245         u8 translation;                           245         u8 translation;
246 };                                                246 };
247                                                   247 
248 struct acpi_io_attribute {                        248 struct acpi_io_attribute {
249         u8 range_type;                            249         u8 range_type;
250         u8 translation;                           250         u8 translation;
251         u8 translation_type;                      251         u8 translation_type;
252         u8 reserved1;                             252         u8 reserved1;
253 };                                                253 };
254                                                   254 
255 union acpi_resource_attribute {                   255 union acpi_resource_attribute {
256         struct acpi_memory_attribute mem;         256         struct acpi_memory_attribute mem;
257         struct acpi_io_attribute io;              257         struct acpi_io_attribute io;
258                                                   258 
259         /* Used for the *word_space macros */     259         /* Used for the *word_space macros */
260                                                   260 
261         u8 type_specific;                         261         u8 type_specific;
262 };                                                262 };
263                                                   263 
264 struct acpi_resource_label {                      264 struct acpi_resource_label {
265         u16 string_length;                        265         u16 string_length;
266         char *string_ptr;                         266         char *string_ptr;
267 };                                                267 };
268                                                   268 
269 struct acpi_resource_source {                     269 struct acpi_resource_source {
270         u8 index;                                 270         u8 index;
271         u16 string_length;                        271         u16 string_length;
272         char *string_ptr;                         272         char *string_ptr;
273 };                                                273 };
274                                                   274 
275 /* Fields common to all address descriptors, 1    275 /* Fields common to all address descriptors, 16/32/64 bit */
276                                                   276 
277 #define ACPI_RESOURCE_ADDRESS_COMMON \            277 #define ACPI_RESOURCE_ADDRESS_COMMON \
278         u8                                        278         u8                                      resource_type; \
279         u8                                        279         u8                                      producer_consumer; \
280         u8                                        280         u8                                      decode; \
281         u8                                        281         u8                                      min_address_fixed; \
282         u8                                        282         u8                                      max_address_fixed; \
283         union acpi_resource_attribute             283         union acpi_resource_attribute           info;
284                                                   284 
285 struct acpi_address16_attribute {                 285 struct acpi_address16_attribute {
286         u16 granularity;                          286         u16 granularity;
287         u16 minimum;                              287         u16 minimum;
288         u16 maximum;                              288         u16 maximum;
289         u16 translation_offset;                   289         u16 translation_offset;
290         u16 address_length;                       290         u16 address_length;
291 };                                                291 };
292                                                   292 
293 struct acpi_address32_attribute {                 293 struct acpi_address32_attribute {
294         u32 granularity;                          294         u32 granularity;
295         u32 minimum;                              295         u32 minimum;
296         u32 maximum;                              296         u32 maximum;
297         u32 translation_offset;                   297         u32 translation_offset;
298         u32 address_length;                       298         u32 address_length;
299 };                                                299 };
300                                                   300 
301 struct acpi_address64_attribute {                 301 struct acpi_address64_attribute {
302         u64 granularity;                          302         u64 granularity;
303         u64 minimum;                              303         u64 minimum;
304         u64 maximum;                              304         u64 maximum;
305         u64 translation_offset;                   305         u64 translation_offset;
306         u64 address_length;                       306         u64 address_length;
307 };                                                307 };
308                                                   308 
309 struct acpi_resource_address {                    309 struct acpi_resource_address {
310 ACPI_RESOURCE_ADDRESS_COMMON};                    310 ACPI_RESOURCE_ADDRESS_COMMON};
311                                                   311 
312 struct acpi_resource_address16 {                  312 struct acpi_resource_address16 {
313         ACPI_RESOURCE_ADDRESS_COMMON struct ac    313         ACPI_RESOURCE_ADDRESS_COMMON struct acpi_address16_attribute address;
314         struct acpi_resource_source resource_s    314         struct acpi_resource_source resource_source;
315 };                                                315 };
316                                                   316 
317 struct acpi_resource_address32 {                  317 struct acpi_resource_address32 {
318         ACPI_RESOURCE_ADDRESS_COMMON struct ac    318         ACPI_RESOURCE_ADDRESS_COMMON struct acpi_address32_attribute address;
319         struct acpi_resource_source resource_s    319         struct acpi_resource_source resource_source;
320 };                                                320 };
321                                                   321 
322 struct acpi_resource_address64 {                  322 struct acpi_resource_address64 {
323         ACPI_RESOURCE_ADDRESS_COMMON struct ac    323         ACPI_RESOURCE_ADDRESS_COMMON struct acpi_address64_attribute address;
324         struct acpi_resource_source resource_s    324         struct acpi_resource_source resource_source;
325 };                                                325 };
326                                                   326 
327 struct acpi_resource_extended_address64 {         327 struct acpi_resource_extended_address64 {
328         ACPI_RESOURCE_ADDRESS_COMMON u8 revisi    328         ACPI_RESOURCE_ADDRESS_COMMON u8 revision_ID;
329         struct acpi_address64_attribute addres    329         struct acpi_address64_attribute address;
330         u64 type_specific;                        330         u64 type_specific;
331 };                                                331 };
332                                                   332 
333 struct acpi_resource_extended_irq {               333 struct acpi_resource_extended_irq {
334         u8 producer_consumer;                     334         u8 producer_consumer;
335         u8 triggering;                            335         u8 triggering;
336         u8 polarity;                              336         u8 polarity;
337         u8 shareable;                             337         u8 shareable;
338         u8 wake_capable;                          338         u8 wake_capable;
339         u8 interrupt_count;                       339         u8 interrupt_count;
340         struct acpi_resource_source resource_s    340         struct acpi_resource_source resource_source;
341         union {                                   341         union {
342                 u32 interrupt;                    342                 u32 interrupt;
343                  ACPI_FLEX_ARRAY(u32, interrup    343                  ACPI_FLEX_ARRAY(u32, interrupts);
344         };                                        344         };
345 };                                                345 };
346                                                   346 
347 struct acpi_resource_generic_register {           347 struct acpi_resource_generic_register {
348         u8 space_id;                              348         u8 space_id;
349         u8 bit_width;                             349         u8 bit_width;
350         u8 bit_offset;                            350         u8 bit_offset;
351         u8 access_size;                           351         u8 access_size;
352         u64 address;                              352         u64 address;
353 };                                                353 };
354                                                   354 
355 struct acpi_resource_gpio {                       355 struct acpi_resource_gpio {
356         u8 revision_id;                           356         u8 revision_id;
357         u8 connection_type;                       357         u8 connection_type;
358         u8 producer_consumer;   /* For values,    358         u8 producer_consumer;   /* For values, see Producer/Consumer above */
359         u8 pin_config;                            359         u8 pin_config;
360         u8 shareable;           /* For values,    360         u8 shareable;           /* For values, see Interrupt Attributes above */
361         u8 wake_capable;        /* For values,    361         u8 wake_capable;        /* For values, see Interrupt Attributes above */
362         u8 io_restriction;                        362         u8 io_restriction;
363         u8 triggering;          /* For values,    363         u8 triggering;          /* For values, see Interrupt Attributes above */
364         u8 polarity;            /* For values,    364         u8 polarity;            /* For values, see Interrupt Attributes above */
365         u16 drive_strength;                       365         u16 drive_strength;
366         u16 debounce_timeout;                     366         u16 debounce_timeout;
367         u16 pin_table_length;                     367         u16 pin_table_length;
368         u16 vendor_length;                        368         u16 vendor_length;
369         struct acpi_resource_source resource_s    369         struct acpi_resource_source resource_source;
370         u16 *pin_table;                           370         u16 *pin_table;
371         u8 *vendor_data;                          371         u8 *vendor_data;
372 };                                                372 };
373                                                   373 
374 /* Values for GPIO connection_type field above    374 /* Values for GPIO connection_type field above */
375                                                   375 
376 #define ACPI_RESOURCE_GPIO_TYPE_INT               376 #define ACPI_RESOURCE_GPIO_TYPE_INT             0
377 #define ACPI_RESOURCE_GPIO_TYPE_IO                377 #define ACPI_RESOURCE_GPIO_TYPE_IO              1
378                                                   378 
379 /* Values for pin_config field above */           379 /* Values for pin_config field above */
380                                                   380 
381 #define ACPI_PIN_CONFIG_DEFAULT                   381 #define ACPI_PIN_CONFIG_DEFAULT                 0
382 #define ACPI_PIN_CONFIG_PULLUP                    382 #define ACPI_PIN_CONFIG_PULLUP                  1
383 #define ACPI_PIN_CONFIG_PULLDOWN                  383 #define ACPI_PIN_CONFIG_PULLDOWN                2
384 #define ACPI_PIN_CONFIG_NOPULL                    384 #define ACPI_PIN_CONFIG_NOPULL                  3
385                                                   385 
386 /* Values for io_restriction field above */       386 /* Values for io_restriction field above */
387                                                   387 
388 #define ACPI_IO_RESTRICT_NONE                     388 #define ACPI_IO_RESTRICT_NONE                   0
389 #define ACPI_IO_RESTRICT_INPUT                    389 #define ACPI_IO_RESTRICT_INPUT                  1
390 #define ACPI_IO_RESTRICT_OUTPUT                   390 #define ACPI_IO_RESTRICT_OUTPUT                 2
391 #define ACPI_IO_RESTRICT_NONE_PRESERVE            391 #define ACPI_IO_RESTRICT_NONE_PRESERVE          3
392                                                   392 
393 /* Common structure for I2C, SPI, UART, CSI2 s    393 /* Common structure for I2C, SPI, UART, CSI2 serial descriptors */
394                                                   394 
395 #define ACPI_RESOURCE_SERIAL_COMMON \             395 #define ACPI_RESOURCE_SERIAL_COMMON \
396         u8                                        396         u8                                      revision_id; \
397         u8                                        397         u8                                      type; \
398         u8                                        398         u8                                      producer_consumer;   /* For values, see Producer/Consumer above */\
399         u8                                        399         u8                                      slave_mode; \
400         u8                                        400         u8                                      connection_sharing; \
401         u8                                        401         u8                                      type_revision_id; \
402         u16                                       402         u16                                     type_data_length; \
403         u16                                       403         u16                                     vendor_length; \
404         struct acpi_resource_source               404         struct acpi_resource_source             resource_source; \
405         u8                                        405         u8                                      *vendor_data;
406                                                   406 
407 struct acpi_resource_common_serialbus {           407 struct acpi_resource_common_serialbus {
408 ACPI_RESOURCE_SERIAL_COMMON};                     408 ACPI_RESOURCE_SERIAL_COMMON};
409                                                   409 
410 /* Values for the Type field above */             410 /* Values for the Type field above */
411                                                   411 
412 #define ACPI_RESOURCE_SERIAL_TYPE_I2C             412 #define ACPI_RESOURCE_SERIAL_TYPE_I2C           1
413 #define ACPI_RESOURCE_SERIAL_TYPE_SPI             413 #define ACPI_RESOURCE_SERIAL_TYPE_SPI           2
414 #define ACPI_RESOURCE_SERIAL_TYPE_UART            414 #define ACPI_RESOURCE_SERIAL_TYPE_UART          3
415 #define ACPI_RESOURCE_SERIAL_TYPE_CSI2            415 #define ACPI_RESOURCE_SERIAL_TYPE_CSI2          4
416                                                   416 
417 /* Values for slave_mode field above */           417 /* Values for slave_mode field above */
418                                                   418 
419 #define ACPI_CONTROLLER_INITIATED                 419 #define ACPI_CONTROLLER_INITIATED               0
420 #define ACPI_DEVICE_INITIATED                     420 #define ACPI_DEVICE_INITIATED                   1
421                                                   421 
422 struct acpi_resource_i2c_serialbus {              422 struct acpi_resource_i2c_serialbus {
423         ACPI_RESOURCE_SERIAL_COMMON u8 access_    423         ACPI_RESOURCE_SERIAL_COMMON u8 access_mode;
424         u16 slave_address;                        424         u16 slave_address;
425         u32 connection_speed;                     425         u32 connection_speed;
426 };                                                426 };
427                                                   427 
428 /* Values for access_mode field above */          428 /* Values for access_mode field above */
429                                                   429 
430 #define ACPI_I2C_7BIT_MODE                        430 #define ACPI_I2C_7BIT_MODE                      0
431 #define ACPI_I2C_10BIT_MODE                       431 #define ACPI_I2C_10BIT_MODE                     1
432                                                   432 
433 struct acpi_resource_spi_serialbus {              433 struct acpi_resource_spi_serialbus {
434         ACPI_RESOURCE_SERIAL_COMMON u8 wire_mo    434         ACPI_RESOURCE_SERIAL_COMMON u8 wire_mode;
435         u8 device_polarity;                       435         u8 device_polarity;
436         u8 data_bit_length;                       436         u8 data_bit_length;
437         u8 clock_phase;                           437         u8 clock_phase;
438         u8 clock_polarity;                        438         u8 clock_polarity;
439         u16 device_selection;                     439         u16 device_selection;
440         u32 connection_speed;                     440         u32 connection_speed;
441 };                                                441 };
442                                                   442 
443 /* Values for wire_mode field above */            443 /* Values for wire_mode field above */
444                                                   444 
445 #define ACPI_SPI_4WIRE_MODE                       445 #define ACPI_SPI_4WIRE_MODE                     0
446 #define ACPI_SPI_3WIRE_MODE                       446 #define ACPI_SPI_3WIRE_MODE                     1
447                                                   447 
448 /* Values for device_polarity field above */      448 /* Values for device_polarity field above */
449                                                   449 
450 #define ACPI_SPI_ACTIVE_LOW                       450 #define ACPI_SPI_ACTIVE_LOW                     0
451 #define ACPI_SPI_ACTIVE_HIGH                      451 #define ACPI_SPI_ACTIVE_HIGH                    1
452                                                   452 
453 /* Values for clock_phase field above */          453 /* Values for clock_phase field above */
454                                                   454 
455 #define ACPI_SPI_FIRST_PHASE                      455 #define ACPI_SPI_FIRST_PHASE                    0
456 #define ACPI_SPI_SECOND_PHASE                     456 #define ACPI_SPI_SECOND_PHASE                   1
457                                                   457 
458 /* Values for clock_polarity field above */       458 /* Values for clock_polarity field above */
459                                                   459 
460 #define ACPI_SPI_START_LOW                        460 #define ACPI_SPI_START_LOW                      0
461 #define ACPI_SPI_START_HIGH                       461 #define ACPI_SPI_START_HIGH                     1
462                                                   462 
463 struct acpi_resource_uart_serialbus {             463 struct acpi_resource_uart_serialbus {
464         ACPI_RESOURCE_SERIAL_COMMON u8 endian;    464         ACPI_RESOURCE_SERIAL_COMMON u8 endian;
465         u8 data_bits;                             465         u8 data_bits;
466         u8 stop_bits;                             466         u8 stop_bits;
467         u8 flow_control;                          467         u8 flow_control;
468         u8 parity;                                468         u8 parity;
469         u8 lines_enabled;                         469         u8 lines_enabled;
470         u16 rx_fifo_size;                         470         u16 rx_fifo_size;
471         u16 tx_fifo_size;                         471         u16 tx_fifo_size;
472         u32 default_baud_rate;                    472         u32 default_baud_rate;
473 };                                                473 };
474                                                   474 
475 /* Values for Endian field above */               475 /* Values for Endian field above */
476                                                   476 
477 #define ACPI_UART_LITTLE_ENDIAN                   477 #define ACPI_UART_LITTLE_ENDIAN                 0
478 #define ACPI_UART_BIG_ENDIAN                      478 #define ACPI_UART_BIG_ENDIAN                    1
479                                                   479 
480 /* Values for data_bits field above */            480 /* Values for data_bits field above */
481                                                   481 
482 #define ACPI_UART_5_DATA_BITS                     482 #define ACPI_UART_5_DATA_BITS                   0
483 #define ACPI_UART_6_DATA_BITS                     483 #define ACPI_UART_6_DATA_BITS                   1
484 #define ACPI_UART_7_DATA_BITS                     484 #define ACPI_UART_7_DATA_BITS                   2
485 #define ACPI_UART_8_DATA_BITS                     485 #define ACPI_UART_8_DATA_BITS                   3
486 #define ACPI_UART_9_DATA_BITS                     486 #define ACPI_UART_9_DATA_BITS                   4
487                                                   487 
488 /* Values for stop_bits field above */            488 /* Values for stop_bits field above */
489                                                   489 
490 #define ACPI_UART_NO_STOP_BITS                    490 #define ACPI_UART_NO_STOP_BITS                  0
491 #define ACPI_UART_1_STOP_BIT                      491 #define ACPI_UART_1_STOP_BIT                    1
492 #define ACPI_UART_1P5_STOP_BITS                   492 #define ACPI_UART_1P5_STOP_BITS                 2
493 #define ACPI_UART_2_STOP_BITS                     493 #define ACPI_UART_2_STOP_BITS                   3
494                                                   494 
495 /* Values for flow_control field above */         495 /* Values for flow_control field above */
496                                                   496 
497 #define ACPI_UART_FLOW_CONTROL_NONE               497 #define ACPI_UART_FLOW_CONTROL_NONE             0
498 #define ACPI_UART_FLOW_CONTROL_HW                 498 #define ACPI_UART_FLOW_CONTROL_HW               1
499 #define ACPI_UART_FLOW_CONTROL_XON_XOFF           499 #define ACPI_UART_FLOW_CONTROL_XON_XOFF         2
500                                                   500 
501 /* Values for Parity field above */               501 /* Values for Parity field above */
502                                                   502 
503 #define ACPI_UART_PARITY_NONE                     503 #define ACPI_UART_PARITY_NONE                   0
504 #define ACPI_UART_PARITY_EVEN                     504 #define ACPI_UART_PARITY_EVEN                   1
505 #define ACPI_UART_PARITY_ODD                      505 #define ACPI_UART_PARITY_ODD                    2
506 #define ACPI_UART_PARITY_MARK                     506 #define ACPI_UART_PARITY_MARK                   3
507 #define ACPI_UART_PARITY_SPACE                    507 #define ACPI_UART_PARITY_SPACE                  4
508                                                   508 
509 /* Values for lines_enabled bitfield above */     509 /* Values for lines_enabled bitfield above */
510                                                   510 
511 #define ACPI_UART_CARRIER_DETECT                  511 #define ACPI_UART_CARRIER_DETECT                (1<<2)
512 #define ACPI_UART_RING_INDICATOR                  512 #define ACPI_UART_RING_INDICATOR                (1<<3)
513 #define ACPI_UART_DATA_SET_READY                  513 #define ACPI_UART_DATA_SET_READY                (1<<4)
514 #define ACPI_UART_DATA_TERMINAL_READY             514 #define ACPI_UART_DATA_TERMINAL_READY           (1<<5)
515 #define ACPI_UART_CLEAR_TO_SEND                   515 #define ACPI_UART_CLEAR_TO_SEND                 (1<<6)
516 #define ACPI_UART_REQUEST_TO_SEND                 516 #define ACPI_UART_REQUEST_TO_SEND               (1<<7)
517                                                   517 
518 struct acpi_resource_csi2_serialbus {             518 struct acpi_resource_csi2_serialbus {
519         ACPI_RESOURCE_SERIAL_COMMON u8 local_p    519         ACPI_RESOURCE_SERIAL_COMMON u8 local_port_instance;
520         u8 phy_type;                              520         u8 phy_type;
521 };                                                521 };
522                                                   522 
523 struct acpi_resource_pin_function {               523 struct acpi_resource_pin_function {
524         u8 revision_id;                           524         u8 revision_id;
525         u8 pin_config;                            525         u8 pin_config;
526         u8 shareable;           /* For values,    526         u8 shareable;           /* For values, see Interrupt Attributes above */
527         u16 function_number;                      527         u16 function_number;
528         u16 pin_table_length;                     528         u16 pin_table_length;
529         u16 vendor_length;                        529         u16 vendor_length;
530         struct acpi_resource_source resource_s    530         struct acpi_resource_source resource_source;
531         u16 *pin_table;                           531         u16 *pin_table;
532         u8 *vendor_data;                          532         u8 *vendor_data;
533 };                                                533 };
534                                                   534 
535 struct acpi_resource_pin_config {                 535 struct acpi_resource_pin_config {
536         u8 revision_id;                           536         u8 revision_id;
537         u8 producer_consumer;   /* For values,    537         u8 producer_consumer;   /* For values, see Producer/Consumer above */
538         u8 shareable;           /* For values,    538         u8 shareable;           /* For values, see Interrupt Attributes above */
539         u8 pin_config_type;                       539         u8 pin_config_type;
540         u32 pin_config_value;                     540         u32 pin_config_value;
541         u16 pin_table_length;                     541         u16 pin_table_length;
542         u16 vendor_length;                        542         u16 vendor_length;
543         struct acpi_resource_source resource_s    543         struct acpi_resource_source resource_source;
544         u16 *pin_table;                           544         u16 *pin_table;
545         u8 *vendor_data;                          545         u8 *vendor_data;
546 };                                                546 };
547                                                   547 
548 struct acpi_resource_clock_input {                548 struct acpi_resource_clock_input {
549         u8 revision_id;                           549         u8 revision_id;
550         u8 mode;                                  550         u8 mode;
551         u8 scale;                                 551         u8 scale;
552         u16 frequency_divisor;                    552         u16 frequency_divisor;
553         u32 frequency_numerator;                  553         u32 frequency_numerator;
554         struct acpi_resource_source resource_s    554         struct acpi_resource_source resource_source;
555 };                                                555 };
556                                                   556 
557 /* Values for pin_config_type field above */      557 /* Values for pin_config_type field above */
558                                                   558 
559 #define ACPI_PIN_CONFIG_DEFAULT                   559 #define ACPI_PIN_CONFIG_DEFAULT                 0
560 #define ACPI_PIN_CONFIG_BIAS_PULL_UP              560 #define ACPI_PIN_CONFIG_BIAS_PULL_UP            1
561 #define ACPI_PIN_CONFIG_BIAS_PULL_DOWN            561 #define ACPI_PIN_CONFIG_BIAS_PULL_DOWN          2
562 #define ACPI_PIN_CONFIG_BIAS_DEFAULT              562 #define ACPI_PIN_CONFIG_BIAS_DEFAULT            3
563 #define ACPI_PIN_CONFIG_BIAS_DISABLE              563 #define ACPI_PIN_CONFIG_BIAS_DISABLE            4
564 #define ACPI_PIN_CONFIG_BIAS_HIGH_IMPEDANCE       564 #define ACPI_PIN_CONFIG_BIAS_HIGH_IMPEDANCE     5
565 #define ACPI_PIN_CONFIG_BIAS_BUS_HOLD             565 #define ACPI_PIN_CONFIG_BIAS_BUS_HOLD           6
566 #define ACPI_PIN_CONFIG_DRIVE_OPEN_DRAIN          566 #define ACPI_PIN_CONFIG_DRIVE_OPEN_DRAIN        7
567 #define ACPI_PIN_CONFIG_DRIVE_OPEN_SOURCE         567 #define ACPI_PIN_CONFIG_DRIVE_OPEN_SOURCE       8
568 #define ACPI_PIN_CONFIG_DRIVE_PUSH_PULL           568 #define ACPI_PIN_CONFIG_DRIVE_PUSH_PULL         9
569 #define ACPI_PIN_CONFIG_DRIVE_STRENGTH            569 #define ACPI_PIN_CONFIG_DRIVE_STRENGTH          10
570 #define ACPI_PIN_CONFIG_SLEW_RATE                 570 #define ACPI_PIN_CONFIG_SLEW_RATE               11
571 #define ACPI_PIN_CONFIG_INPUT_DEBOUNCE            571 #define ACPI_PIN_CONFIG_INPUT_DEBOUNCE          12
572 #define ACPI_PIN_CONFIG_INPUT_SCHMITT_TRIGGER     572 #define ACPI_PIN_CONFIG_INPUT_SCHMITT_TRIGGER   13
573                                                   573 
574 struct acpi_resource_pin_group {                  574 struct acpi_resource_pin_group {
575         u8 revision_id;                           575         u8 revision_id;
576         u8 producer_consumer;   /* For values,    576         u8 producer_consumer;   /* For values, see Producer/Consumer above */
577         u16 pin_table_length;                     577         u16 pin_table_length;
578         u16 vendor_length;                        578         u16 vendor_length;
579         u16 *pin_table;                           579         u16 *pin_table;
580         struct acpi_resource_label resource_la    580         struct acpi_resource_label resource_label;
581         u8 *vendor_data;                          581         u8 *vendor_data;
582 };                                                582 };
583                                                   583 
584 struct acpi_resource_pin_group_function {         584 struct acpi_resource_pin_group_function {
585         u8 revision_id;                           585         u8 revision_id;
586         u8 producer_consumer;   /* For values,    586         u8 producer_consumer;   /* For values, see Producer/Consumer above */
587         u8 shareable;           /* For values,    587         u8 shareable;           /* For values, see Interrupt Attributes above */
588         u16 function_number;                      588         u16 function_number;
589         u16 vendor_length;                        589         u16 vendor_length;
590         struct acpi_resource_source resource_s    590         struct acpi_resource_source resource_source;
591         struct acpi_resource_label resource_so    591         struct acpi_resource_label resource_source_label;
592         u8 *vendor_data;                          592         u8 *vendor_data;
593 };                                                593 };
594                                                   594 
595 struct acpi_resource_pin_group_config {           595 struct acpi_resource_pin_group_config {
596         u8 revision_id;                           596         u8 revision_id;
597         u8 producer_consumer;   /* For values,    597         u8 producer_consumer;   /* For values, see Producer/Consumer above */
598         u8 shareable;           /* For values,    598         u8 shareable;           /* For values, see Interrupt Attributes above */
599         u8 pin_config_type;     /* For values,    599         u8 pin_config_type;     /* For values, see pin_config_type above */
600         u32 pin_config_value;                     600         u32 pin_config_value;
601         u16 vendor_length;                        601         u16 vendor_length;
602         struct acpi_resource_source resource_s    602         struct acpi_resource_source resource_source;
603         struct acpi_resource_label resource_so    603         struct acpi_resource_label resource_source_label;
604         u8 *vendor_data;                          604         u8 *vendor_data;
605 };                                                605 };
606                                                   606 
607 /* ACPI_RESOURCE_TYPEs */                         607 /* ACPI_RESOURCE_TYPEs */
608                                                   608 
609 #define ACPI_RESOURCE_TYPE_IRQ                    609 #define ACPI_RESOURCE_TYPE_IRQ                  0
610 #define ACPI_RESOURCE_TYPE_DMA                    610 #define ACPI_RESOURCE_TYPE_DMA                  1
611 #define ACPI_RESOURCE_TYPE_START_DEPENDENT        611 #define ACPI_RESOURCE_TYPE_START_DEPENDENT      2
612 #define ACPI_RESOURCE_TYPE_END_DEPENDENT          612 #define ACPI_RESOURCE_TYPE_END_DEPENDENT        3
613 #define ACPI_RESOURCE_TYPE_IO                     613 #define ACPI_RESOURCE_TYPE_IO                   4
614 #define ACPI_RESOURCE_TYPE_FIXED_IO               614 #define ACPI_RESOURCE_TYPE_FIXED_IO             5
615 #define ACPI_RESOURCE_TYPE_VENDOR                 615 #define ACPI_RESOURCE_TYPE_VENDOR               6
616 #define ACPI_RESOURCE_TYPE_END_TAG                616 #define ACPI_RESOURCE_TYPE_END_TAG              7
617 #define ACPI_RESOURCE_TYPE_MEMORY24               617 #define ACPI_RESOURCE_TYPE_MEMORY24             8
618 #define ACPI_RESOURCE_TYPE_MEMORY32               618 #define ACPI_RESOURCE_TYPE_MEMORY32             9
619 #define ACPI_RESOURCE_TYPE_FIXED_MEMORY32         619 #define ACPI_RESOURCE_TYPE_FIXED_MEMORY32       10
620 #define ACPI_RESOURCE_TYPE_ADDRESS16              620 #define ACPI_RESOURCE_TYPE_ADDRESS16            11
621 #define ACPI_RESOURCE_TYPE_ADDRESS32              621 #define ACPI_RESOURCE_TYPE_ADDRESS32            12
622 #define ACPI_RESOURCE_TYPE_ADDRESS64              622 #define ACPI_RESOURCE_TYPE_ADDRESS64            13
623 #define ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64     623 #define ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64   14      /* ACPI 3.0 */
624 #define ACPI_RESOURCE_TYPE_EXTENDED_IRQ           624 #define ACPI_RESOURCE_TYPE_EXTENDED_IRQ         15
625 #define ACPI_RESOURCE_TYPE_GENERIC_REGISTER       625 #define ACPI_RESOURCE_TYPE_GENERIC_REGISTER     16
626 #define ACPI_RESOURCE_TYPE_GPIO                   626 #define ACPI_RESOURCE_TYPE_GPIO                 17      /* ACPI 5.0 */
627 #define ACPI_RESOURCE_TYPE_FIXED_DMA              627 #define ACPI_RESOURCE_TYPE_FIXED_DMA            18      /* ACPI 5.0 */
628 #define ACPI_RESOURCE_TYPE_SERIAL_BUS             628 #define ACPI_RESOURCE_TYPE_SERIAL_BUS           19      /* ACPI 5.0 */
629 #define ACPI_RESOURCE_TYPE_PIN_FUNCTION           629 #define ACPI_RESOURCE_TYPE_PIN_FUNCTION         20      /* ACPI 6.2 */
630 #define ACPI_RESOURCE_TYPE_PIN_CONFIG             630 #define ACPI_RESOURCE_TYPE_PIN_CONFIG           21      /* ACPI 6.2 */
631 #define ACPI_RESOURCE_TYPE_PIN_GROUP              631 #define ACPI_RESOURCE_TYPE_PIN_GROUP            22      /* ACPI 6.2 */
632 #define ACPI_RESOURCE_TYPE_PIN_GROUP_FUNCTION     632 #define ACPI_RESOURCE_TYPE_PIN_GROUP_FUNCTION   23      /* ACPI 6.2 */
633 #define ACPI_RESOURCE_TYPE_PIN_GROUP_CONFIG       633 #define ACPI_RESOURCE_TYPE_PIN_GROUP_CONFIG     24      /* ACPI 6.2 */
634 #define ACPI_RESOURCE_TYPE_CLOCK_INPUT            634 #define ACPI_RESOURCE_TYPE_CLOCK_INPUT          25      /* ACPI 6.5 */
635 #define ACPI_RESOURCE_TYPE_MAX                    635 #define ACPI_RESOURCE_TYPE_MAX                  25
636                                                   636 
637 /* Master union for resource descriptors */       637 /* Master union for resource descriptors */
638                                                   638 
639 union acpi_resource_data {                        639 union acpi_resource_data {
640         struct acpi_resource_irq irq;             640         struct acpi_resource_irq irq;
641         struct acpi_resource_dma dma;             641         struct acpi_resource_dma dma;
642         struct acpi_resource_start_dependent s    642         struct acpi_resource_start_dependent start_dpf;
643         struct acpi_resource_io io;               643         struct acpi_resource_io io;
644         struct acpi_resource_fixed_io fixed_io    644         struct acpi_resource_fixed_io fixed_io;
645         struct acpi_resource_fixed_dma fixed_d    645         struct acpi_resource_fixed_dma fixed_dma;
646         struct acpi_resource_vendor vendor;       646         struct acpi_resource_vendor vendor;
647         struct acpi_resource_vendor_typed vend    647         struct acpi_resource_vendor_typed vendor_typed;
648         struct acpi_resource_end_tag end_tag;     648         struct acpi_resource_end_tag end_tag;
649         struct acpi_resource_memory24 memory24    649         struct acpi_resource_memory24 memory24;
650         struct acpi_resource_memory32 memory32    650         struct acpi_resource_memory32 memory32;
651         struct acpi_resource_fixed_memory32 fi    651         struct acpi_resource_fixed_memory32 fixed_memory32;
652         struct acpi_resource_address16 address    652         struct acpi_resource_address16 address16;
653         struct acpi_resource_address32 address    653         struct acpi_resource_address32 address32;
654         struct acpi_resource_address64 address    654         struct acpi_resource_address64 address64;
655         struct acpi_resource_extended_address6    655         struct acpi_resource_extended_address64 ext_address64;
656         struct acpi_resource_extended_irq exte    656         struct acpi_resource_extended_irq extended_irq;
657         struct acpi_resource_generic_register     657         struct acpi_resource_generic_register generic_reg;
658         struct acpi_resource_gpio gpio;           658         struct acpi_resource_gpio gpio;
659         struct acpi_resource_i2c_serialbus i2c    659         struct acpi_resource_i2c_serialbus i2c_serial_bus;
660         struct acpi_resource_spi_serialbus spi    660         struct acpi_resource_spi_serialbus spi_serial_bus;
661         struct acpi_resource_uart_serialbus ua    661         struct acpi_resource_uart_serialbus uart_serial_bus;
662         struct acpi_resource_csi2_serialbus cs    662         struct acpi_resource_csi2_serialbus csi2_serial_bus;
663         struct acpi_resource_common_serialbus     663         struct acpi_resource_common_serialbus common_serial_bus;
664         struct acpi_resource_pin_function pin_    664         struct acpi_resource_pin_function pin_function;
665         struct acpi_resource_pin_config pin_co    665         struct acpi_resource_pin_config pin_config;
666         struct acpi_resource_pin_group pin_gro    666         struct acpi_resource_pin_group pin_group;
667         struct acpi_resource_pin_group_functio    667         struct acpi_resource_pin_group_function pin_group_function;
668         struct acpi_resource_pin_group_config     668         struct acpi_resource_pin_group_config pin_group_config;
669         struct acpi_resource_clock_input clock    669         struct acpi_resource_clock_input clock_input;
670                                                   670 
671         /* Common fields */                       671         /* Common fields */
672                                                   672 
673         struct acpi_resource_address address;     673         struct acpi_resource_address address;   /* Common 16/32/64 address fields */
674 };                                                674 };
675                                                   675 
676 /* Common resource header */                      676 /* Common resource header */
677                                                   677 
678 struct acpi_resource {                            678 struct acpi_resource {
679         u32 type;                                 679         u32 type;
680         u32 length;                               680         u32 length;
681         union acpi_resource_data data;            681         union acpi_resource_data data;
682 };                                                682 };
683                                                   683 
684 /* restore default alignment */                   684 /* restore default alignment */
685                                                   685 
686 #pragma pack()                                    686 #pragma pack()
687                                                   687 
688 #define ACPI_RS_SIZE_NO_DATA                8     688 #define ACPI_RS_SIZE_NO_DATA                8   /* Id + Length fields */
689 #define ACPI_RS_SIZE_MIN                    (u    689 #define ACPI_RS_SIZE_MIN                    (u32) ACPI_ROUND_UP_TO_NATIVE_WORD (12)
690 #define ACPI_RS_SIZE(type)                  (u    690 #define ACPI_RS_SIZE(type)                  (u32) (ACPI_RS_SIZE_NO_DATA + sizeof (type))
691                                                   691 
692 /* Macro for walking resource templates with m    692 /* Macro for walking resource templates with multiple descriptors */
693                                                   693 
694 #define ACPI_NEXT_RESOURCE(res) \                 694 #define ACPI_NEXT_RESOURCE(res) \
695         ACPI_ADD_PTR (struct acpi_resource, (r    695         ACPI_ADD_PTR (struct acpi_resource, (res), (res)->length)
696                                                   696 
697 struct acpi_pci_routing_table {                   697 struct acpi_pci_routing_table {
698         u32 length;                               698         u32 length;
699         u32 pin;                                  699         u32 pin;
700         u64 address;            /* here for 64    700         u64 address;            /* here for 64-bit alignment */
701         u32 source_index;                         701         u32 source_index;
702         union {                                   702         union {
703                 char pad[4];    /* pad to 64 b    703                 char pad[4];    /* pad to 64 bits so sizeof() works in all cases */
704                  ACPI_FLEX_ARRAY(char, source)    704                  ACPI_FLEX_ARRAY(char, source);
705         };                                        705         };
706 };                                                706 };
707                                                   707 
708 #endif                          /* __ACRESTYP_    708 #endif                          /* __ACRESTYP_H__ */
709                                                   709 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php