aboutsummaryrefslogtreecommitdiffstats
path: root/include/acpi
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2009-06-29 01:39:29 -0400
committerLen Brown <len.brown@intel.com>2009-08-27 10:17:15 -0400
commit15b8dd53f5ffaf8e2d9095c423f713423f576c0f (patch)
tree773f09435b14a810372642502352d46c29b6f148 /include/acpi
parent9c61b34cf7078da72cce276ff8cfae5d6e9955bc (diff)
ACPICA: Major update for acpi_get_object_info external interface
Completed a major update for the acpi_get_object_info external interface. Changes include: - Support for variable, unlimited length HID, UID, and CID strings - Support Processor objects the same as Devices (HID,UID,CID,ADR,STA, etc.) - Call the _SxW power methods on behalf of a device object - Determine if a device is a PCI root bridge - Change the ACPI_BUFFER parameter to ACPI_DEVICE_INFO. These changes will require an update to all callers of this interface. See the ACPICA Programmer Reference for details. Also, update all invocations of acpi_get_object_info interface Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'include/acpi')
-rw-r--r--include/acpi/acpi_bus.h8
-rw-r--r--include/acpi/acpixf.h3
-rw-r--r--include/acpi/actypes.h87
3 files changed, 48 insertions, 50 deletions
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index c65e4ce6c3a..b91420b52c6 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -173,17 +173,15 @@ struct acpi_device_dir {
173 173
174typedef char acpi_bus_id[8]; 174typedef char acpi_bus_id[8];
175typedef unsigned long acpi_bus_address; 175typedef unsigned long acpi_bus_address;
176typedef char acpi_hardware_id[15];
177typedef char acpi_unique_id[9];
178typedef char acpi_device_name[40]; 176typedef char acpi_device_name[40];
179typedef char acpi_device_class[20]; 177typedef char acpi_device_class[20];
180 178
181struct acpi_device_pnp { 179struct acpi_device_pnp {
182 acpi_bus_id bus_id; /* Object name */ 180 acpi_bus_id bus_id; /* Object name */
183 acpi_bus_address bus_address; /* _ADR */ 181 acpi_bus_address bus_address; /* _ADR */
184 acpi_hardware_id hardware_id; /* _HID */ 182 char *hardware_id; /* _HID */
185 struct acpi_compatible_id_list *cid_list; /* _CIDs */ 183 struct acpica_device_id_list *cid_list; /* _CIDs */
186 acpi_unique_id unique_id; /* _UID */ 184 char *unique_id; /* _UID */
187 acpi_device_name device_name; /* Driver-determined */ 185 acpi_device_name device_name; /* Driver-determined */
188 acpi_device_class device_class; /* " */ 186 acpi_device_class device_class; /* " */
189}; 187};
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
index b450a195319..04904c7f1aa 100644
--- a/include/acpi/acpixf.h
+++ b/include/acpi/acpixf.h
@@ -200,7 +200,8 @@ acpi_evaluate_object_typed(acpi_handle object,
200 acpi_object_type return_type); 200 acpi_object_type return_type);
201 201
202acpi_status 202acpi_status
203acpi_get_object_info(acpi_handle handle, struct acpi_buffer *return_buffer); 203acpi_get_object_info(acpi_handle handle,
204 struct acpi_device_info **return_buffer);
204 205
205acpi_status acpi_install_method(u8 *buffer); 206acpi_status acpi_install_method(u8 *buffer);
206 207
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h
index 37ba576d06e..7a4ff79e238 100644
--- a/include/acpi/actypes.h
+++ b/include/acpi/actypes.h
@@ -338,7 +338,7 @@ typedef u32 acpi_physical_address;
338 338
339/* PM Timer ticks per second (HZ) */ 339/* PM Timer ticks per second (HZ) */
340 340
341#define PM_TIMER_FREQUENCY 3579545 341#define PM_TIMER_FREQUENCY 3579545
342 342
343/******************************************************************************* 343/*******************************************************************************
344 * 344 *
@@ -969,38 +969,60 @@ acpi_status(*acpi_walk_callback) (acpi_handle obj_handle,
969#define ACPI_INTERRUPT_NOT_HANDLED 0x00 969#define ACPI_INTERRUPT_NOT_HANDLED 0x00
970#define ACPI_INTERRUPT_HANDLED 0x01 970#define ACPI_INTERRUPT_HANDLED 0x01
971 971
972/* Length of _HID, _UID, _CID, and UUID values */ 972/* Length of 32-bit EISAID values when converted back to a string */
973
974#define ACPI_EISAID_STRING_SIZE 8 /* Includes null terminator */
975
976/* Length of UUID (string) values */
973 977
974#define ACPI_DEVICE_ID_LENGTH 0x09
975#define ACPI_MAX_CID_LENGTH 48
976#define ACPI_UUID_LENGTH 16 978#define ACPI_UUID_LENGTH 16
977 979
978/* Common string version of device HIDs and UIDs */ 980/* Structures used for device/processor HID, UID, CID */
979 981
980struct acpica_device_id { 982struct acpica_device_id {
981 char value[ACPI_DEVICE_ID_LENGTH]; 983 u32 length; /* Length of string + null */
984 char *string;
982}; 985};
983 986
984/* Common string version of device CIDs */ 987struct acpica_device_id_list {
985 988 u32 count; /* Number of IDs in Ids array */
986struct acpi_compatible_id { 989 u32 list_size; /* Size of list, including ID strings */
987 char value[ACPI_MAX_CID_LENGTH]; 990 struct acpica_device_id ids[1]; /* ID array */
988}; 991};
989 992
990struct acpi_compatible_id_list { 993/*
991 u32 count; 994 * Structure returned from acpi_get_object_info.
992 u32 size; 995 * Optimized for both 32- and 64-bit builds
993 struct acpi_compatible_id id[1]; 996 */
997struct acpi_device_info {
998 u32 info_size; /* Size of info, including ID strings */
999 u32 name; /* ACPI object Name */
1000 acpi_object_type type; /* ACPI object Type */
1001 u8 param_count; /* If a method, required parameter count */
1002 u8 valid; /* Indicates which optional fields are valid */
1003 u8 flags; /* Miscellaneous info */
1004 u8 highest_dstates[4]; /* _sx_d values: 0xFF indicates not valid */
1005 u8 lowest_dstates[5]; /* _sx_w values: 0xFF indicates not valid */
1006 u32 current_status; /* _STA value */
1007 acpi_integer address; /* _ADR value */
1008 struct acpica_device_id hardware_id; /* _HID value */
1009 struct acpica_device_id unique_id; /* _UID value */
1010 struct acpica_device_id_list compatible_id_list; /* _CID list <must be last> */
994}; 1011};
995 1012
996/* Structure and flags for acpi_get_object_info */ 1013/* Values for Flags field above (acpi_get_object_info) */
1014
1015#define ACPI_PCI_ROOT_BRIDGE 0x01
997 1016
998#define ACPI_VALID_STA 0x0001 1017/* Flags for Valid field above (acpi_get_object_info) */
999#define ACPI_VALID_ADR 0x0002 1018
1000#define ACPI_VALID_HID 0x0004 1019#define ACPI_VALID_STA 0x01
1001#define ACPI_VALID_UID 0x0008 1020#define ACPI_VALID_ADR 0x02
1002#define ACPI_VALID_CID 0x0010 1021#define ACPI_VALID_HID 0x04
1003#define ACPI_VALID_SXDS 0x0020 1022#define ACPI_VALID_UID 0x08
1023#define ACPI_VALID_CID 0x10
1024#define ACPI_VALID_SXDS 0x20
1025#define ACPI_VALID_SXWS 0x40
1004 1026
1005/* Flags for _STA method */ 1027/* Flags for _STA method */
1006 1028
@@ -1011,29 +1033,6 @@ struct acpi_compatible_id_list {
1011#define ACPI_STA_DEVICE_OK 0x08 /* Synonym */ 1033#define ACPI_STA_DEVICE_OK 0x08 /* Synonym */
1012#define ACPI_STA_BATTERY_PRESENT 0x10 1034#define ACPI_STA_BATTERY_PRESENT 0x10
1013 1035
1014#define ACPI_COMMON_OBJ_INFO \
1015 acpi_object_type type; /* ACPI object type */ \
1016 acpi_name name /* ACPI object Name */
1017
1018struct acpi_obj_info_header {
1019 ACPI_COMMON_OBJ_INFO;
1020};
1021
1022/* Structure returned from Get Object Info */
1023
1024struct acpi_device_info {
1025 ACPI_COMMON_OBJ_INFO;
1026
1027 u32 param_count; /* If a method, required parameter count */
1028 u32 valid; /* Indicates which fields below are valid */
1029 u32 current_status; /* _STA value */
1030 acpi_integer address; /* _ADR value if any */
1031 struct acpica_device_id hardware_id; /* _HID value if any */
1032 struct acpica_device_id unique_id; /* _UID value if any */
1033 u8 highest_dstates[4]; /* _sx_d values: 0xFF indicates not valid */
1034 struct acpi_compatible_id_list compatibility_id; /* List of _CIDs if any */
1035};
1036
1037/* Context structs for address space handlers */ 1036/* Context structs for address space handlers */
1038 1037
1039struct acpi_pci_id { 1038struct acpi_pci_id {