1
2
3
4
5
6
7
8 #include <acpi/acpi.h>
9 #include "accommon.h"
10 #include "acresrc.h"
11
12 #define _COMPONENT ACPI_RESOURCES
13 ACPI_MODULE_NAME("rsinfo")
14
15
16
17
18
19
20
21
22
23
24
25
26 struct acpi_rsconvert_info *acpi_gbl_set_resource_dispatch[] = {
27 acpi_rs_set_irq,
28 acpi_rs_convert_dma,
29 acpi_rs_set_start_dpf,
30 acpi_rs_convert_end_dpf,
31 acpi_rs_convert_io,
32 acpi_rs_convert_fixed_io,
33 acpi_rs_set_vendor,
34 acpi_rs_convert_end_tag,
35 acpi_rs_convert_memory24,
36 acpi_rs_convert_memory32,
37 acpi_rs_convert_fixed_memory32,
38 acpi_rs_convert_address16,
39 acpi_rs_convert_address32,
40 acpi_rs_convert_address64,
41 acpi_rs_convert_ext_address64,
42 acpi_rs_convert_ext_irq,
43 acpi_rs_convert_generic_reg,
44 acpi_rs_convert_gpio,
45 acpi_rs_convert_fixed_dma,
46 NULL,
47 acpi_rs_convert_pin_function,
48 acpi_rs_convert_pin_config,
49 acpi_rs_convert_pin_group,
50 acpi_rs_convert_pin_group_function,
51 acpi_rs_convert_pin_group_config,
52 };
53
54
55
56 struct acpi_rsconvert_info *acpi_gbl_get_resource_dispatch[] = {
57
58
59 NULL,
60 NULL,
61 NULL,
62 NULL,
63 acpi_rs_get_irq,
64 acpi_rs_convert_dma,
65 acpi_rs_get_start_dpf,
66 acpi_rs_convert_end_dpf,
67 acpi_rs_convert_io,
68 acpi_rs_convert_fixed_io,
69 acpi_rs_convert_fixed_dma,
70 NULL,
71 NULL,
72 NULL,
73 acpi_rs_get_vendor_small,
74 acpi_rs_convert_end_tag,
75
76
77
78 NULL,
79 acpi_rs_convert_memory24,
80 acpi_rs_convert_generic_reg,
81 NULL,
82 acpi_rs_get_vendor_large,
83 acpi_rs_convert_memory32,
84 acpi_rs_convert_fixed_memory32,
85 acpi_rs_convert_address32,
86 acpi_rs_convert_address16,
87 acpi_rs_convert_ext_irq,
88 acpi_rs_convert_address64,
89 acpi_rs_convert_ext_address64,
90 acpi_rs_convert_gpio,
91 acpi_rs_convert_pin_function,
92 NULL,
93 acpi_rs_convert_pin_config,
94 acpi_rs_convert_pin_group,
95 acpi_rs_convert_pin_group_function,
96 acpi_rs_convert_pin_group_config,
97 };
98
99
100
101 struct acpi_rsconvert_info *acpi_gbl_convert_resource_serial_bus_dispatch[] = {
102 NULL,
103 acpi_rs_convert_i2c_serial_bus,
104 acpi_rs_convert_spi_serial_bus,
105 acpi_rs_convert_uart_serial_bus,
106 };
107
108 #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DISASSEMBLER) || defined(ACPI_DEBUGGER)
109
110
111
112 struct acpi_rsdump_info *acpi_gbl_dump_resource_dispatch[] = {
113 acpi_rs_dump_irq,
114 acpi_rs_dump_dma,
115 acpi_rs_dump_start_dpf,
116 acpi_rs_dump_end_dpf,
117 acpi_rs_dump_io,
118 acpi_rs_dump_fixed_io,
119 acpi_rs_dump_vendor,
120 acpi_rs_dump_end_tag,
121 acpi_rs_dump_memory24,
122 acpi_rs_dump_memory32,
123 acpi_rs_dump_fixed_memory32,
124 acpi_rs_dump_address16,
125 acpi_rs_dump_address32,
126 acpi_rs_dump_address64,
127 acpi_rs_dump_ext_address64,
128 acpi_rs_dump_ext_irq,
129 acpi_rs_dump_generic_reg,
130 acpi_rs_dump_gpio,
131 acpi_rs_dump_fixed_dma,
132 NULL,
133 acpi_rs_dump_pin_function,
134 acpi_rs_dump_pin_config,
135 acpi_rs_dump_pin_group,
136 acpi_rs_dump_pin_group_function,
137 acpi_rs_dump_pin_group_config,
138 };
139
140 struct acpi_rsdump_info *acpi_gbl_dump_serial_bus_dispatch[] = {
141 NULL,
142 acpi_rs_dump_i2c_serial_bus,
143 acpi_rs_dump_spi_serial_bus,
144 acpi_rs_dump_uart_serial_bus,
145 };
146 #endif
147
148
149
150
151
152
153 const u8 acpi_gbl_aml_resource_sizes[] = {
154 sizeof(struct aml_resource_irq),
155 sizeof(struct aml_resource_dma),
156 sizeof(struct aml_resource_start_dependent),
157 sizeof(struct aml_resource_end_dependent),
158 sizeof(struct aml_resource_io),
159 sizeof(struct aml_resource_fixed_io),
160 sizeof(struct aml_resource_vendor_small),
161 sizeof(struct aml_resource_end_tag),
162 sizeof(struct aml_resource_memory24),
163 sizeof(struct aml_resource_memory32),
164 sizeof(struct aml_resource_fixed_memory32),
165 sizeof(struct aml_resource_address16),
166 sizeof(struct aml_resource_address32),
167 sizeof(struct aml_resource_address64),
168 sizeof(struct aml_resource_extended_address64),
169 sizeof(struct aml_resource_extended_irq),
170 sizeof(struct aml_resource_generic_register),
171 sizeof(struct aml_resource_gpio),
172 sizeof(struct aml_resource_fixed_dma),
173 sizeof(struct aml_resource_common_serialbus),
174 sizeof(struct aml_resource_pin_function),
175 sizeof(struct aml_resource_pin_config),
176 sizeof(struct aml_resource_pin_group),
177 sizeof(struct aml_resource_pin_group_function),
178 sizeof(struct aml_resource_pin_group_config),
179 };
180
181 const u8 acpi_gbl_resource_struct_sizes[] = {
182
183
184 0,
185 0,
186 0,
187 0,
188 ACPI_RS_SIZE(struct acpi_resource_irq),
189 ACPI_RS_SIZE(struct acpi_resource_dma),
190 ACPI_RS_SIZE(struct acpi_resource_start_dependent),
191 ACPI_RS_SIZE_MIN,
192 ACPI_RS_SIZE(struct acpi_resource_io),
193 ACPI_RS_SIZE(struct acpi_resource_fixed_io),
194 ACPI_RS_SIZE(struct acpi_resource_fixed_dma),
195 0,
196 0,
197 0,
198 ACPI_RS_SIZE(struct acpi_resource_vendor),
199 ACPI_RS_SIZE_MIN,
200
201
202
203 0,
204 ACPI_RS_SIZE(struct acpi_resource_memory24),
205 ACPI_RS_SIZE(struct acpi_resource_generic_register),
206 0,
207 ACPI_RS_SIZE(struct acpi_resource_vendor),
208 ACPI_RS_SIZE(struct acpi_resource_memory32),
209 ACPI_RS_SIZE(struct acpi_resource_fixed_memory32),
210 ACPI_RS_SIZE(struct acpi_resource_address32),
211 ACPI_RS_SIZE(struct acpi_resource_address16),
212 ACPI_RS_SIZE(struct acpi_resource_extended_irq),
213 ACPI_RS_SIZE(struct acpi_resource_address64),
214 ACPI_RS_SIZE(struct acpi_resource_extended_address64),
215 ACPI_RS_SIZE(struct acpi_resource_gpio),
216 ACPI_RS_SIZE(struct acpi_resource_pin_function),
217 ACPI_RS_SIZE(struct acpi_resource_common_serialbus),
218 ACPI_RS_SIZE(struct acpi_resource_pin_config),
219 ACPI_RS_SIZE(struct acpi_resource_pin_group),
220 ACPI_RS_SIZE(struct acpi_resource_pin_group_function),
221 ACPI_RS_SIZE(struct acpi_resource_pin_group_config),
222 };
223
224 const u8 acpi_gbl_aml_resource_serial_bus_sizes[] = {
225 0,
226 sizeof(struct aml_resource_i2c_serialbus),
227 sizeof(struct aml_resource_spi_serialbus),
228 sizeof(struct aml_resource_uart_serialbus),
229 };
230
231 const u8 acpi_gbl_resource_struct_serial_bus_sizes[] = {
232 0,
233 ACPI_RS_SIZE(struct acpi_resource_i2c_serialbus),
234 ACPI_RS_SIZE(struct acpi_resource_spi_serialbus),
235 ACPI_RS_SIZE(struct acpi_resource_uart_serialbus),
236 };