Linux Audio

Check our new training course

Loading...
v6.13.7
  1// SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0
  2/*******************************************************************************
  3 *
  4 * Module Name: rsirq - IRQ resource descriptors
  5 *
  6 ******************************************************************************/
  7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
  8#include <acpi/acpi.h>
  9#include "accommon.h"
 10#include "acresrc.h"
 11
 12#define _COMPONENT          ACPI_RESOURCES
 13ACPI_MODULE_NAME("rsirq")
 14
 15/*******************************************************************************
 16 *
 17 * acpi_rs_get_irq
 18 *
 19 ******************************************************************************/
 20struct acpi_rsconvert_info acpi_rs_get_irq[9] = {
 21	{ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_IRQ,
 22	 ACPI_RS_SIZE(struct acpi_resource_irq),
 23	 ACPI_RSC_TABLE_SIZE(acpi_rs_get_irq)},
 24
 25	/* Get the IRQ mask (bytes 1:2) */
 26
 27	{ACPI_RSC_BITMASK16, ACPI_RS_OFFSET(data.irq.interrupts[0]),
 28	 AML_OFFSET(irq.irq_mask),
 29	 ACPI_RS_OFFSET(data.irq.interrupt_count)},
 30
 31	/* Set default flags (others are zero) */
 32
 33	{ACPI_RSC_SET8, ACPI_RS_OFFSET(data.irq.triggering),
 34	 ACPI_EDGE_SENSITIVE,
 35	 1},
 36
 37	/* Get the descriptor length (2 or 3 for IRQ descriptor) */
 38
 39	{ACPI_RSC_2BITFLAG, ACPI_RS_OFFSET(data.irq.descriptor_length),
 40	 AML_OFFSET(irq.descriptor_type),
 41	 0},
 42
 43	/* All done if no flag byte present in descriptor */
 44
 45	{ACPI_RSC_EXIT_NE, ACPI_RSC_COMPARE_AML_LENGTH, 0, 3},
 46
 47	/* Get flags: Triggering[0], Polarity[3], Sharing[4], Wake[5] */
 48
 49	{ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.irq.triggering),
 50	 AML_OFFSET(irq.flags),
 51	 0},
 52
 53	{ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.irq.polarity),
 54	 AML_OFFSET(irq.flags),
 55	 3},
 56
 57	{ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.irq.shareable),
 58	 AML_OFFSET(irq.flags),
 59	 4},
 60
 61	{ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.irq.wake_capable),
 62	 AML_OFFSET(irq.flags),
 63	 5}
 64};
 65
 66/*******************************************************************************
 67 *
 68 * acpi_rs_set_irq
 69 *
 70 ******************************************************************************/
 71
 72struct acpi_rsconvert_info acpi_rs_set_irq[14] = {
 73	/* Start with a default descriptor of length 3 */
 74
 75	{ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_IRQ,
 76	 sizeof(struct aml_resource_irq),
 77	 ACPI_RSC_TABLE_SIZE(acpi_rs_set_irq)},
 78
 79	/* Convert interrupt list to 16-bit IRQ bitmask */
 80
 81	{ACPI_RSC_BITMASK16, ACPI_RS_OFFSET(data.irq.interrupts[0]),
 82	 AML_OFFSET(irq.irq_mask),
 83	 ACPI_RS_OFFSET(data.irq.interrupt_count)},
 84
 85	/* Set flags: Triggering[0], Polarity[3], Sharing[4], Wake[5] */
 86
 87	{ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.irq.triggering),
 88	 AML_OFFSET(irq.flags),
 89	 0},
 90
 91	{ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.irq.polarity),
 92	 AML_OFFSET(irq.flags),
 93	 3},
 94
 95	{ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.irq.shareable),
 96	 AML_OFFSET(irq.flags),
 97	 4},
 98
 99	{ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.irq.wake_capable),
