summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2017-06-05 04:40:57 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-06-27 16:25:20 -0400
commitb7b7da2abe1fe02e989577293b9ece0fa15ccc31 (patch)
tree5aa6a0e36595996f664e0fc5b8dbd11350f3265c
parent596878da26ad608344a1dd754883467f120becc9 (diff)
ACPICA: Split resource descriptor decode strings to a new file
ACPICA commit 00906ae0aff4c6b76abc232ef99700e7d7c0e325 There are enough of these strings to justify a separate file. Also, these strings are only used for the disassembler and the debugger. Thus, this change improves ACPICA modularity. Link: https://github.com/acpica/acpica/commit/00906ae0 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--drivers/acpi/acpica/Makefile1
-rw-r--r--drivers/acpi/acpica/utresdecode.c315
-rw-r--r--drivers/acpi/acpica/utresrc.c264
3 files changed, 316 insertions, 264 deletions
diff --git a/drivers/acpi/acpica/Makefile b/drivers/acpi/acpica/Makefile
index dea65306b687..b125bdd3d58b 100644
--- a/drivers/acpi/acpica/Makefile
+++ b/drivers/acpi/acpica/Makefile
@@ -172,6 +172,7 @@ acpi-y += \
172 utosi.o \ 172 utosi.o \
173 utownerid.o \ 173 utownerid.o \
174 utpredef.o \ 174 utpredef.o \
175 utresdecode.o \
175 utresrc.o \ 176 utresrc.o \
176 utstate.o \ 177 utstate.o \
177 utstring.o \ 178 utstring.o \
diff --git a/drivers/acpi/acpica/utresdecode.c b/drivers/acpi/acpica/utresdecode.c
new file mode 100644
index 000000000000..e15a2538558b
--- /dev/null
+++ b/drivers/acpi/acpica/utresdecode.c
@@ -0,0 +1,315 @@
1/*******************************************************************************
2 *
3 * Module Name: utresdecode - Resource descriptor keyword strings
4 *
5 ******************************************************************************/
6
7/*
8 * Copyright (C) 2000 - 2017, 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_UTILITIES
49ACPI_MODULE_NAME("utresdecode")
50
51#if defined (ACPI_DEBUG_OUTPUT) || \
52 defined (ACPI_DISASSEMBLER) || \
53 defined (ACPI_DEBUGGER)
54/*
55 * Strings used to decode resource descriptors.
56 * Used by both the disassembler and the debugger resource dump routines
57 */
58const char *acpi_gbl_bm_decode[] = {
59 "NotBusMaster",
60 "BusMaster"
61};
62
63const char *acpi_gbl_config_decode[] = {
64 "0 - Good Configuration",
65 "1 - Acceptable Configuration",
66 "2 - Suboptimal Configuration",
67 "3 - ***Invalid Configuration***",
68};
69
70const char *acpi_gbl_consume_decode[] = {
71 "ResourceProducer",
72 "ResourceConsumer"
73};
74
75const char *acpi_gbl_dec_decode[] = {
76 "PosDecode",
77 "SubDecode"
78};
79
80const char *acpi_gbl_he_decode[] = {
81 "Level",
82 "Edge"
83};
84
85const char *acpi_gbl_io_decode[] = {
86 "Decode10",
87 "Decode16"
88};
89
90const char *acpi_gbl_ll_decode[] = {
91 "ActiveHigh",
92 "ActiveLow",
93 "ActiveBoth",
94 "Reserved"
95};
96
97const char *acpi_gbl_max_decode[] = {
98 "MaxNotFixed",
99 "MaxFixed"
100};
101
102const char *acpi_gbl_mem_decode[] = {
103 "NonCacheable",
104 "Cacheable",
105 "WriteCombining",
106 "Prefetchable"
107};
108
109const char *acpi_gbl_min_decode[] = {
110 "MinNotFixed",
111 "MinFixed"
112};
113
114const char *acpi_gbl_mtp_decode[] = {
115 "AddressRangeMemory",
116 "AddressRangeReserved",
117 "AddressRangeACPI",
118 "AddressRangeNVS"
119};
120
121const char *acpi_gbl_rng_decode[] = {
122 "InvalidRanges",
123 "NonISAOnlyRanges",
124 "ISAOnlyRanges",
125 "EntireRange"
126};
127
128const char *acpi_gbl_rw_decode[] = {
129 "ReadOnly",
130 "ReadWrite"
131};
132
133const char *acpi_gbl_shr_decode[] = {
134 "Exclusive",
135 "Shared",
136 "ExclusiveAndWake", /* ACPI 5.0 */
137 "SharedAndWake" /* ACPI 5.0 */
138};
139
140const char *acpi_gbl_siz_decode[] = {
141 "Transfer8",
142 "Transfer8_16",
143 "Transfer16",
144 "InvalidSize"
145};
146
147const char *acpi_gbl_trs_decode[] = {
148 "DenseTranslation",
149 "SparseTranslation"
150};
151
152const char *acpi_gbl_ttp_decode[] = {
153 "TypeStatic",
154 "TypeTranslation"
155};
156
157const char *acpi_gbl_typ_decode[] = {
158 "Compatibility",
159 "TypeA",
160 "TypeB",
161 "TypeF"
162};
163
164const char *acpi_gbl_ppc_decode[] = {
165 "PullDefault",
166 "PullUp",
167 "PullDown",
168 "PullNone"
169};
170
171const char *acpi_gbl_ior_decode[] = {
172 "IoRestrictionNone",
173 "IoRestrictionInputOnly",
174 "IoRestrictionOutputOnly",
175 "IoRestrictionNoneAndPreserve"
176};
177
178const char *acpi_gbl_dts_decode[] = {
179 "Width8bit",
180 "Width16bit",
181 "Width32bit",
182 "Width64bit",
183 "Width128bit",
184 "Width256bit",
185};
186
187/* GPIO connection type */
188
189const char *acpi_gbl_ct_decode[] = {
190 "Interrupt",
191 "I/O"
192};
193
194/* Serial bus type */
195
196const char *acpi_gbl_sbt_decode[] = {
197 "/* UNKNOWN serial bus type */",
198 "I2C",
199 "SPI",
200 "UART"
201};
202
203/* I2C serial bus access mode */
204
205const char *acpi_gbl_am_decode[] = {
206 "AddressingMode7Bit",
207 "AddressingMode10Bit"
208};
209
210/* I2C serial bus slave mode */
211
212const char *acpi_gbl_sm_decode[] = {
213 "ControllerInitiated",
214 "DeviceInitiated"
215};
216
217/* SPI serial bus wire mode */
218
219const char *acpi_gbl_wm_decode[] = {
220 "FourWireMode",
221 "ThreeWireMode"
222};
223
224/* SPI serial clock phase */
225
226const char *acpi_gbl_cph_decode[] = {
227 "ClockPhaseFirst",
228 "ClockPhaseSecond"
229};
230
231/* SPI serial bus clock polarity */
232
233const char *acpi_gbl_cpo_decode[] = {
234 "ClockPolarityLow",
235 "ClockPolarityHigh"
236};
237
238/* SPI serial bus device polarity */
239
240const char *acpi_gbl_dp_decode[] = {
241 "PolarityLow",
242 "PolarityHigh"
243};
244
245/* UART serial bus endian */
246
247const char *acpi_gbl_ed_decode[] = {
248 "LittleEndian",
249 "BigEndian"
250};
251
252/* UART serial bus bits per byte */
253
254const char *acpi_gbl_bpb_decode[] = {
255 "DataBitsFive",
256 "DataBitsSix",
257 "DataBitsSeven",
258 "DataBitsEight",
259 "DataBitsNine",
260 "/* UNKNOWN Bits per byte */",
261 "/* UNKNOWN Bits per byte */",
262 "/* UNKNOWN Bits per byte */"
263};
264
265/* UART serial bus stop bits */
266
267const char *acpi_gbl_sb_decode[] = {
268 "StopBitsZero",
269 "StopBitsOne",
270 "StopBitsOnePlusHalf",
271 "StopBitsTwo"
272};
273
274/* UART serial bus flow control */
275
276const char *acpi_gbl_fc_decode[] = {
277 "FlowControlNone",
278 "FlowControlHardware",
279 "FlowControlXON",
280 "/* UNKNOWN flow control keyword */"
281};
282
283/* UART serial bus parity type */
284
285const char *acpi_gbl_pt_decode[] = {
286 "ParityTypeNone",
287 "ParityTypeEven",
288 "ParityTypeOdd",
289 "ParityTypeMark",
290 "ParityTypeSpace",
291 "/* UNKNOWN parity keyword */",
292 "/* UNKNOWN parity keyword */",
293 "/* UNKNOWN parity keyword */"
294};
295
296/* pin_config type */
297
298const char *acpi_gbl_ptyp_decode[] = {
299 "Default",
300 "Bias Pull-up",
301 "Bias Pull-down",
302 "Bias Default",
303 "Bias Disable",
304 "Bias High Impedance",
305 "Bias Bus Hold",
306 "Drive Open Drain",
307 "Drive Open Source",
308 "Drive Push Pull",
309 "Drive Strength",
310 "Slew Rate",
311 "Input Debounce",
312 "Input Schmitt Trigger",
313};
314
315#endif
diff --git a/drivers/acpi/acpica/utresrc.c b/drivers/acpi/acpica/utresrc.c
index b4282ea32262..5fa992027b74 100644
--- a/drivers/acpi/acpica/utresrc.c
+++ b/drivers/acpi/acpica/utresrc.c
@@ -48,270 +48,6 @@
48#define _COMPONENT ACPI_UTILITIES 48#define _COMPONENT ACPI_UTILITIES
49ACPI_MODULE_NAME("utresrc") 49ACPI_MODULE_NAME("utresrc")
50 50
51#if defined(ACPI_DEBUG_OUTPUT) || defined (ACPI_DISASSEMBLER) || defined (ACPI_DEBUGGER)
52/*
53 * Strings used to decode resource descriptors.
54 * Used by both the disassembler and the debugger resource dump routines
55 */
56const char *acpi_gbl_bm_decode[] = {
57 "NotBusMaster",
58 "BusMaster"
59};
60
61const char *acpi_gbl_config_decode[] = {
62 "0 - Good Configuration",
63 "1 - Acceptable Configuration",
64 "2 - Suboptimal Configuration",
65 "3 - ***Invalid Configuration***",
66};
67
68const char *acpi_gbl_consume_decode[] = {
69 "ResourceProducer",
70 "ResourceConsumer"
71};
72
73const char *acpi_gbl_dec_decode[] = {
74 "PosDecode",
75 "SubDecode"
76};
77
78const char *acpi_gbl_he_decode[] = {
79 "Level",
80 "Edge"
81};
82
83const char *acpi_gbl_io_decode[] = {
84 "Decode10",
85 "Decode16"
86};
87
88const char *acpi_gbl_ll_decode[] = {
89 "ActiveHigh",
90 "ActiveLow",
91 "ActiveBoth",
92 "Reserved"
93};
94
95const char *acpi_gbl_max_decode[] = {
96 "MaxNotFixed",
97 "MaxFixed"
98};
99
100const char *acpi_gbl_mem_decode[] = {
101 "NonCacheable",
102 "Cacheable",
103 "WriteCombining",
104 "Prefetchable"
105};
106
107const char *acpi_gbl_min_decode[] = {
108 "MinNotFixed",
109 "MinFixed"
110};
111
112const char *acpi_gbl_mtp_decode[] = {
113 "AddressRangeMemory",
114 "AddressRangeReserved",
115 "AddressRangeACPI",
116 "AddressRangeNVS"
117};
118
119const char *acpi_gbl_rng_decode[] = {
120 "InvalidRanges",
121 "NonISAOnlyRanges",
122 "ISAOnlyRanges",
123 "EntireRange"
124};
125
126const char *acpi_gbl_rw_decode[] = {
127 "ReadOnly",
128 "ReadWrite"
129};
130
131const char *acpi_gbl_shr_decode[] = {
132 "Exclusive",
133 "Shared",
134 "ExclusiveAndWake", /* ACPI 5.0 */
135 "SharedAndWake" /* ACPI 5.0 */
136};
137
138const char *acpi_gbl_siz_decode[] = {
139 "Transfer8",
140 "Transfer8_16",
141 "Transfer16",
142 "InvalidSize"
143};
144
145const char *acpi_gbl_trs_decode[] = {
146 "DenseTranslation",
147 "SparseTranslation"
148};
149
150const char *acpi_gbl_ttp_decode[] = {
151 "TypeStatic",
152 "TypeTranslation"
153};
154
155const char *acpi_gbl_typ_decode[] = {
156 "Compatibility",
157 "TypeA",
158 "TypeB",
159 "TypeF"
160};
161
162const char *acpi_gbl_ppc_decode[] = {
163 "PullDefault",
164 "PullUp",
165 "PullDown",
166 "PullNone"
167};
168
169const char *acpi_gbl_ior_decode[] = {
170 "IoRestrictionNone",
171 "IoRestrictionInputOnly",
172 "IoRestrictionOutputOnly",
173 "IoRestrictionNoneAndPreserve"
174};
175
176const char *acpi_gbl_dts_decode[] = {
177 "Width8bit",
178 "Width16bit",
179 "Width32bit",
180 "Width64bit",
181 "Width128bit",
182 "Width256bit",
183};
184
185/* GPIO connection type */
186
187const char *acpi_gbl_ct_decode[] = {
188 "Interrupt",
189 "I/O"
190};
191
192/* Serial bus type */
193
194const char *acpi_gbl_sbt_decode[] = {
195 "/* UNKNOWN serial bus type */",
196 "I2C",
197 "SPI",
198 "UART"
199};
200
201/* I2C serial bus access mode */
202
203const char *acpi_gbl_am_decode[] = {
204 "AddressingMode7Bit",
205 "AddressingMode10Bit"
206};
207
208/* I2C serial bus slave mode */
209
210const char *acpi_gbl_sm_decode[] = {
211 "ControllerInitiated",
212 "DeviceInitiated"
213};
214
215/* SPI serial bus wire mode */
216
217const char *acpi_gbl_wm_decode[] = {
218 "FourWireMode",
219 "ThreeWireMode"
220};
221
222/* SPI serial clock phase */
223
224const char *acpi_gbl_cph_decode[] = {
225 "ClockPhaseFirst",
226 "ClockPhaseSecond"
227};
228
229/* SPI serial bus clock polarity */
230
231const char *acpi_gbl_cpo_decode[] = {
232 "ClockPolarityLow",
233 "ClockPolarityHigh"
234};
235
236/* SPI serial bus device polarity */
237
238const char *acpi_gbl_dp_decode[] = {
239 "PolarityLow",
240 "PolarityHigh"
241};
242
243/* UART serial bus endian */
244
245const char *acpi_gbl_ed_decode[] = {
246 "LittleEndian",
247 "BigEndian"
248};
249
250/* UART serial bus bits per byte */
251
252const char *acpi_gbl_bpb_decode[] = {
253 "DataBitsFive",
254 "DataBitsSix",
255 "DataBitsSeven",
256 "DataBitsEight",
257 "DataBitsNine",
258 "/* UNKNOWN Bits per byte */",
259 "/* UNKNOWN Bits per byte */",
260 "/* UNKNOWN Bits per byte */"
261};
262
263/* UART serial bus stop bits */
264
265const char *acpi_gbl_sb_decode[] = {
266 "StopBitsZero",
267 "StopBitsOne",
268 "StopBitsOnePlusHalf",
269 "StopBitsTwo"
270};
271
272/* UART serial bus flow control */
273
274const char *acpi_gbl_fc_decode[] = {
275 "FlowControlNone",
276 "FlowControlHardware",
277 "FlowControlXON",
278 "/* UNKNOWN flow control keyword */"
279};
280
281/* UART serial bus parity type */
282
283const char *acpi_gbl_pt_decode[] = {
284 "ParityTypeNone",
285 "ParityTypeEven",
286 "ParityTypeOdd",
287 "ParityTypeMark",
288 "ParityTypeSpace",
289 "/* UNKNOWN parity keyword */",
290 "/* UNKNOWN parity keyword */",
291 "/* UNKNOWN parity keyword */"
292};
293
294/* pin_config type */
295
296const char *acpi_gbl_ptyp_decode[] = {
297 "Default",
298 "Bias Pull-up",
299 "Bias Pull-down",
300 "Bias Default",
301 "Bias Disable",
302 "Bias High Impedance",
303 "Bias Bus Hold",
304 "Drive Open Drain",
305 "Drive Open Source",
306 "Drive Push Pull",
307 "Drive Strength",
308 "Slew Rate",
309 "Input Debounce",
310 "Input Schmitt Trigger",
311};
312
313#endif
314
315/* 51/*
316 * Base sizes of the raw AML resource descriptors, indexed by resource type. 52 * Base sizes of the raw AML resource descriptors, indexed by resource type.
317 * Zero indicates a reserved (and therefore invalid) resource type. 53 * Zero indicates a reserved (and therefore invalid) resource type.