diff options
author | Len Brown <len.brown@intel.com> | 2005-08-05 00:44:28 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2005-08-05 00:45:14 -0400 |
commit | 4be44fcd3bf648b782f4460fd06dfae6c42ded4b (patch) | |
tree | 5b5b7d296ea58786f53b95e5eac9565ff66890b0 /include/acpi/acpiosxf.h | |
parent | c65ade4dc8b486e8c8b9b0a6399789a5428e2039 (diff) |
[ACPI] Lindent all ACPI files
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'include/acpi/acpiosxf.h')
-rw-r--r-- | include/acpi/acpiosxf.h | 275 |
1 files changed, 70 insertions, 205 deletions
diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h index 819a53f83cf..98e0b8cd14e 100644 --- a/include/acpi/acpiosxf.h +++ b/include/acpi/acpiosxf.h | |||
@@ -7,7 +7,6 @@ | |||
7 | * | 7 | * |
8 | *****************************************************************************/ | 8 | *****************************************************************************/ |
9 | 9 | ||
10 | |||
11 | /* | 10 | /* |
12 | * Copyright (C) 2000 - 2005, R. Byron Moore | 11 | * Copyright (C) 2000 - 2005, R. Byron Moore |
13 | * All rights reserved. | 12 | * All rights reserved. |
@@ -51,7 +50,6 @@ | |||
51 | #include "platform/acenv.h" | 50 | #include "platform/acenv.h" |
52 | #include "actypes.h" | 51 | #include "actypes.h" |
53 | 52 | ||
54 | |||
55 | /* Priorities for acpi_os_queue_for_execution */ | 53 | /* Priorities for acpi_os_queue_for_execution */ |
56 | 54 | ||
57 | #define OSD_PRIORITY_GPE 1 | 55 | #define OSD_PRIORITY_GPE 1 |
@@ -62,227 +60,136 @@ | |||
62 | #define ACPI_NO_UNIT_LIMIT ((u32) -1) | 60 | #define ACPI_NO_UNIT_LIMIT ((u32) -1) |
63 | #define ACPI_MUTEX_SEM 1 | 61 | #define ACPI_MUTEX_SEM 1 |
64 | 62 | ||
65 | |||
66 | /* Functions for acpi_os_signal */ | 63 | /* Functions for acpi_os_signal */ |
67 | 64 | ||
68 | #define ACPI_SIGNAL_FATAL 0 | 65 | #define ACPI_SIGNAL_FATAL 0 |
69 | #define ACPI_SIGNAL_BREAKPOINT 1 | 66 | #define ACPI_SIGNAL_BREAKPOINT 1 |
70 | 67 | ||
71 | struct acpi_signal_fatal_info | 68 | struct acpi_signal_fatal_info { |
72 | { | 69 | u32 type; |
73 | u32 type; | 70 | u32 code; |
74 | u32 code; | 71 | u32 argument; |
75 | u32 argument; | ||
76 | }; | 72 | }; |
77 | 73 | ||
78 | |||
79 | /* | 74 | /* |
80 | * OSL Initialization and shutdown primitives | 75 | * OSL Initialization and shutdown primitives |
81 | */ | 76 | */ |
82 | acpi_status | 77 | acpi_status acpi_os_initialize(void); |
83 | acpi_os_initialize ( | ||
84 | void); | ||
85 | |||
86 | acpi_status | ||
87 | acpi_os_terminate ( | ||
88 | void); | ||
89 | 78 | ||
79 | acpi_status acpi_os_terminate(void); | ||
90 | 80 | ||
91 | /* | 81 | /* |
92 | * ACPI Table interfaces | 82 | * ACPI Table interfaces |
93 | */ | 83 | */ |
94 | acpi_status | 84 | acpi_status acpi_os_get_root_pointer(u32 flags, struct acpi_pointer *address); |
95 | acpi_os_get_root_pointer ( | ||
96 | u32 flags, | ||
97 | struct acpi_pointer *address); | ||
98 | 85 | ||
99 | acpi_status | 86 | acpi_status |
100 | acpi_os_predefined_override ( | 87 | acpi_os_predefined_override(const struct acpi_predefined_names *init_val, |
101 | const struct acpi_predefined_names *init_val, | 88 | acpi_string * new_val); |
102 | acpi_string *new_val); | ||
103 | 89 | ||
104 | acpi_status | 90 | acpi_status |
105 | acpi_os_table_override ( | 91 | acpi_os_table_override(struct acpi_table_header *existing_table, |
106 | struct acpi_table_header *existing_table, | 92 | struct acpi_table_header **new_table); |
107 | struct acpi_table_header **new_table); | ||
108 | |||
109 | 93 | ||
110 | /* | 94 | /* |
111 | * Synchronization primitives | 95 | * Synchronization primitives |
112 | */ | 96 | */ |
113 | acpi_status | 97 | acpi_status |
114 | acpi_os_create_semaphore ( | 98 | acpi_os_create_semaphore(u32 max_units, |
115 | u32 max_units, | 99 | u32 initial_units, acpi_handle * out_handle); |
116 | u32 initial_units, | ||
117 | acpi_handle *out_handle); | ||
118 | |||
119 | acpi_status | ||
120 | acpi_os_delete_semaphore ( | ||
121 | acpi_handle handle); | ||
122 | 100 | ||
123 | acpi_status | 101 | acpi_status acpi_os_delete_semaphore(acpi_handle handle); |
124 | acpi_os_wait_semaphore ( | ||
125 | acpi_handle handle, | ||
126 | u32 units, | ||
127 | u16 timeout); | ||
128 | 102 | ||
129 | acpi_status | 103 | acpi_status acpi_os_wait_semaphore(acpi_handle handle, u32 units, u16 timeout); |
130 | acpi_os_signal_semaphore ( | ||
131 | acpi_handle handle, | ||
132 | u32 units); | ||
133 | 104 | ||
134 | acpi_status | 105 | acpi_status acpi_os_signal_semaphore(acpi_handle handle, u32 units); |
135 | acpi_os_create_lock ( | ||
136 | acpi_handle *out_handle); | ||
137 | 106 | ||
138 | void | 107 | acpi_status acpi_os_create_lock(acpi_handle * out_handle); |
139 | acpi_os_delete_lock ( | ||
140 | acpi_handle handle); | ||
141 | 108 | ||
142 | unsigned long | 109 | void acpi_os_delete_lock(acpi_handle handle); |
143 | acpi_os_acquire_lock ( | ||
144 | acpi_handle handle); | ||
145 | 110 | ||
146 | void | 111 | unsigned long acpi_os_acquire_lock(acpi_handle handle); |
147 | acpi_os_release_lock ( | ||
148 | acpi_handle handle, | ||
149 | unsigned long flags); | ||
150 | 112 | ||
113 | void acpi_os_release_lock(acpi_handle handle, unsigned long flags); | ||
151 | 114 | ||
152 | /* | 115 | /* |
153 | * Memory allocation and mapping | 116 | * Memory allocation and mapping |
154 | */ | 117 | */ |
155 | void * | 118 | void *acpi_os_allocate(acpi_size size); |
156 | acpi_os_allocate ( | ||
157 | acpi_size size); | ||
158 | 119 | ||
159 | void | 120 | void acpi_os_free(void *memory); |
160 | acpi_os_free ( | ||
161 | void * memory); | ||
162 | 121 | ||
163 | acpi_status | 122 | acpi_status |
164 | acpi_os_map_memory ( | 123 | acpi_os_map_memory(acpi_physical_address physical_address, |
165 | acpi_physical_address physical_address, | 124 | acpi_size size, void __iomem ** logical_address); |
166 | acpi_size size, | ||
167 | void __iomem **logical_address); | ||
168 | 125 | ||
169 | void | 126 | void acpi_os_unmap_memory(void __iomem * logical_address, acpi_size size); |
170 | acpi_os_unmap_memory ( | ||
171 | void __iomem *logical_address, | ||
172 | acpi_size size); | ||
173 | 127 | ||
174 | #ifdef ACPI_FUTURE_USAGE | 128 | #ifdef ACPI_FUTURE_USAGE |
175 | acpi_status | 129 | acpi_status |
176 | acpi_os_get_physical_address ( | 130 | acpi_os_get_physical_address(void *logical_address, |
177 | void *logical_address, | 131 | acpi_physical_address * physical_address); |
178 | acpi_physical_address *physical_address); | ||
179 | #endif | 132 | #endif |
180 | 133 | ||
181 | |||
182 | |||
183 | /* | 134 | /* |
184 | * Memory/Object Cache | 135 | * Memory/Object Cache |
185 | */ | 136 | */ |
186 | acpi_status | 137 | acpi_status |
187 | acpi_os_create_cache ( | 138 | acpi_os_create_cache(char *cache_name, |
188 | char *cache_name, | 139 | u16 object_size, |
189 | u16 object_size, | 140 | u16 max_depth, acpi_cache_t ** return_cache); |
190 | u16 max_depth, | ||
191 | acpi_cache_t **return_cache); | ||
192 | 141 | ||
193 | acpi_status | 142 | acpi_status acpi_os_delete_cache(acpi_cache_t * cache); |
194 | acpi_os_delete_cache ( | ||
195 | acpi_cache_t *cache); | ||
196 | 143 | ||
197 | acpi_status | 144 | acpi_status acpi_os_purge_cache(acpi_cache_t * cache); |
198 | acpi_os_purge_cache ( | ||
199 | acpi_cache_t *cache); | ||
200 | 145 | ||
201 | void * | 146 | void *acpi_os_acquire_object(acpi_cache_t * cache); |
202 | acpi_os_acquire_object ( | ||
203 | acpi_cache_t *cache); | ||
204 | 147 | ||
205 | acpi_status | 148 | acpi_status acpi_os_release_object(acpi_cache_t * cache, void *object); |
206 | acpi_os_release_object ( | ||
207 | acpi_cache_t *cache, | ||
208 | void *object); | ||
209 | 149 | ||
210 | /* | 150 | /* |
211 | * Interrupt handlers | 151 | * Interrupt handlers |
212 | */ | 152 | */ |
213 | acpi_status | 153 | acpi_status |
214 | acpi_os_install_interrupt_handler ( | 154 | acpi_os_install_interrupt_handler(u32 gsi, |
215 | u32 gsi, | 155 | acpi_osd_handler service_routine, |
216 | acpi_osd_handler service_routine, | 156 | void *context); |
217 | void *context); | ||
218 | 157 | ||
219 | acpi_status | 158 | acpi_status |
220 | acpi_os_remove_interrupt_handler ( | 159 | acpi_os_remove_interrupt_handler(u32 gsi, acpi_osd_handler service_routine); |
221 | u32 gsi, | ||
222 | acpi_osd_handler service_routine); | ||
223 | |||
224 | 160 | ||
225 | /* | 161 | /* |
226 | * Threads and Scheduling | 162 | * Threads and Scheduling |
227 | */ | 163 | */ |
228 | u32 | 164 | u32 acpi_os_get_thread_id(void); |
229 | acpi_os_get_thread_id ( | ||
230 | void); | ||
231 | 165 | ||
232 | acpi_status | 166 | acpi_status |
233 | acpi_os_queue_for_execution ( | 167 | acpi_os_queue_for_execution(u32 priority, |
234 | u32 priority, | 168 | acpi_osd_exec_callback function, void *context); |
235 | acpi_osd_exec_callback function, | ||
236 | void *context); | ||
237 | |||
238 | void | ||
239 | acpi_os_wait_events_complete( | ||
240 | void * context); | ||
241 | 169 | ||
242 | void | 170 | void acpi_os_wait_events_complete(void *context); |
243 | acpi_os_wait_events_complete ( | ||
244 | void *context); | ||
245 | 171 | ||
246 | void | 172 | void acpi_os_wait_events_complete(void *context); |
247 | acpi_os_sleep ( | ||
248 | acpi_integer milliseconds); | ||
249 | 173 | ||
250 | void | 174 | void acpi_os_sleep(acpi_integer milliseconds); |
251 | acpi_os_stall ( | ||
252 | u32 microseconds); | ||
253 | 175 | ||
176 | void acpi_os_stall(u32 microseconds); | ||
254 | 177 | ||
255 | /* | 178 | /* |
256 | * Platform and hardware-independent I/O interfaces | 179 | * Platform and hardware-independent I/O interfaces |
257 | */ | 180 | */ |
258 | acpi_status | 181 | acpi_status acpi_os_read_port(acpi_io_address address, u32 * value, u32 width); |
259 | acpi_os_read_port ( | ||
260 | acpi_io_address address, | ||
261 | u32 *value, | ||
262 | u32 width); | ||
263 | |||
264 | acpi_status | ||
265 | acpi_os_write_port ( | ||
266 | acpi_io_address address, | ||
267 | u32 value, | ||
268 | u32 width); | ||
269 | 182 | ||
183 | acpi_status acpi_os_write_port(acpi_io_address address, u32 value, u32 width); | ||
270 | 184 | ||
271 | /* | 185 | /* |
272 | * Platform and hardware-independent physical memory interfaces | 186 | * Platform and hardware-independent physical memory interfaces |
273 | */ | 187 | */ |
274 | acpi_status | 188 | acpi_status |
275 | acpi_os_read_memory ( | 189 | acpi_os_read_memory(acpi_physical_address address, u32 * value, u32 width); |
276 | acpi_physical_address address, | ||
277 | u32 *value, | ||
278 | u32 width); | ||
279 | 190 | ||
280 | acpi_status | 191 | acpi_status |
281 | acpi_os_write_memory ( | 192 | acpi_os_write_memory(acpi_physical_address address, u32 value, u32 width); |
282 | acpi_physical_address address, | ||
283 | u32 value, | ||
284 | u32 width); | ||
285 | |||
286 | 193 | ||
287 | /* | 194 | /* |
288 | * Platform and hardware-independent PCI configuration space access | 195 | * Platform and hardware-independent PCI configuration space access |
@@ -290,111 +197,69 @@ acpi_os_write_memory ( | |||
290 | * certain compilers complain. | 197 | * certain compilers complain. |
291 | */ | 198 | */ |
292 | acpi_status | 199 | acpi_status |
293 | acpi_os_read_pci_configuration ( | 200 | acpi_os_read_pci_configuration(struct acpi_pci_id *pci_id, |
294 | struct acpi_pci_id *pci_id, | 201 | u32 reg, void *value, u32 width); |
295 | u32 reg, | ||
296 | void *value, | ||
297 | u32 width); | ||
298 | 202 | ||
299 | acpi_status | 203 | acpi_status |
300 | acpi_os_write_pci_configuration ( | 204 | acpi_os_write_pci_configuration(struct acpi_pci_id *pci_id, |
301 | struct acpi_pci_id *pci_id, | 205 | u32 reg, acpi_integer value, u32 width); |
302 | u32 reg, | ||
303 | acpi_integer value, | ||
304 | u32 width); | ||
305 | 206 | ||
306 | /* | 207 | /* |
307 | * Interim function needed for PCI IRQ routing | 208 | * Interim function needed for PCI IRQ routing |
308 | */ | 209 | */ |
309 | void | 210 | void |
310 | acpi_os_derive_pci_id( | 211 | acpi_os_derive_pci_id(acpi_handle rhandle, |
311 | acpi_handle rhandle, | 212 | acpi_handle chandle, struct acpi_pci_id **pci_id); |
312 | acpi_handle chandle, | ||
313 | struct acpi_pci_id **pci_id); | ||
314 | 213 | ||
315 | /* | 214 | /* |
316 | * Miscellaneous | 215 | * Miscellaneous |
317 | */ | 216 | */ |
318 | u8 | 217 | u8 acpi_os_readable(void *pointer, acpi_size length); |
319 | acpi_os_readable ( | ||
320 | void *pointer, | ||
321 | acpi_size length); | ||
322 | 218 | ||
323 | #ifdef ACPI_FUTURE_USAGE | 219 | #ifdef ACPI_FUTURE_USAGE |
324 | u8 | 220 | u8 acpi_os_writable(void *pointer, acpi_size length); |
325 | acpi_os_writable ( | ||
326 | void *pointer, | ||
327 | acpi_size length); | ||
328 | #endif | 221 | #endif |
329 | 222 | ||
330 | u64 | 223 | u64 acpi_os_get_timer(void); |
331 | acpi_os_get_timer ( | ||
332 | void); | ||
333 | 224 | ||
334 | acpi_status | 225 | acpi_status acpi_os_signal(u32 function, void *info); |
335 | acpi_os_signal ( | ||
336 | u32 function, | ||
337 | void *info); | ||
338 | 226 | ||
339 | /* | 227 | /* |
340 | * Debug print routines | 228 | * Debug print routines |
341 | */ | 229 | */ |
342 | void ACPI_INTERNAL_VAR_XFACE | 230 | void ACPI_INTERNAL_VAR_XFACE acpi_os_printf(const char *format, ...); |
343 | acpi_os_printf ( | ||
344 | const char *format, | ||
345 | ...); | ||
346 | |||
347 | void | ||
348 | acpi_os_vprintf ( | ||
349 | const char *format, | ||
350 | va_list args); | ||
351 | 231 | ||
352 | void | 232 | void acpi_os_vprintf(const char *format, va_list args); |
353 | acpi_os_redirect_output ( | ||
354 | void *destination); | ||
355 | 233 | ||
234 | void acpi_os_redirect_output(void *destination); | ||
356 | 235 | ||
357 | #ifdef ACPI_FUTURE_USAGE | 236 | #ifdef ACPI_FUTURE_USAGE |
358 | /* | 237 | /* |
359 | * Debug input | 238 | * Debug input |
360 | */ | 239 | */ |
361 | u32 | 240 | u32 acpi_os_get_line(char *buffer); |
362 | acpi_os_get_line ( | ||
363 | char *buffer); | ||
364 | #endif | 241 | #endif |
365 | 242 | ||
366 | |||
367 | /* | 243 | /* |
368 | * Directory manipulation | 244 | * Directory manipulation |
369 | */ | 245 | */ |
370 | void * | 246 | void *acpi_os_open_directory(char *pathname, |
371 | acpi_os_open_directory ( | 247 | char *wildcard_spec, char requested_file_type); |
372 | char *pathname, | ||
373 | char *wildcard_spec, | ||
374 | char requested_file_type); | ||
375 | 248 | ||
376 | /* requeste_file_type values */ | 249 | /* requeste_file_type values */ |
377 | 250 | ||
378 | #define REQUEST_FILE_ONLY 0 | 251 | #define REQUEST_FILE_ONLY 0 |
379 | #define REQUEST_DIR_ONLY 1 | 252 | #define REQUEST_DIR_ONLY 1 |
380 | 253 | ||
254 | char *acpi_os_get_next_filename(void *dir_handle); | ||
381 | 255 | ||
382 | char * | 256 | void acpi_os_close_directory(void *dir_handle); |
383 | acpi_os_get_next_filename ( | ||
384 | void *dir_handle); | ||
385 | |||
386 | void | ||
387 | acpi_os_close_directory ( | ||
388 | void *dir_handle); | ||
389 | 257 | ||
390 | /* | 258 | /* |
391 | * Debug | 259 | * Debug |
392 | */ | 260 | */ |
393 | void | 261 | void |
394 | acpi_os_dbg_assert( | 262 | acpi_os_dbg_assert(void *failed_assertion, |
395 | void *failed_assertion, | 263 | void *file_name, u32 line_number, char *message); |
396 | void *file_name, | ||
397 | u32 line_number, | ||
398 | char *message); | ||
399 | 264 | ||
400 | #endif /* __ACPIOSXF_H__ */ | 265 | #endif /* __ACPIOSXF_H__ */ |