100	 AML_OFFSET(irq.flags),
101	 5},
102
103	/*
104	 * All done if the output descriptor length is required to be 3
105	 * (i.e., optimization to 2 bytes cannot be attempted)
106	 */
107	{ACPI_RSC_EXIT_EQ, ACPI_RSC_COMPARE_VALUE,
108	 ACPI_RS_OFFSET(data.irq.descriptor_length),
109	 3},
110
111	/* Set length to 2 bytes (no flags byte) */
112
113	{ACPI_RSC_LENGTH, 0, 0, sizeof(struct aml_resource_irq_noflags)},
114
115	/*
116	 * All done if the output descriptor length is required to be 2.
117	 *
118	 * TBD: Perhaps we should check for error if input flags are not
119	 * compatible with a 2-byte descriptor.
120	 */
121	{ACPI_RSC_EXIT_EQ, ACPI_RSC_COMPARE_VALUE,
122	 ACPI_RS_OFFSET(data.irq.descriptor_length),
123	 2},
124
125	/* Reset length to 3 bytes (descriptor with flags byte) */
126
127	{ACPI_RSC_LENGTH, 0, 0, sizeof(struct aml_resource_irq)},
128
129	/*
130	 * Check if the flags byte is necessary. Not needed if the flags are:
131	 * ACPI_EDGE_SENSITIVE, ACPI_ACTIVE_HIGH, ACPI_EXCLUSIVE
132	 */
133	{ACPI_RSC_EXIT_NE, ACPI_RSC_COMPARE_VALUE,
134	 ACPI_RS_OFFSET(data.irq.triggering),
135	 ACPI_EDGE_SENSITIVE},
136
137	{ACPI_RSC_EXIT_NE, ACPI_RSC_COMPARE_VALUE,
138	 ACPI_RS_OFFSET(data.irq.polarity),
139	 ACPI_ACTIVE_HIGH},
140
141	{ACPI_RSC_EXIT_NE, ACPI_RSC_COMPARE_VALUE,
142	 ACPI_RS_OFFSET(data.irq.shareable),
143	 ACPI_EXCLUSIVE},
144
145	/* We can optimize to a 2-byte irq_no_flags() descriptor */
146
147	{ACPI_RSC_LENGTH, 0, 0, sizeof(struct aml_resource_irq_noflags)}
148};
149
150/*******************************************************************************
151 *
152 * acpi_rs_convert_ext_irq
153 *
154 ******************************************************************************/
155
156struct acpi_rsconvert_info acpi_rs_convert_ext_irq[10] = {
157	{ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_EXTENDED_IRQ,
158	 ACPI_RS_SIZE(struct acpi_resource_extended_irq),
159	 ACPI_RSC_TABLE_SIZE(acpi_rs_convert_ext_irq)},
160
161	{ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_EXTENDED_IRQ,
162	 sizeof(struct aml_resource_extended_irq),
163	 0},
164
165	/*
166	 * Flags: Producer/Consumer[0], Triggering[1], Polarity[2],
167	 *        Sharing[3], Wake[4]
168	 */
169	{ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.extended_irq.producer_consumer),
170	 AML_OFFSET(extended_irq.flags),
171	 0},
172
173	{ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.extended_irq.triggering),
174	 AML_OFFSET(extended_irq.flags),
175	 1},
176
177	{ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.extended_irq.polarity),
178	 AML_OFFSET(extended_irq.flags),
179	 2},
180
181	{ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.extended_irq.shareable),
182	 AML_OFFSET(extended_irq.flags),
183	 3},
184
185	{ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.extended_irq.wake_capable),
186	 AML_OFFSET(extended_irq.flags),
187	 4},
188
189	/* IRQ Table length (Byte4) */
190
191	{ACPI_RSC_COUNT, ACPI_RS_OFFSET(data.extended_irq.interrupt_count),
192	 AML_OFFSET(extended_irq.interrupt_count),
193	 sizeof(u32)},
194
195	/* Copy every IRQ in the table, each is 32 bits */
196
197	{ACPI_RSC_MOVE32, ACPI_RS_OFFSET(data.extended_irq.interrupts[0]),
198	 AML_OFFSET(extended_irq.interrupts[0]),
199	 0},
200
201	/* Optional resource_source (Index and String) */
202
203	{ACPI_RSC_SOURCEX, ACPI_RS_OFFSET(data.extended_irq.resource_source),
204	 ACPI_RS_OFFSET(data.extended_irq.interrupts[0]),
205	 sizeof(struct aml_resource_extended_irq)}
206};
207
208/*******************************************************************************
209 *
210 * acpi_rs_convert_dma
211 *
212 ******************************************************************************/
213
214struct acpi_rsconvert_info acpi_rs_convert_dma[6] = {
215	{ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_DMA,
216	 ACPI_RS_SIZE(struct acpi_resource_dma),
217	 ACPI_RSC_TABLE_SIZE(acpi_rs_convert_dma)},
218
219	{ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_DMA,
220	 sizeof(struct aml_resource_dma),
221	 0},
222
223	/* Flags: transfer preference, bus mastering, channel speed */
224
225	{ACPI_RSC_2BITFLAG, ACPI_RS_OFFSET(data.dma.transfer),
226	 AML_OFFSET(dma.flags),
227	 0},
228
229	{ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.dma.bus_master),
230	 AML_OFFSET(dma.flags),
231	 2},
232
233	{ACPI_RSC_2BITFLAG, ACPI_RS_OFFSET(data.dma.type),
234	 AML_OFFSET(dma.flags),
235	 5},
236
237	/* DMA channel mask bits */
238
239	{ACPI_RSC_BITMASK, ACPI_RS_OFFSET(data.dma.channels[0]),
240	 AML_OFFSET(dma.dma_channel_mask),
241	 ACPI_RS_OFFSET(data.dma.channel_count)}
242};
243
244/*******************************************************************************
245 *
246 * acpi_rs_convert_fixed_dma
247 *
248 ******************************************************************************/
249
250struct acpi_rsconvert_info acpi_rs_convert_fixed_dma[4] = {
251	{ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_FIXED_DMA,
252	 ACPI_RS_SIZE(struct acpi_resource_fixed_dma),
253	 ACPI_RSC_TABLE_SIZE(acpi_rs_convert_fixed_dma)},
254
255	{ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_FIXED_DMA,
256	 sizeof(struct aml_resource_fixed_dma),
257	 0},
258
259	/*
260	 * These fields are contiguous in both the source and destination:
261	 * request_lines
262	 * Channels
263	 */
264	{ACPI_RSC_MOVE16, ACPI_RS_OFFSET(data.fixed_dma.request_lines),
265	 AML_OFFSET(fixed_dma.request_lines),
266	 2},
267
268	{ACPI_RSC_MOVE8, ACPI_RS_OFFSET(data.fixed_dma.width),
269	 AML_OFFSET(fixed_dma.width),
270	 1},
271};
v4.10.11
 
  1/*******************************************************************************
  2 *
  3 * Module Name: rsirq - IRQ resource descriptors
  4 *
  5 ******************************************************************************/
  6
  7/*
  8 * Copyright (C) 2000 - 2016, Intel Corp.
  9 * All rights reserved.
 10 *
 11 * Redistribution and use in source and binary forms, with or without
 12 * modification, are permitted provided that the following conditions
 13 * are met:
 14 * 1. Redistributions of source code must retain the above copyright
 15 *    notice, this list of conditions, and the following disclaimer,
 16 *    without modification.
 17 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
 18 *    substantially similar to the "NO WARRANTY" disclaimer below
 19 *    ("Disclaimer") and any redistribution must be conditioned upon
 20 *    including a substantially similar Disclaimer requirement for further
 21 *    binary redistribution.
 22 * 3. Neither the names of the above-listed copyright holders nor the names
 23 *    of any contributors may be used to endorse or promote products derived
 24 *    from this software without specific prior written permission.
 25 *
 26 * Alternatively, this software may be distributed under the terms of the
 27 * GNU General Public License ("GPL") version 2 as published by the Free
 28 * Software Foundation.
 29 *
 30 * NO WARRANTY
 31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 32 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 33 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
 34 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 35 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
 39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
 40 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 41 * POSSIBILITY OF SUCH DAMAGES.
 42 */
 43
 44#include <acpi/acpi.h>
 45#include "accommon.h"
 46#include "acresrc.h"
 47
 48#define _COMPONENT          ACPI_RESOURCES
 49ACPI_MODULE_NAME("rsirq")
 50
 51/*******************************************************************************
 52 *
 53 * acpi_rs_get_irq
 54 *
 55 ******************************************************************************/
 56struct acpi_rsconvert_info acpi_rs_get_irq[9] = {
 57	{ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_IRQ,
 58	 ACPI_RS_SIZE(struct acpi_resource_irq),
 59	 ACPI_RSC_TABLE_SIZE(acpi_rs_get_irq)},
 60
 61	/* Get the IRQ mask (bytes 1:2) */
 62
 63	{ACPI_RSC_BITMASK16, ACPI_RS_OFFSET(data.irq.interrupts[0]),
 64	 AML_OFFSET(irq.irq_mask),
 65	 ACPI_RS_OFFSET(data.irq.interrupt_count)},
 66
 67	/* Set default flags (others are zero) */
 68
 69	{ACPI_RSC_SET8, ACPI_RS_OFFSET(data.irq.triggering),
 70	 ACPI_EDGE_SENSITIVE,
 71	 1},
 72
 73	/* Get the descriptor length (2 or 3 for IRQ descriptor) */
 74
 75	{ACPI_RSC_2BITFLAG, ACPI_RS_OFFSET(data.irq.descriptor_length),
 76	 AML_OFFSET(irq.descriptor_type),
 77	 0},
 78
 79	/* All done if no flag byte present in descriptor */
 80
 81	{ACPI_RSC_EXIT_NE, ACPI_RSC_COMPARE_AML_LENGTH, 0, 3},
 82
 83	/* Get flags: Triggering[0], Polarity[3], Sharing[4], Wake[5] */
 84
 85	{ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.irq.triggering),
 86	 AML_OFFSET(irq.flags),
 87	 0},
 88
 89	{ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.irq.polarity),
 90	 AML_OFFSET(irq.flags),
 91	 3},
 92
 93	{ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.irq.sharable),
 94	 AML_OFFSET(irq.flags),
 95	 4},
 96
 97	{ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.irq.wake_capable),
 98	 AML_OFFSET(irq.flags),
 99	 5}
