aboutsummaryrefslogtreecommitdiffstats
path: root/include/acpi
diff options
context:
space:
mode:
authorLv Zheng <lv.zheng@intel.com>2012-12-19 20:07:26 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-01-10 06:36:17 -0500
commit739dcbb90a347a66f25cc0c3ef4eef3d4558f409 (patch)
treee71b91e0ac7195bbf201d06f41748e717ee8a968 /include/acpi
parent56324c1090ecf057c89a4d470a23a8ca61061b61 (diff)
ACPICA: Cleanup source to reduce differences between Linux and ACPICA.
This is a cosmetic patch only. Comparison of the resulting binary showed only line number differences. This patch does not affect the generation of the Linux binary. This patch decreases 389 lines of 20121018 divergence.diff. This patch reduces source code diff caused by the simple code maintenance work: 1. Deletion of the unused include files. 2. Deletion of the deprecated codes blocks. 3. Repositioning of the code blocks. 4. Replacing the values with the well defined macros. 5. Replacing the types with the equivalent types. Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/acpi')
-rw-r--r--include/acpi/acconfig.h22
-rw-r--r--include/acpi/acpiosxf.h7
-rw-r--r--include/acpi/acpixf.h43
-rw-r--r--include/acpi/actbl.h6
-rw-r--r--include/acpi/actypes.h5
-rw-r--r--include/acpi/platform/acenv.h2
6 files changed, 34 insertions, 51 deletions
diff --git a/include/acpi/acconfig.h b/include/acpi/acconfig.h
index 358258ad09f8..12a5996da67c 100644
--- a/include/acpi/acconfig.h
+++ b/include/acpi/acconfig.h
@@ -150,11 +150,6 @@
150 * 150 *
151 *****************************************************************************/ 151 *****************************************************************************/
152 152
153/* Number of distinct GPE register blocks and register width */
154
155#define ACPI_MAX_GPE_BLOCKS 2
156#define ACPI_GPE_REGISTER_WIDTH 8
157
158/* Method info (in WALK_STATE), containing local variables and argumetns */ 153/* Method info (in WALK_STATE), containing local variables and argumetns */
159 154
160#define ACPI_METHOD_NUM_LOCALS 8 155#define ACPI_METHOD_NUM_LOCALS 8
@@ -163,12 +158,6 @@
163#define ACPI_METHOD_NUM_ARGS 7 158#define ACPI_METHOD_NUM_ARGS 7
164#define ACPI_METHOD_MAX_ARG 6 159#define ACPI_METHOD_MAX_ARG 6
165 160
166/* Length of _HID, _UID, _CID, and UUID values */
167
168#define ACPI_DEVICE_ID_LENGTH 0x09
169#define ACPI_MAX_CID_LENGTH 48
170#define ACPI_UUID_LENGTH 16
171
172/* 161/*
173 * Operand Stack (in WALK_STATE), Must be large enough to contain METHOD_MAX_ARG 162 * Operand Stack (in WALK_STATE), Must be large enough to contain METHOD_MAX_ARG
174 */ 163 */
@@ -186,17 +175,6 @@
186 */ 175 */
187#define ACPI_RESULTS_OBJ_NUM_MAX 255 176#define ACPI_RESULTS_OBJ_NUM_MAX 255
188 177
189/* Names within the namespace are 4 bytes long */
190
191#define ACPI_NAME_SIZE 4
192#define ACPI_PATH_SEGMENT_LENGTH 5 /* 4 chars for name + 1 char for separator */
193#define ACPI_PATH_SEPARATOR '.'
194
195/* Sizes for ACPI table headers */
196
197#define ACPI_OEM_ID_SIZE 6
198#define ACPI_OEM_TABLE_ID_SIZE 8
199
200/* Constants used in searching for the RSDP in low memory */ 178/* Constants used in searching for the RSDP in low memory */
201 179
202#define ACPI_EBDA_PTR_LOCATION 0x0000040E /* Physical Address */ 180#define ACPI_EBDA_PTR_LOCATION 0x0000040E /* Physical Address */
diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h
index 43152742b46f..33a3e17da362 100644
--- a/include/acpi/acpiosxf.h
+++ b/include/acpi/acpiosxf.h
@@ -148,6 +148,8 @@ void acpi_os_release_mutex(acpi_mutex handle);
148 */ 148 */
149void *acpi_os_allocate(acpi_size size); 149void *acpi_os_allocate(acpi_size size);
150 150
151void acpi_os_free(void *memory);
152
151void __iomem *acpi_os_map_memory(acpi_physical_address where, 153void __iomem *acpi_os_map_memory(acpi_physical_address where,
152 acpi_size length); 154 acpi_size length);
153 155
@@ -180,12 +182,13 @@ acpi_status acpi_os_release_object(acpi_cache_t * cache, void *object);
180 * Interrupt handlers 182 * Interrupt handlers
181 */ 183 */
182acpi_status 184acpi_status
183acpi_os_install_interrupt_handler(u32 gsi, 185acpi_os_install_interrupt_handler(u32 interrupt_number,
184 acpi_osd_handler service_routine, 186 acpi_osd_handler service_routine,
185 void *context); 187 void *context);
186 188
187acpi_status 189acpi_status
188acpi_os_remove_interrupt_handler(u32 gsi, acpi_osd_handler service_routine); 190acpi_os_remove_interrupt_handler(u32 interrupt_number,
191 acpi_osd_handler service_routine);
189 192
190void acpi_os_gpe_count(u32 gpe_number); 193void acpi_os_gpe_count(u32 gpe_number);
191void acpi_os_fixed_event_count(u32 fixed_event_number); 194void acpi_os_fixed_event_count(u32 fixed_event_number);
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
index defbcaa90f40..b409406d3ccf 100644
--- a/include/acpi/acpixf.h
+++ b/include/acpi/acpixf.h
@@ -58,6 +58,10 @@ extern u8 acpi_gbl_permanent_mmap;
58/* 58/*
59 * Globals that are publically available 59 * Globals that are publically available
60 */ 60 */
61extern u32 acpi_current_gpe_count;
62extern struct acpi_table_fadt acpi_gbl_FADT;
63extern u8 acpi_gbl_system_awake_and_running;
64extern u8 acpi_gbl_reduced_hardware; /* ACPI 5.0 */
61/* Runtime configuration of debug print levels */ 65/* Runtime configuration of debug print levels */
62extern u32 acpi_dbg_level; 66extern u32 acpi_dbg_level;
63extern u32 acpi_dbg_layer; 67extern u32 acpi_dbg_layer;
@@ -100,11 +104,6 @@ extern u8 acpi_gbl_disable_auto_repair;
100 104
101#endif /* !ACPI_REDUCED_HARDWARE */ 105#endif /* !ACPI_REDUCED_HARDWARE */
102 106
103extern u32 acpi_current_gpe_count;
104extern struct acpi_table_fadt acpi_gbl_FADT;
105extern u8 acpi_gbl_system_awake_and_running;
106extern u8 acpi_gbl_reduced_hardware; /* ACPI 5.0 */
107
108extern u32 acpi_rsdt_forced; 107extern u32 acpi_rsdt_forced;
109/* 108/*
110 * Initialization 109 * Initialization
@@ -121,15 +120,14 @@ acpi_status acpi_initialize_objects(u32 flags);
121 120
122acpi_status acpi_terminate(void); 121acpi_status acpi_terminate(void);
123 122
124#ifdef ACPI_FUTURE_USAGE
125acpi_status acpi_subsystem_status(void);
126#endif
127
128/* 123/*
129 * Miscellaneous global interfaces 124 * Miscellaneous global interfaces
130 */ 125 */
131ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enable(void)) 126ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enable(void))
132ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_disable(void)) 127ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_disable(void))
128#ifdef ACPI_FUTURE_USAGE
129acpi_status acpi_subsystem_status(void);
130#endif
133 131
134#ifdef ACPI_FUTURE_USAGE 132#ifdef ACPI_FUTURE_USAGE
135acpi_status acpi_get_system_info(struct acpi_buffer *ret_buffer); 133acpi_status acpi_get_system_info(struct acpi_buffer *ret_buffer);
@@ -466,6 +464,10 @@ acpi_buffer_to_resource(u8 *aml_buffer,
466 */ 464 */
467acpi_status acpi_reset(void); 465acpi_status acpi_reset(void);
468 466
467acpi_status acpi_read(u64 *value, struct acpi_generic_address *reg);
468
469acpi_status acpi_write(u64 value, struct acpi_generic_address *reg);
470
469ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status 471ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
470 acpi_read_bit_register(u32 register_id, 472 acpi_read_bit_register(u32 register_id,
471 u32 *return_value)) 473 u32 *return_value))
@@ -474,20 +476,6 @@ ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
474 acpi_write_bit_register(u32 register_id, 476 acpi_write_bit_register(u32 register_id,
475 u32 value)) 477 u32 value))
476 478
477ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
478 acpi_set_firmware_waking_vector(u32
479 physical_address))
480
481#if ACPI_MACHINE_WIDTH == 64
482ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
483 acpi_set_firmware_waking_vector64(u64
484 physical_address))
485#endif
486
487acpi_status acpi_read(u64 *value, struct acpi_generic_address *reg);
488
489acpi_status acpi_write(u64 value, struct acpi_generic_address *reg);
490
491/* 479/*
492 * Sleep/Wake interfaces 480 * Sleep/Wake interfaces
493 */ 481 */
@@ -504,6 +492,15 @@ acpi_status acpi_leave_sleep_state_prep(u8 sleep_state);
504 492
505acpi_status acpi_leave_sleep_state(u8 sleep_state); 493acpi_status acpi_leave_sleep_state(u8 sleep_state);
506 494
495ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
496 acpi_set_firmware_waking_vector(u32
497 physical_address))
498
499#if ACPI_MACHINE_WIDTH == 64
500ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
501 acpi_set_firmware_waking_vector64(u64
502 physical_address))
503#endif
507/* 504/*
508 * ACPI Timer interfaces 505 * ACPI Timer interfaces
509 */ 506 */
diff --git a/include/acpi/actbl.h b/include/acpi/actbl.h
index 4f94b1d812d5..c0e6c32353ed 100644
--- a/include/acpi/actbl.h
+++ b/include/acpi/actbl.h
@@ -326,8 +326,6 @@ enum acpi_preferred_pm_profiles {
326 326
327#pragma pack() 327#pragma pack()
328 328
329#define ACPI_FADT_OFFSET(f) (u16) ACPI_OFFSET (struct acpi_table_fadt, f)
330
331/* 329/*
332 * Internal table-related structures 330 * Internal table-related structures
333 */ 331 */
@@ -364,6 +362,10 @@ struct acpi_table_desc {
364#include <acpi/actbl2.h> 362#include <acpi/actbl2.h>
365#include <acpi/actbl3.h> 363#include <acpi/actbl3.h>
366 364
365/* Macros used to generate offsets to specific table fields */
366
367#define ACPI_FADT_OFFSET(f) (u16) ACPI_OFFSET (struct acpi_table_fadt, f)
368
367/* 369/*
368 * Sizes of the various flavors of FADT. We need to look closely 370 * Sizes of the various flavors of FADT. We need to look closely
369 * at the FADT length because the version number essentially tells 371 * at the FADT length because the version number essentially tells
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h
index 35d4dea0bd37..6882227d1706 100644
--- a/include/acpi/actypes.h
+++ b/include/acpi/actypes.h
@@ -474,6 +474,7 @@ typedef u64 acpi_integer;
474 */ 474 */
475#define ACPI_FULL_INITIALIZATION 0x00 475#define ACPI_FULL_INITIALIZATION 0x00
476#define ACPI_NO_ADDRESS_SPACE_INIT 0x01 476#define ACPI_NO_ADDRESS_SPACE_INIT 0x01
477#define ACPI_NO_HARDWARE_INIT 0x02
477#define ACPI_NO_EVENT_INIT 0x04 478#define ACPI_NO_EVENT_INIT 0x04
478#define ACPI_NO_HANDLER_INIT 0x08 479#define ACPI_NO_HANDLER_INIT 0x08
479#define ACPI_NO_ACPI_ENABLE 0x10 480#define ACPI_NO_ACPI_ENABLE 0x10
@@ -970,6 +971,10 @@ acpi_status(*acpi_exception_handler) (acpi_status aml_status,
970typedef 971typedef
971acpi_status(*acpi_tbl_handler) (u32 event, void *table, void *context); 972acpi_status(*acpi_tbl_handler) (u32 event, void *table, void *context);
972 973
974#define ACPI_TABLE_LOAD 0x0
975#define ACPI_TABLE_UNLOAD 0x1
976#define ACPI_NUM_TABLE_EVENTS 2
977
973/* Address Spaces (For Operation Regions) */ 978/* Address Spaces (For Operation Regions) */
974 979
975typedef 980typedef
diff --git a/include/acpi/platform/acenv.h b/include/acpi/platform/acenv.h
index 13ac538f7892..cec6cd3e850d 100644
--- a/include/acpi/platform/acenv.h
+++ b/include/acpi/platform/acenv.h
@@ -277,8 +277,6 @@
277 * 277 *
278 *****************************************************************************/ 278 *****************************************************************************/
279 279
280#define ACPI_IS_ASCII(c) ((c) < 0x80)
281
282/* 280/*
283 * ACPI_USE_SYSTEM_CLIBRARY - Define this if linking to an actual C library. 281 * ACPI_USE_SYSTEM_CLIBRARY - Define this if linking to an actual C library.
284 * Otherwise, local versions of string/memory functions will be used. 282 * Otherwise, local versions of string/memory functions will be used.