rsserial.c revision 1.1.1.4 1 1.1 christos /*******************************************************************************
2 1.1 christos *
3 1.1 christos * Module Name: rsserial - GPIO/SerialBus resource descriptors
4 1.1 christos *
5 1.1 christos ******************************************************************************/
6 1.1 christos
7 1.1 christos /*
8 1.1.1.4 christos * Copyright (C) 2000 - 2016, Intel Corp.
9 1.1 christos * All rights reserved.
10 1.1 christos *
11 1.1 christos * Redistribution and use in source and binary forms, with or without
12 1.1 christos * modification, are permitted provided that the following conditions
13 1.1 christos * are met:
14 1.1 christos * 1. Redistributions of source code must retain the above copyright
15 1.1 christos * notice, this list of conditions, and the following disclaimer,
16 1.1 christos * without modification.
17 1.1 christos * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 1.1 christos * substantially similar to the "NO WARRANTY" disclaimer below
19 1.1 christos * ("Disclaimer") and any redistribution must be conditioned upon
20 1.1 christos * including a substantially similar Disclaimer requirement for further
21 1.1 christos * binary redistribution.
22 1.1 christos * 3. Neither the names of the above-listed copyright holders nor the names
23 1.1 christos * of any contributors may be used to endorse or promote products derived
24 1.1 christos * from this software without specific prior written permission.
25 1.1 christos *
26 1.1 christos * Alternatively, this software may be distributed under the terms of the
27 1.1 christos * GNU General Public License ("GPL") version 2 as published by the Free
28 1.1 christos * Software Foundation.
29 1.1 christos *
30 1.1 christos * NO WARRANTY
31 1.1 christos * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 1.1 christos * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 1.1 christos * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34 1.1 christos * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 1.1 christos * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 1.1 christos * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 1.1 christos * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 1.1 christos * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 1.1 christos * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 1.1 christos * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 1.1 christos * POSSIBILITY OF SUCH DAMAGES.
42 1.1 christos */
43 1.1 christos
44 1.1 christos #include "acpi.h"
45 1.1 christos #include "accommon.h"
46 1.1 christos #include "acresrc.h"
47 1.1 christos
48 1.1 christos #define _COMPONENT ACPI_RESOURCES
49 1.1 christos ACPI_MODULE_NAME ("rsserial")
50 1.1 christos
51 1.1 christos
52 1.1 christos /*******************************************************************************
53 1.1 christos *
54 1.1 christos * AcpiRsConvertGpio
55 1.1 christos *
56 1.1 christos ******************************************************************************/
57 1.1 christos
58 1.1 christos ACPI_RSCONVERT_INFO AcpiRsConvertGpio[18] =
59 1.1 christos {
60 1.1 christos {ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_GPIO,
61 1.1 christos ACPI_RS_SIZE (ACPI_RESOURCE_GPIO),
62 1.1 christos ACPI_RSC_TABLE_SIZE (AcpiRsConvertGpio)},
63 1.1 christos
64 1.1 christos {ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_GPIO,
65 1.1 christos sizeof (AML_RESOURCE_GPIO),
66 1.1 christos 0},
67 1.1 christos
68 1.1 christos /*
69 1.1 christos * These fields are contiguous in both the source and destination:
70 1.1 christos * RevisionId
71 1.1 christos * ConnectionType
72 1.1 christos */
73 1.1 christos {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.Gpio.RevisionId),
74 1.1 christos AML_OFFSET (Gpio.RevisionId),
75 1.1 christos 2},
76 1.1 christos
77 1.1 christos {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.Gpio.ProducerConsumer),
78 1.1 christos AML_OFFSET (Gpio.Flags),
79 1.1 christos 0},
80 1.1 christos
81 1.1 christos {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.Gpio.Sharable),
82 1.1 christos AML_OFFSET (Gpio.IntFlags),
83 1.1 christos 3},
84 1.1 christos
85 1.1 christos {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.Gpio.WakeCapable),
86 1.1 christos AML_OFFSET (Gpio.IntFlags),
87 1.1 christos 4},
88 1.1 christos
89 1.1 christos {ACPI_RSC_2BITFLAG, ACPI_RS_OFFSET (Data.Gpio.IoRestriction),
90 1.1 christos AML_OFFSET (Gpio.IntFlags),
91 1.1 christos 0},
92 1.1 christos
93 1.1 christos {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.Gpio.Triggering),
94 1.1 christos AML_OFFSET (Gpio.IntFlags),
95 1.1 christos 0},
96 1.1 christos
97 1.1 christos {ACPI_RSC_2BITFLAG, ACPI_RS_OFFSET (Data.Gpio.Polarity),
98 1.1 christos AML_OFFSET (Gpio.IntFlags),
99 1.1 christos 1},
100 1.1 christos
101 1.1 christos {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.Gpio.PinConfig),
102 1.1 christos AML_OFFSET (Gpio.PinConfig),
103 1.1 christos 1},
104 1.1 christos
105 1.1 christos /*
106 1.1 christos * These fields are contiguous in both the source and destination:
107 1.1 christos * DriveStrength
108 1.1 christos * DebounceTimeout
109 1.1 christos */
110 1.1 christos {ACPI_RSC_MOVE16, ACPI_RS_OFFSET (Data.Gpio.DriveStrength),
111 1.1 christos AML_OFFSET (Gpio.DriveStrength),
112 1.1 christos 2},
113 1.1 christos
114 1.1 christos /* Pin Table */
115 1.1 christos
116 1.1 christos {ACPI_RSC_COUNT_GPIO_PIN, ACPI_RS_OFFSET (Data.Gpio.PinTableLength),
117 1.1 christos AML_OFFSET (Gpio.PinTableOffset),
118 1.1 christos AML_OFFSET (Gpio.ResSourceOffset)},
119 1.1 christos
120 1.1 christos {ACPI_RSC_MOVE_GPIO_PIN, ACPI_RS_OFFSET (Data.Gpio.PinTable),
121 1.1 christos AML_OFFSET (Gpio.PinTableOffset),
122 1.1 christos 0},
123 1.1 christos
124 1.1 christos /* Resource Source */
125 1.1 christos
126 1.1 christos {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.Gpio.ResourceSource.Index),
127 1.1 christos AML_OFFSET (Gpio.ResSourceIndex),
128 1.1 christos 1},
129 1.1 christos
130 1.1 christos {ACPI_RSC_COUNT_GPIO_RES, ACPI_RS_OFFSET (Data.Gpio.ResourceSource.StringLength),
131 1.1 christos AML_OFFSET (Gpio.ResSourceOffset),
132 1.1 christos AML_OFFSET (Gpio.VendorOffset)},
133 1.1 christos
134 1.1 christos {ACPI_RSC_MOVE_GPIO_RES, ACPI_RS_OFFSET (Data.Gpio.ResourceSource.StringPtr),
135 1.1 christos AML_OFFSET (Gpio.ResSourceOffset),
136 1.1 christos 0},
137 1.1 christos
138 1.1 christos /* Vendor Data */
139 1.1 christos
140 1.1 christos {ACPI_RSC_COUNT_GPIO_VEN, ACPI_RS_OFFSET (Data.Gpio.VendorLength),
141 1.1 christos AML_OFFSET (Gpio.VendorLength),
142 1.1 christos 1},
143 1.1 christos
144 1.1 christos {ACPI_RSC_MOVE_GPIO_RES, ACPI_RS_OFFSET (Data.Gpio.VendorData),
145 1.1 christos AML_OFFSET (Gpio.VendorOffset),
146 1.1 christos 0},
147 1.1 christos };
148 1.1 christos
149 1.1 christos
150 1.1 christos /*******************************************************************************
151 1.1 christos *
152 1.1 christos * AcpiRsConvertI2cSerialBus
153 1.1 christos *
154 1.1 christos ******************************************************************************/
155 1.1 christos
156 1.1 christos ACPI_RSCONVERT_INFO AcpiRsConvertI2cSerialBus[16] =
157 1.1 christos {
158 1.1 christos {ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_SERIAL_BUS,
159 1.1 christos ACPI_RS_SIZE (ACPI_RESOURCE_I2C_SERIALBUS),
160 1.1 christos ACPI_RSC_TABLE_SIZE (AcpiRsConvertI2cSerialBus)},
161 1.1 christos
162 1.1 christos {ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_SERIAL_BUS,
163 1.1 christos sizeof (AML_RESOURCE_I2C_SERIALBUS),
164 1.1 christos 0},
165 1.1 christos
166 1.1 christos {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.CommonSerialBus.RevisionId),
167 1.1 christos AML_OFFSET (CommonSerialBus.RevisionId),
168 1.1 christos 1},
169 1.1 christos
170 1.1 christos {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.CommonSerialBus.Type),
171 1.1 christos AML_OFFSET (CommonSerialBus.Type),
172 1.1 christos 1},
173 1.1 christos
174 1.1 christos {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.CommonSerialBus.SlaveMode),
175 1.1 christos AML_OFFSET (CommonSerialBus.Flags),
176 1.1 christos 0},
177 1.1 christos
178 1.1 christos {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.CommonSerialBus.ProducerConsumer),
179 1.1 christos AML_OFFSET (CommonSerialBus.Flags),
180 1.1 christos 1},
181 1.1 christos
182 1.1 christos {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.CommonSerialBus.TypeRevisionId),
183 1.1 christos AML_OFFSET (CommonSerialBus.TypeRevisionId),
184 1.1 christos 1},
185 1.1 christos
186 1.1 christos {ACPI_RSC_MOVE16, ACPI_RS_OFFSET (Data.CommonSerialBus.TypeDataLength),
187 1.1 christos AML_OFFSET (CommonSerialBus.TypeDataLength),
188 1.1 christos 1},
189 1.1 christos
190 1.1 christos /* Vendor data */
191 1.1 christos
192 1.1 christos {ACPI_RSC_COUNT_SERIAL_VEN, ACPI_RS_OFFSET (Data.CommonSerialBus.VendorLength),
193 1.1 christos AML_OFFSET (CommonSerialBus.TypeDataLength),
194 1.1 christos AML_RESOURCE_I2C_MIN_DATA_LEN},
195 1.1 christos
196 1.1 christos {ACPI_RSC_MOVE_SERIAL_VEN, ACPI_RS_OFFSET (Data.CommonSerialBus.VendorData),
197 1.1 christos 0,
198 1.1 christos sizeof (AML_RESOURCE_I2C_SERIALBUS)},
199 1.1 christos
200 1.1 christos /* Resource Source */
201 1.1 christos
202 1.1 christos {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.Index),
203 1.1 christos AML_OFFSET (CommonSerialBus.ResSourceIndex),
204 1.1 christos 1},
205 1.1 christos
206 1.1 christos {ACPI_RSC_COUNT_SERIAL_RES, ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.StringLength),
207 1.1 christos AML_OFFSET (CommonSerialBus.TypeDataLength),
208 1.1 christos sizeof (AML_RESOURCE_COMMON_SERIALBUS)},
209 1.1 christos
210 1.1 christos {ACPI_RSC_MOVE_SERIAL_RES, ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.StringPtr),
211 1.1 christos AML_OFFSET (CommonSerialBus.TypeDataLength),
212 1.1 christos sizeof (AML_RESOURCE_COMMON_SERIALBUS)},
213 1.1 christos
214 1.1 christos /* I2C bus type specific */
215 1.1 christos
216 1.1 christos {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.I2cSerialBus.AccessMode),
217 1.1 christos AML_OFFSET (I2cSerialBus.TypeSpecificFlags),
218 1.1 christos 0},
219 1.1 christos
220 1.1 christos {ACPI_RSC_MOVE32, ACPI_RS_OFFSET (Data.I2cSerialBus.ConnectionSpeed),
221 1.1 christos AML_OFFSET (I2cSerialBus.ConnectionSpeed),
222 1.1 christos 1},
223 1.1 christos
224 1.1 christos {ACPI_RSC_MOVE16, ACPI_RS_OFFSET (Data.I2cSerialBus.SlaveAddress),
225 1.1 christos AML_OFFSET (I2cSerialBus.SlaveAddress),
226 1.1 christos 1},
227 1.1 christos };
228 1.1 christos
229 1.1 christos
230 1.1 christos /*******************************************************************************
231 1.1 christos *
232 1.1 christos * AcpiRsConvertSpiSerialBus
233 1.1 christos *
234 1.1 christos ******************************************************************************/
235 1.1 christos
236 1.1 christos ACPI_RSCONVERT_INFO AcpiRsConvertSpiSerialBus[20] =
237 1.1 christos {
238 1.1 christos {ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_SERIAL_BUS,
239 1.1 christos ACPI_RS_SIZE (ACPI_RESOURCE_SPI_SERIALBUS),
240 1.1 christos ACPI_RSC_TABLE_SIZE (AcpiRsConvertSpiSerialBus)},
241 1.1 christos
242 1.1 christos {ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_SERIAL_BUS,
243 1.1 christos sizeof (AML_RESOURCE_SPI_SERIALBUS),
244 1.1 christos 0},
245 1.1 christos
246 1.1 christos {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.CommonSerialBus.RevisionId),
247 1.1 christos AML_OFFSET (CommonSerialBus.RevisionId),
248 1.1 christos 1},
249 1.1 christos
250 1.1 christos {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.CommonSerialBus.Type),
251 1.1 christos AML_OFFSET (CommonSerialBus.Type),
252 1.1 christos 1},
253 1.1 christos
254 1.1 christos {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.CommonSerialBus.SlaveMode),
255 1.1 christos AML_OFFSET (CommonSerialBus.Flags),
256 1.1 christos 0},
257 1.1 christos
258 1.1 christos {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.CommonSerialBus.ProducerConsumer),
259 1.1 christos AML_OFFSET (CommonSerialBus.Flags),
260 1.1 christos 1},
261 1.1 christos
262 1.1 christos {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.CommonSerialBus.TypeRevisionId),
263 1.1 christos AML_OFFSET (CommonSerialBus.TypeRevisionId),
264 1.1 christos 1},
265 1.1 christos
266 1.1 christos {ACPI_RSC_MOVE16, ACPI_RS_OFFSET (Data.CommonSerialBus.TypeDataLength),
267 1.1 christos AML_OFFSET (CommonSerialBus.TypeDataLength),
268 1.1 christos 1},
269 1.1 christos
270 1.1 christos /* Vendor data */
271 1.1 christos
272 1.1 christos {ACPI_RSC_COUNT_SERIAL_VEN, ACPI_RS_OFFSET (Data.CommonSerialBus.VendorLength),
273 1.1 christos AML_OFFSET (CommonSerialBus.TypeDataLength),
274 1.1 christos AML_RESOURCE_SPI_MIN_DATA_LEN},
275 1.1 christos
276 1.1 christos {ACPI_RSC_MOVE_SERIAL_VEN, ACPI_RS_OFFSET (Data.CommonSerialBus.VendorData),
277 1.1 christos 0,
278 1.1 christos sizeof (AML_RESOURCE_SPI_SERIALBUS)},
279 1.1 christos
280 1.1 christos /* Resource Source */
281 1.1 christos
282 1.1 christos {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.Index),
283 1.1 christos AML_OFFSET (CommonSerialBus.ResSourceIndex),
284 1.1 christos 1},
285 1.1 christos
286 1.1 christos {ACPI_RSC_COUNT_SERIAL_RES, ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.StringLength),
287 1.1 christos AML_OFFSET (CommonSerialBus.TypeDataLength),
288 1.1 christos sizeof (AML_RESOURCE_COMMON_SERIALBUS)},
289 1.1 christos
290 1.1 christos {ACPI_RSC_MOVE_SERIAL_RES, ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.StringPtr),
291 1.1 christos AML_OFFSET (CommonSerialBus.TypeDataLength),
292 1.1 christos sizeof (AML_RESOURCE_COMMON_SERIALBUS)},
293 1.1 christos
294 1.1 christos /* Spi bus type specific */
295 1.1 christos
296 1.1 christos {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.SpiSerialBus.WireMode),
297 1.1 christos AML_OFFSET (SpiSerialBus.TypeSpecificFlags),
298 1.1 christos 0},
299 1.1 christos
300 1.1 christos {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.SpiSerialBus.DevicePolarity),
301 1.1 christos AML_OFFSET (SpiSerialBus.TypeSpecificFlags),
302 1.1 christos 1},
303 1.1 christos
304 1.1 christos {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.SpiSerialBus.DataBitLength),
305 1.1 christos AML_OFFSET (SpiSerialBus.DataBitLength),
306 1.1 christos 1},
307 1.1 christos
308 1.1 christos {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.SpiSerialBus.ClockPhase),
309 1.1 christos AML_OFFSET (SpiSerialBus.ClockPhase),
310 1.1 christos 1},
311 1.1 christos
312 1.1 christos {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.SpiSerialBus.ClockPolarity),
313 1.1 christos AML_OFFSET (SpiSerialBus.ClockPolarity),
314 1.1 christos 1},
315 1.1 christos
316 1.1 christos {ACPI_RSC_MOVE16, ACPI_RS_OFFSET (Data.SpiSerialBus.DeviceSelection),
317 1.1 christos AML_OFFSET (SpiSerialBus.DeviceSelection),
318 1.1 christos 1},
319 1.1 christos
320 1.1 christos {ACPI_RSC_MOVE32, ACPI_RS_OFFSET (Data.SpiSerialBus.ConnectionSpeed),
321 1.1 christos AML_OFFSET (SpiSerialBus.ConnectionSpeed),
322 1.1 christos 1},
323 1.1 christos };
324 1.1 christos
325 1.1 christos
326 1.1 christos /*******************************************************************************
327 1.1 christos *
328 1.1 christos * AcpiRsConvertUartSerialBus
329 1.1 christos *
330 1.1 christos ******************************************************************************/
331 1.1 christos
332 1.1 christos ACPI_RSCONVERT_INFO AcpiRsConvertUartSerialBus[22] =
333 1.1 christos {
334 1.1 christos {ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_SERIAL_BUS,
335 1.1 christos ACPI_RS_SIZE (ACPI_RESOURCE_UART_SERIALBUS),
336 1.1 christos ACPI_RSC_TABLE_SIZE (AcpiRsConvertUartSerialBus)},
337 1.1 christos
338 1.1 christos {ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_SERIAL_BUS,
339 1.1 christos sizeof (AML_RESOURCE_UART_SERIALBUS),
340 1.1 christos 0},
341 1.1 christos
342 1.1 christos {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.CommonSerialBus.RevisionId),
343 1.1 christos AML_OFFSET (CommonSerialBus.RevisionId),
344 1.1 christos 1},
345 1.1 christos
346 1.1 christos {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.CommonSerialBus.Type),
347 1.1 christos AML_OFFSET (CommonSerialBus.Type),
348 1.1 christos 1},
349 1.1 christos
350 1.1 christos {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.CommonSerialBus.SlaveMode),
351 1.1 christos AML_OFFSET (CommonSerialBus.Flags),
352 1.1 christos 0},
353 1.1 christos
354 1.1 christos {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.CommonSerialBus.ProducerConsumer),
355 1.1 christos AML_OFFSET (CommonSerialBus.Flags),
356 1.1 christos 1},
357 1.1 christos
358 1.1 christos {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.CommonSerialBus.TypeRevisionId),
359 1.1 christos AML_OFFSET (CommonSerialBus.TypeRevisionId),
360 1.1 christos 1},
361 1.1 christos
362 1.1 christos {ACPI_RSC_MOVE16, ACPI_RS_OFFSET (Data.CommonSerialBus.TypeDataLength),
363 1.1 christos AML_OFFSET (CommonSerialBus.TypeDataLength),
364 1.1 christos 1},
365 1.1 christos
366 1.1 christos /* Vendor data */
367 1.1 christos
368 1.1 christos {ACPI_RSC_COUNT_SERIAL_VEN, ACPI_RS_OFFSET (Data.CommonSerialBus.VendorLength),
369 1.1 christos AML_OFFSET (CommonSerialBus.TypeDataLength),
370 1.1 christos AML_RESOURCE_UART_MIN_DATA_LEN},
371 1.1 christos
372 1.1 christos {ACPI_RSC_MOVE_SERIAL_VEN, ACPI_RS_OFFSET (Data.CommonSerialBus.VendorData),
373 1.1 christos 0,
374 1.1 christos sizeof (AML_RESOURCE_UART_SERIALBUS)},
375 1.1 christos
376 1.1 christos /* Resource Source */
377 1.1 christos
378 1.1 christos {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.Index),
379 1.1 christos AML_OFFSET (CommonSerialBus.ResSourceIndex),
380 1.1 christos 1},
381 1.1 christos
382 1.1 christos {ACPI_RSC_COUNT_SERIAL_RES, ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.StringLength),
383 1.1 christos AML_OFFSET (CommonSerialBus.TypeDataLength),
384 1.1 christos sizeof (AML_RESOURCE_COMMON_SERIALBUS)},
385 1.1 christos
386 1.1 christos {ACPI_RSC_MOVE_SERIAL_RES, ACPI_RS_OFFSET (Data.CommonSerialBus.ResourceSource.StringPtr),
387 1.1 christos AML_OFFSET (CommonSerialBus.TypeDataLength),
388 1.1 christos sizeof (AML_RESOURCE_COMMON_SERIALBUS)},
389 1.1 christos
390 1.1 christos /* Uart bus type specific */
391 1.1 christos
392 1.1 christos {ACPI_RSC_2BITFLAG, ACPI_RS_OFFSET (Data.UartSerialBus.FlowControl),
393 1.1 christos AML_OFFSET (UartSerialBus.TypeSpecificFlags),
394 1.1 christos 0},
395 1.1 christos
396 1.1 christos {ACPI_RSC_2BITFLAG, ACPI_RS_OFFSET (Data.UartSerialBus.StopBits),
397 1.1 christos AML_OFFSET (UartSerialBus.TypeSpecificFlags),
398 1.1 christos 2},
399 1.1 christos
400 1.1 christos {ACPI_RSC_3BITFLAG, ACPI_RS_OFFSET (Data.UartSerialBus.DataBits),
401 1.1 christos AML_OFFSET (UartSerialBus.TypeSpecificFlags),
402 1.1 christos 4},
403 1.1 christos
404 1.1 christos {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.UartSerialBus.Endian),
405 1.1 christos AML_OFFSET (UartSerialBus.TypeSpecificFlags),
406 1.1 christos 7},
407 1.1 christos
408 1.1 christos {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.UartSerialBus.Parity),
409 1.1 christos AML_OFFSET (UartSerialBus.Parity),
410 1.1 christos 1},
411 1.1 christos
412 1.1 christos {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.UartSerialBus.LinesEnabled),
413 1.1 christos AML_OFFSET (UartSerialBus.LinesEnabled),
414 1.1 christos 1},
415 1.1 christos
416 1.1 christos {ACPI_RSC_MOVE16, ACPI_RS_OFFSET (Data.UartSerialBus.RxFifoSize),
417 1.1 christos AML_OFFSET (UartSerialBus.RxFifoSize),
418 1.1 christos 1},
419 1.1 christos
420 1.1 christos {ACPI_RSC_MOVE16, ACPI_RS_OFFSET (Data.UartSerialBus.TxFifoSize),
421 1.1 christos AML_OFFSET (UartSerialBus.TxFifoSize),
422 1.1 christos 1},
423 1.1 christos
424 1.1 christos {ACPI_RSC_MOVE32, ACPI_RS_OFFSET (Data.UartSerialBus.DefaultBaudRate),
425 1.1 christos AML_OFFSET (UartSerialBus.DefaultBaudRate),
426 1.1 christos 1},
427 1.1 christos };
428