100};
101
102/*******************************************************************************
103 *
104 * acpi_rs_set_irq
105 *
106 ******************************************************************************/
107
108struct acpi_rsconvert_info acpi_rs_set_irq[14] = {
109	/* Start with a default descriptor of length 3 */
110
111	{ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_IRQ,
112	 sizeof(struct aml_resource_irq),
113	 ACPI_RSC_TABLE_SIZE(acpi_rs_set_irq)},
114
115	/* Convert interrupt list to 16-bit IRQ bitmask */
116
117	{ACPI_RSC_BITMASK16, ACPI_RS_OFFSET(data.irq.interrupts[0]),
118	 AML_OFFSET(irq.irq_mask),
119	 ACPI_RS_OFFSET(data.irq.interrupt_count)},
120
121	/* Set flags: Triggering[0], Polarity[3], Sharing[4], Wake[5] */
122
123	{ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.irq.triggering),
124	 AML_OFFSET(irq.flags),
125	 0},
126
127	{ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.irq.polarity),
128	 AML_OFFSET(irq.flags),
129	 3},
130
131	{ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.irq.sharable),
132	 AML_OFFSET(irq.flags),
133	 4},
134
135	{ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.irq.wake_capable),
136	 AML_OFFSET(irq.flags),
137	 5},
138
139	/*
140	 * All done if the output descriptor length is required to be 3
141	 * (i.e., optimization to 2 bytes cannot be attempted)
142	 */
143	{ACPI_RSC_EXIT_EQ, ACPI_RSC_COMPARE_VALUE,
144	 ACPI_RS_OFFSET(data.irq.descriptor_length),
145	 3},
146
147	/* Set length to 2 bytes (no flags byte) */
148
149	{ACPI_RSC_LENGTH, 0, 0, sizeof(struct aml_resource_irq_noflags)},
150
151	/*
152	 * All done if the output descriptor length is required to be 2.
153	 *
154	 * TBD: Perhaps we should check for error if input flags are not
155	 * compatible with a 2-byte descriptor.
156	 */
157	{ACPI_RSC_EXIT_EQ, ACPI_RSC_COMPARE_VALUE,
158	 ACPI_RS_OFFSET(data.irq.descriptor_length),
159	 2},
160
161	/* Reset length to 3 bytes (descriptor with flags byte) */
162
163	{ACPI_RSC_LENGTH, 0, 0, sizeof(struct aml_resource_irq)},
164
165	/*
166	 * Check if the flags byte is necessary. Not needed if the flags are:
167	 * ACPI_EDGE_SENSITIVE, ACPI_ACTIVE_HIGH, ACPI_EXCLUSIVE
168	 */
169	{ACPI_RSC_EXIT_NE, ACPI_RSC_COMPARE_VALUE,
170	 ACPI_RS_OFFSET(data.irq.triggering),
171	 ACPI_EDGE_SENSITIVE},
172
173	{ACPI_RSC_EXIT_NE, ACPI_RSC_COMPARE_VALUE,
174	 ACPI_RS_OFFSET(data.irq.polarity),
175	 ACPI_ACTIVE_HIGH},
176
177	{ACPI_RSC_EXIT_NE, ACPI_RSC_COMPARE_VALUE,
178	 ACPI_RS_OFFSET(data.irq.sharable),
179	 ACPI_EXCLUSIVE},
180
181	/* We can optimize to a 2-byte irq_no_flags() descriptor */
182
183	{ACPI_RSC_LENGTH, 0, 0, sizeof(struct aml_resource_irq_noflags)}
184};
185
186/*******************************************************************************
187 *
188 * acpi_rs_convert_ext_irq
189 *
190 ******************************************************************************/
191
192struct acpi_rsconvert_info acpi_rs_convert_ext_irq[10] = {
193	{ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_EXTENDED_IRQ,
194	 ACPI_RS_SIZE(struct acpi_resource_extended_irq),
195	 ACPI_RSC_TABLE_SIZE(acpi_rs_convert_ext_irq)},
196
197	{ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_EXTENDED_IRQ,
198	 sizeof(struct aml_resource_extended_irq),
199	 0},
200
201	/*
202	 * Flags: Producer/Consumer[0], Triggering[1], Polarity[2],
203	 *        Sharing[3], Wake[4]
204	 */
205	{ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.extended_irq.producer_consumer),
206	 AML_OFFSET(extended_irq.flags),
207	 0},
208
209	{ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.extended_irq.triggering),
210	 AML_OFFSET(extended_irq.flags),
211	 1},
212
213	{ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.extended_irq.polarity),
214	 AML_OFFSET(extended_irq.flags),
215	 2},
216
217	{ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.extended_irq.sharable),
218	 AML_OFFSET(extended_irq.flags),
219	 3},
220
221	{ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.extended_irq.wake_capable),
222	 AML_OFFSET(extended_irq.flags),
223	 4},
224
225	/* IRQ Table length (Byte4) */
226
227	{ACPI_RSC_COUNT, ACPI_RS_OFFSET(data.extended_irq.interrupt_count),
228	 AML_OFFSET(extended_irq.interrupt_count),
229	 sizeof(u32)},
230
231	/* Copy every IRQ in the table, each is 32 bits */
232
233	{ACPI_RSC_MOVE32, ACPI_RS_OFFSET(data.extended_irq.interrupts[0]),
234	 AML_OFFSET(extended_irq.interrupts[0]),
235	 0},
236
237	/* Optional resource_source (Index and String) */
238
239	{ACPI_RSC_SOURCEX, ACPI_RS_OFFSET(data.extended_irq.resource_source),
240	 ACPI_RS_OFFSET(data.extended_irq.interrupts[0]),
241	 sizeof(struct aml_resource_extended_irq)}
242};
243
244/*******************************************************************************
245 *
246 * acpi_rs_convert_dma
247 *
248 ******************************************************************************/
249
250struct acpi_rsconvert_info acpi_rs_convert_dma[6] = {
251	{ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_DMA,
252	 ACPI_RS_SIZE(struct acpi_resource_dma),
253	 ACPI_RSC_TABLE_SIZE(acpi_rs_convert_dma)},
254
255	{ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_DMA,
256	 sizeof(struct aml_resource_dma),
257	 0},
258
259	/* Flags: transfer preference, bus mastering, channel speed */
260
261	{ACPI_RSC_2BITFLAG, ACPI_RS_OFFSET(data.dma.transfer),
262	 AML_OFFSET(dma.flags),
263	 0},
264
265	{ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.dma.bus_master),
266	 AML_OFFSET(dma.flags),
267	 2},
268
269	{ACPI_RSC_2BITFLAG, ACPI_RS_OFFSET(data.dma.type),
270	 AML_OFFSET(dma.flags),
271	 5},
272
273	/* DMA channel mask bits */
274
275	{ACPI_RSC_BITMASK, ACPI_RS_OFFSET(data.dma.channels[0]),
276	 AML_OFFSET(dma.dma_channel_mask),
277	 ACPI_RS_OFFSET(data.dma.channel_count)}
278};
279
280/*******************************************************************************
281 *
282 * acpi_rs_convert_fixed_dma
283 *
284 ******************************************************************************/
285
286struct acpi_rsconvert_info acpi_rs_convert_fixed_dma[4] = {
287	{ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_FIXED_DMA,
288	 ACPI_RS_SIZE(struct acpi_resource_fixed_dma),
289	 ACPI_RSC_TABLE_SIZE(acpi_rs_convert_fixed_dma)},
290
291	{ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_FIXED_DMA,
292	 sizeof(struct aml_resource_fixed_dma),
293	 0},
294
295	/*
296	 * These fields are contiguous in both the source and destination:
297	 * request_lines
298	 * Channels
299	 */
300	{ACPI_RSC_MOVE16, ACPI_RS_OFFSET(data.fixed_dma.request_lines),
301	 AML_OFFSET(fixed_dma.request_lines),
302	 2},
303
304	{ACPI_RSC_MOVE8, ACPI_RS_OFFSET(data.fixed_dma.width),
305	 AML_OFFSET(fixed_dma.width),
306	 1},
307};