summaryrefslogtreecommitdiffstats
path: root/include/acpi
diff options
context:
space:
mode:
authorLv Zheng <lv.zheng@intel.com>2012-12-20 01:07:26 +0000
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-01-10 12:36:17 +0100
commit739dcbb90a347a66f25cc0c3ef4eef3d4558f409 (patch)
treee71b91e0ac7195bbf201d06f41748e717ee8a968 /include/acpi
parent56324c1090ecf057c89a4d470a23a8ca61061b61 (diff)
downloadop-kernel-dev-739dcbb90a347a66f25cc0c3ef4eef3d4558f409.zip
op-kernel-dev-739dcbb90a347a66f25cc0c3ef4eef3d4558f409.tar.gz
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 358258a..12a5996 100644
--- a/include/acpi/acconfig.h
+++ b/include/acpi/acconfig.h
@@ -150,11 +150,6 @@
*
*****************************************************************************/
-/* Number of distinct GPE register blocks and register width */
-
-#define ACPI_MAX_GPE_BLOCKS 2
-#define ACPI_GPE_REGISTER_WIDTH 8
-
/* Method info (in WALK_STATE), containing local variables and argumetns */
#define ACPI_METHOD_NUM_LOCALS 8
@@ -163,12 +158,6 @@
#define ACPI_METHOD_NUM_ARGS 7
#define ACPI_METHOD_MAX_ARG 6
-/* Length of _HID, _UID, _CID, and UUID values */
-
-#define ACPI_DEVICE_ID_LENGTH 0x09
-#define ACPI_MAX_CID_LENGTH 48
-#define ACPI_UUID_LENGTH 16
-
/*
* Operand Stack (in WALK_STATE), Must be large enough to contain METHOD_MAX_ARG
*/
@@ -186,17 +175,6 @@
*/
#define ACPI_RESULTS_OBJ_NUM_MAX 255
-/* Names within the namespace are 4 bytes long */
-
-#define ACPI_NAME_SIZE 4
-#define ACPI_PATH_SEGMENT_LENGTH 5 /* 4 chars for name + 1 char for separator */
-#define ACPI_PATH_SEPARATOR '.'
-
-/* Sizes for ACPI table headers */
-
-#define ACPI_OEM_ID_SIZE 6
-#define ACPI_OEM_TABLE_ID_SIZE 8
-
/* Constants used in searching for the RSDP in low memory */
#define ACPI_EBDA_PTR_LOCATION 0x0000040E /* Physical Address */
diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h
index 4315274..33a3e17 100644
--- a/include/acpi/acpiosxf.h
+++ b/include/acpi/acpiosxf.h
@@ -148,6 +148,8 @@ void acpi_os_release_mutex(acpi_mutex handle);
*/
void *acpi_os_allocate(acpi_size size);
+void acpi_os_free(void *memory);
+
void __iomem *acpi_os_map_memory(acpi_physical_address where,
acpi_size length);
@@ -180,12 +182,13 @@ acpi_status acpi_os_release_object(acpi_cache_t * cache, void *object);
* Interrupt handlers
*/
acpi_status
-acpi_os_install_interrupt_handler(u32 gsi,
+acpi_os_install_interrupt_handler(u32 interrupt_number,
acpi_osd_handler service_routine,
void *context);
acpi_status
-acpi_os_remove_interrupt_handler(u32 gsi, acpi_osd_handler service_routine);
+acpi_os_remove_interrupt_handler(u32 interrupt_number,
+ acpi_osd_handler service_routine);
void acpi_os_gpe_count(u32 gpe_number);
void acpi_os_fixed_event_count(u32 fixed_event_number);
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
index defbcaa..b409406 100644
--- a/include/acpi/acpixf.h
+++ b/include/acpi/acpixf.h
@@ -58,6 +58,10 @@ extern u8 acpi_gbl_permanent_mmap;
/*
* Globals that are publically available
*/
+extern u32 acpi_current_gpe_count;
+extern struct acpi_table_fadt acpi_gbl_FADT;
+extern u8 acpi_gbl_system_awake_and_running;
+extern u8 acpi_gbl_reduced_hardware; /* ACPI 5.0 */
/* Runtime configuration of debug print levels */
extern u32 acpi_dbg_level;
extern u32 acpi_dbg_layer;
@@ -100,11 +104,6 @@ extern u8 acpi_gbl_disable_auto_repair;
#endif /* !ACPI_REDUCED_HARDWARE */
-extern u32 acpi_current_gpe_count;
-extern struct acpi_table_fadt acpi_gbl_FADT;
-extern u8 acpi_gbl_system_awake_and_running;
-extern u8 acpi_gbl_reduced_hardware; /* ACPI 5.0 */
-
extern u32 acpi_rsdt_forced;
/*
* Initialization
@@ -121,15 +120,14 @@ acpi_status acpi_initialize_objects(u32 flags);
acpi_status acpi_terminate(void);
-#ifdef ACPI_FUTURE_USAGE
-acpi_status acpi_subsystem_status(void);
-#endif
-
/*
* Miscellaneous global interfaces
*/
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enable(void))
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_disable(void))
+#ifdef ACPI_FUTURE_USAGE
+acpi_status acpi_subsystem_status(void);
+#endif
#ifdef ACPI_FUTURE_USAGE
acpi_status acpi_get_system_info(struct acpi_buffer *ret_buffer);
@@ -466,6 +464,10 @@ acpi_buffer_to_resource(u8 *aml_buffer,
*/
acpi_status acpi_reset(void);
+acpi_status acpi_read(u64 *value, struct acpi_generic_address *reg);
+
+acpi_status acpi_write(u64 value, struct acpi_generic_address *reg);
+
ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
acpi_read_bit_register(u32 register_id,
u32 *return_value))
@@ -474,20 +476,6 @@ ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
acpi_write_bit_register(u32 register_id,
u32 value))
-ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
- acpi_set_firmware_waking_vector(u32
- physical_address))
-
-#if ACPI_MACHINE_WIDTH == 64
-ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
- acpi_set_firmware_waking_vector64(u64
- physical_address))
-#endif
-
-acpi_status acpi_read(u64 *value, struct acpi_generic_address *reg);
-
-acpi_status acpi_write(u64 value, struct acpi_generic_address *reg);
-
/*
* Sleep/Wake interfaces
*/
@@ -504,6 +492,15 @@ acpi_status acpi_leave_sleep_state_prep(u8 sleep_state);
acpi_status acpi_leave_sleep_state(u8 sleep_state);
+ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
+ acpi_set_firmware_waking_vector(u32
+ physical_address))
+
+#if ACPI_MACHINE_WIDTH == 64
+ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status
+ acpi_set_firmware_waking_vector64(u64
+ physical_address))
+#endif
/*
* ACPI Timer interfaces
*/
diff --git a/include/acpi/actbl.h b/include/acpi/actbl.h
index 4f94b1d..c0e6c32 100644
--- a/include/acpi/actbl.h
+++ b/include/acpi/actbl.h
@@ -326,8 +326,6 @@ enum acpi_preferred_pm_profiles {
#pragma pack()
-#define ACPI_FADT_OFFSET(f) (u16) ACPI_OFFSET (struct acpi_table_fadt, f)
-
/*
* Internal table-related structures
*/
@@ -364,6 +362,10 @@ struct acpi_table_desc {
#include <acpi/actbl2.h>
#include <acpi/actbl3.h>
+/* Macros used to generate offsets to specific table fields */
+
+#define ACPI_FADT_OFFSET(f) (u16) ACPI_OFFSET (struct acpi_table_fadt, f)
+
/*
* Sizes of the various flavors of FADT. We need to look closely
* at the FADT length because the version number essentially tells
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h
index 35d4dea0..6882227 100644
--- a/include/acpi/actypes.h
+++ b/include/acpi/actypes.h
@@ -474,6 +474,7 @@ typedef u64 acpi_integer;
*/
#define ACPI_FULL_INITIALIZATION 0x00
#define ACPI_NO_ADDRESS_SPACE_INIT 0x01
+#define ACPI_NO_HARDWARE_INIT 0x02
#define ACPI_NO_EVENT_INIT 0x04
#define ACPI_NO_HANDLER_INIT 0x08
#define ACPI_NO_ACPI_ENABLE 0x10
@@ -970,6 +971,10 @@ acpi_status(*acpi_exception_handler) (acpi_status aml_status,
typedef
acpi_status(*acpi_tbl_handler) (u32 event, void *table, void *context);
+#define ACPI_TABLE_LOAD 0x0
+#define ACPI_TABLE_UNLOAD 0x1
+#define ACPI_NUM_TABLE_EVENTS 2
+
/* Address Spaces (For Operation Regions) */
typedef
diff --git a/include/acpi/platform/acenv.h b/include/acpi/platform/acenv.h
index 13ac538..cec6cd3 100644
--- a/include/acpi/platform/acenv.h
+++ b/include/acpi/platform/acenv.h
@@ -277,8 +277,6 @@
*
*****************************************************************************/
-#define ACPI_IS_ASCII(c) ((c) < 0x80)
-
/*
* ACPI_USE_SYSTEM_CLIBRARY - Define this if linking to an actual C library.
* Otherwise, local versions of string/memory functions will be used.
OpenPOWER on IntegriCloud