diff options
author | Bob Moore <robert.moore@intel.com> | 2012-02-14 05:23:39 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2012-03-22 01:44:57 -0400 |
commit | ea143604c5c8426923bbed7cd389fdaed7d58a2e (patch) | |
tree | 8664e308651456b5b950245c27837bce6d1b9d10 | |
parent | 653f4b538f66d37db560e0f56af08117136d29b7 (diff) |
ACPICA: ACPI 5: Update debug output for new notify values
Add new notify values, add support for "hardware specific" notifies.
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>
-rw-r--r-- | drivers/acpi/acpica/evmisc.c | 23 | ||||
-rw-r--r-- | drivers/acpi/acpica/utdecode.c | 34 | ||||
-rw-r--r-- | include/acpi/actypes.h | 6 |
3 files changed, 35 insertions, 28 deletions
diff --git a/drivers/acpi/acpica/evmisc.c b/drivers/acpi/acpica/evmisc.c index 0912f62f05a0..51ef9f5e002d 100644 --- a/drivers/acpi/acpica/evmisc.c +++ b/drivers/acpi/acpica/evmisc.c | |||
@@ -108,27 +108,30 @@ acpi_ev_queue_notify_request(struct acpi_namespace_node * node, | |||
108 | ACPI_FUNCTION_NAME(ev_queue_notify_request); | 108 | ACPI_FUNCTION_NAME(ev_queue_notify_request); |
109 | 109 | ||
110 | /* | 110 | /* |
111 | * For value 3 (Ejection Request), some device method may need to be run. | 111 | * For value 0x03 (Ejection Request), may need to run a device method. |
112 | * For value 2 (Device Wake) if _PRW exists, the _PS0 method may need | 112 | * For value 0x02 (Device Wake), if _PRW exists, may need to run |
113 | * to be run. | 113 | * the _PS0 method. |
114 | * For value 0x80 (Status Change) on the power button or sleep button, | 114 | * For value 0x80 (Status Change) on the power button or sleep button, |
115 | * initiate soft-off or sleep operation? | 115 | * initiate soft-off or sleep operation. |
116 | * | ||
117 | * For all cases, simply dispatch the notify to the handler. | ||
116 | */ | 118 | */ |
117 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | 119 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, |
118 | "Dispatching Notify on [%4.4s] Node %p Value 0x%2.2X (%s)\n", | 120 | "Dispatching Notify on [%4.4s] (%s) Value 0x%2.2X (%s) Node %p\n", |
119 | acpi_ut_get_node_name(node), node, notify_value, | 121 | acpi_ut_get_node_name(node), |
120 | acpi_ut_get_notify_name(notify_value))); | 122 | acpi_ut_get_type_name(node->type), notify_value, |
123 | acpi_ut_get_notify_name(notify_value), node)); | ||
121 | 124 | ||
122 | /* Get the notify object attached to the NS Node */ | 125 | /* Get the notify object attached to the NS Node */ |
123 | 126 | ||
124 | obj_desc = acpi_ns_get_attached_object(node); | 127 | obj_desc = acpi_ns_get_attached_object(node); |
125 | if (obj_desc) { | 128 | if (obj_desc) { |
126 | 129 | ||
127 | /* We have the notify object, Get the right handler */ | 130 | /* We have the notify object, Get the correct handler */ |
128 | 131 | ||
129 | switch (node->type) { | 132 | switch (node->type) { |
130 | 133 | ||
131 | /* Notify allowed only on these types */ | 134 | /* Notify is allowed only on these types */ |
132 | 135 | ||
133 | case ACPI_TYPE_DEVICE: | 136 | case ACPI_TYPE_DEVICE: |
134 | case ACPI_TYPE_THERMAL: | 137 | case ACPI_TYPE_THERMAL: |
@@ -152,7 +155,7 @@ acpi_ev_queue_notify_request(struct acpi_namespace_node * node, | |||
152 | } | 155 | } |
153 | 156 | ||
154 | /* | 157 | /* |
155 | * If there is any handler to run, schedule the dispatcher. | 158 | * If there is a handler to run, schedule the dispatcher. |
156 | * Check for: | 159 | * Check for: |
157 | * 1) Global system notify handler | 160 | * 1) Global system notify handler |
158 | * 2) Global device notify handler | 161 | * 2) Global device notify handler |
diff --git a/drivers/acpi/acpica/utdecode.c b/drivers/acpi/acpica/utdecode.c index d42ede5260c7..684849949bf3 100644 --- a/drivers/acpi/acpica/utdecode.c +++ b/drivers/acpi/acpica/utdecode.c | |||
@@ -497,19 +497,20 @@ char *acpi_ut_get_mutex_name(u32 mutex_id) | |||
497 | 497 | ||
498 | /* Names for Notify() values, used for debug output */ | 498 | /* Names for Notify() values, used for debug output */ |
499 | 499 | ||
500 | static const char *acpi_gbl_notify_value_names[] = { | 500 | static const char *acpi_gbl_notify_value_names[ACPI_NOTIFY_MAX + 1] = { |
501 | "Bus Check", | 501 | /* 00 */ "Bus Check", |
502 | "Device Check", | 502 | /* 01 */ "Device Check", |
503 | "Device Wake", | 503 | /* 02 */ "Device Wake", |
504 | "Eject Request", | 504 | /* 03 */ "Eject Request", |
505 | "Device Check Light", | 505 | /* 04 */ "Device Check Light", |
506 | "Frequency Mismatch", | 506 | /* 05 */ "Frequency Mismatch", |
507 | "Bus Mode Mismatch", | 507 | /* 06 */ "Bus Mode Mismatch", |
508 | "Power Fault", | 508 | /* 07 */ "Power Fault", |
509 | "Capabilities Check", | 509 | /* 08 */ "Capabilities Check", |
510 | "Device PLD Check", | 510 | /* 09 */ "Device PLD Check", |
511 | "Reserved", | 511 | /* 10 */ "Reserved", |
512 | "System Locality Update" | 512 | /* 11 */ "System Locality Update", |
513 | /* 12 */ "Shutdown Request" | ||
513 | }; | 514 | }; |
514 | 515 | ||
515 | const char *acpi_ut_get_notify_name(u32 notify_value) | 516 | const char *acpi_ut_get_notify_name(u32 notify_value) |
@@ -519,9 +520,10 @@ const char *acpi_ut_get_notify_name(u32 notify_value) | |||
519 | return (acpi_gbl_notify_value_names[notify_value]); | 520 | return (acpi_gbl_notify_value_names[notify_value]); |
520 | } else if (notify_value <= ACPI_MAX_SYS_NOTIFY) { | 521 | } else if (notify_value <= ACPI_MAX_SYS_NOTIFY) { |
521 | return ("Reserved"); | 522 | return ("Reserved"); |
522 | } else { /* Greater or equal to 0x80 */ | 523 | } else if (notify_value <= ACPI_MAX_DEVICE_SPECIFIC_NOTIFY) { |
523 | 524 | return ("Device Specific"); | |
524 | return ("**Device Specific**"); | 525 | } else { |
526 | return ("Hardware Specific"); | ||
525 | } | 527 | } |
526 | } | 528 | } |
527 | #endif | 529 | #endif |
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index d5dee7ce9474..48c4d5f8a492 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h | |||
@@ -532,8 +532,9 @@ typedef u64 acpi_integer; | |||
532 | #define ACPI_NOTIFY_DEVICE_PLD_CHECK (u8) 0x09 | 532 | #define ACPI_NOTIFY_DEVICE_PLD_CHECK (u8) 0x09 |
533 | #define ACPI_NOTIFY_RESERVED (u8) 0x0A | 533 | #define ACPI_NOTIFY_RESERVED (u8) 0x0A |
534 | #define ACPI_NOTIFY_LOCALITY_UPDATE (u8) 0x0B | 534 | #define ACPI_NOTIFY_LOCALITY_UPDATE (u8) 0x0B |
535 | #define ACPI_NOTIFY_SHUTDOWN_REQUEST (u8) 0x0C | ||
535 | 536 | ||
536 | #define ACPI_NOTIFY_MAX 0x0B | 537 | #define ACPI_NOTIFY_MAX 0x0C |
537 | 538 | ||
538 | /* | 539 | /* |
539 | * Types associated with ACPI names and objects. The first group of | 540 | * Types associated with ACPI names and objects. The first group of |
@@ -698,7 +699,8 @@ typedef u32 acpi_event_status; | |||
698 | #define ACPI_ALL_NOTIFY (ACPI_SYSTEM_NOTIFY | ACPI_DEVICE_NOTIFY) | 699 | #define ACPI_ALL_NOTIFY (ACPI_SYSTEM_NOTIFY | ACPI_DEVICE_NOTIFY) |
699 | #define ACPI_MAX_NOTIFY_HANDLER_TYPE 0x3 | 700 | #define ACPI_MAX_NOTIFY_HANDLER_TYPE 0x3 |
700 | 701 | ||
701 | #define ACPI_MAX_SYS_NOTIFY 0x7f | 702 | #define ACPI_MAX_SYS_NOTIFY 0x7F |
703 | #define ACPI_MAX_DEVICE_SPECIFIC_NOTIFY 0xBF | ||
702 | 704 | ||
703 | /* Address Space (Operation Region) Types */ | 705 | /* Address Space (Operation Region) Types */ |
704 | 706 | ||