aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2009-03-05 20:49:25 -0500
committerLen Brown <len.brown@intel.com>2009-03-27 12:11:01 -0400
commit768aaaf196e8a40f5cfc792d9d365795cc52ed13 (patch)
treeb223711c833a4848711b3c322dea9a9809e22836
parent2affa28605fa5387192c72d9889a00c9c51aa712 (diff)
ACPICA: Add manifest constants for bit register values
Add and deploy constants for the PM status/enable/control registers. 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/evevent.c12
-rw-r--r--drivers/acpi/acpica/evmisc.c3
-rw-r--r--drivers/acpi/acpica/evxfevnt.c6
-rw-r--r--drivers/acpi/acpica/hwsleep.c14
-rw-r--r--include/acpi/actypes.h9
5 files changed, 31 insertions, 13 deletions
diff --git a/drivers/acpi/acpica/evevent.c b/drivers/acpi/acpica/evevent.c
index 246f8775ec13..cd55c774e882 100644
--- a/drivers/acpi/acpica/evevent.c
+++ b/drivers/acpi/acpica/evevent.c
@@ -183,7 +183,7 @@ acpi_status acpi_ev_install_xrupt_handlers(void)
183 * 183 *
184 * RETURN: Status 184 * RETURN: Status
185 * 185 *
186 * DESCRIPTION: Install the fixed event handlers and enable the fixed events. 186 * DESCRIPTION: Install the fixed event handlers and disable all fixed events.
187 * 187 *
188 ******************************************************************************/ 188 ******************************************************************************/
189 189
@@ -200,12 +200,13 @@ static acpi_status acpi_ev_fixed_event_initialize(void)
200 acpi_gbl_fixed_event_handlers[i].handler = NULL; 200 acpi_gbl_fixed_event_handlers[i].handler = NULL;
201 acpi_gbl_fixed_event_handlers[i].context = NULL; 201 acpi_gbl_fixed_event_handlers[i].context = NULL;
202 202
203 /* Enable the fixed event */ 203 /* Disable the fixed event */
204 204
205 if (acpi_gbl_fixed_event_info[i].enable_register_id != 0xFF) { 205 if (acpi_gbl_fixed_event_info[i].enable_register_id != 0xFF) {
206 status = 206 status =
207 acpi_write_bit_register(acpi_gbl_fixed_event_info 207 acpi_write_bit_register(acpi_gbl_fixed_event_info
208 [i].enable_register_id, 0); 208 [i].enable_register_id,
209 ACPI_DISABLE_EVENT);
209 if (ACPI_FAILURE(status)) { 210 if (ACPI_FAILURE(status)) {
210 return (status); 211 return (status);
211 } 212 }
@@ -289,7 +290,7 @@ static u32 acpi_ev_fixed_event_dispatch(u32 event)
289 /* Clear the status bit */ 290 /* Clear the status bit */
290 291
291 (void)acpi_write_bit_register(acpi_gbl_fixed_event_info[event]. 292 (void)acpi_write_bit_register(acpi_gbl_fixed_event_info[event].
292 status_register_id, 1); 293 status_register_id, ACPI_CLEAR_STATUS);
293 294
294 /* 295 /*
295 * Make sure we've got a handler. If not, report an error. The event is 296 * Make sure we've got a handler. If not, report an error. The event is
@@ -297,7 +298,8 @@ static u32 acpi_ev_fixed_event_dispatch(u32 event)
297 */ 298 */
298 if (NULL == acpi_gbl_fixed_event_handlers[event].handler) { 299 if (NULL == acpi_gbl_fixed_event_handlers[event].handler) {
299 (void)acpi_write_bit_register(acpi_gbl_fixed_event_info[event]. 300 (void)acpi_write_bit_register(acpi_gbl_fixed_event_info[event].
300 enable_register_id, 0); 301 enable_register_id,
302 ACPI_DISABLE_EVENT);
301 303
302 ACPI_ERROR((AE_INFO, 304 ACPI_ERROR((AE_INFO,
303 "No installed handler for fixed event [%08X]", 305 "No installed handler for fixed event [%08X]",
diff --git a/drivers/acpi/acpica/evmisc.c b/drivers/acpi/acpica/evmisc.c
index 0e9e12b2f2bb..417a9b920dd3 100644
--- a/drivers/acpi/acpica/evmisc.c
+++ b/drivers/acpi/acpica/evmisc.c
@@ -535,7 +535,8 @@ acpi_status acpi_ev_release_global_lock(void)
535 if (pending) { 535 if (pending) {
536 status = 536 status =
537 acpi_write_bit_register 537 acpi_write_bit_register
538 (ACPI_BITREG_GLOBAL_LOCK_RELEASE, 1); 538 (ACPI_BITREG_GLOBAL_LOCK_RELEASE,
539 ACPI_ENABLE_EVENT);
539 } 540 }
540 541
541 ACPI_DEBUG_PRINT((ACPI_DB_EXEC, 542 ACPI_DEBUG_PRINT((ACPI_DB_EXEC,
diff --git a/drivers/acpi/acpica/evxfevnt.c b/drivers/acpi/acpica/evxfevnt.c
index 484c9793ca06..d0a080747ec3 100644
--- a/drivers/acpi/acpica/evxfevnt.c
+++ b/drivers/acpi/acpica/evxfevnt.c
@@ -173,7 +173,7 @@ acpi_status acpi_enable_event(u32 event, u32 flags)
173 */ 173 */
174 status = 174 status =
175 acpi_write_bit_register(acpi_gbl_fixed_event_info[event]. 175 acpi_write_bit_register(acpi_gbl_fixed_event_info[event].
176 enable_register_id, 1); 176 enable_register_id, ACPI_ENABLE_EVENT);
177 if (ACPI_FAILURE(status)) { 177 if (ACPI_FAILURE(status)) {
178 return_ACPI_STATUS(status); 178 return_ACPI_STATUS(status);
179 } 179 }
@@ -355,7 +355,7 @@ acpi_status acpi_disable_event(u32 event, u32 flags)
355 */ 355 */
356 status = 356 status =
357 acpi_write_bit_register(acpi_gbl_fixed_event_info[event]. 357 acpi_write_bit_register(acpi_gbl_fixed_event_info[event].
358 enable_register_id, 0); 358 enable_register_id, ACPI_DISABLE_EVENT);
359 if (ACPI_FAILURE(status)) { 359 if (ACPI_FAILURE(status)) {
360 return_ACPI_STATUS(status); 360 return_ACPI_STATUS(status);
361 } 361 }
@@ -408,7 +408,7 @@ acpi_status acpi_clear_event(u32 event)
408 */ 408 */
409 status = 409 status =
410 acpi_write_bit_register(acpi_gbl_fixed_event_info[event]. 410 acpi_write_bit_register(acpi_gbl_fixed_event_info[event].
411 status_register_id, 1); 411 status_register_id, ACPI_CLEAR_STATUS);
412 412
413 return_ACPI_STATUS(status); 413 return_ACPI_STATUS(status);
414} 414}
diff --git a/drivers/acpi/acpica/hwsleep.c b/drivers/acpi/acpica/hwsleep.c
index 78d62b8a5c31..4d14b49a0f6c 100644
--- a/drivers/acpi/acpica/hwsleep.c
+++ b/drivers/acpi/acpica/hwsleep.c
@@ -250,7 +250,8 @@ acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state)
250 250
251 /* Clear wake status */ 251 /* Clear wake status */
252 252
253 status = acpi_write_bit_register(ACPI_BITREG_WAKE_STATUS, 1); 253 status =
254 acpi_write_bit_register(ACPI_BITREG_WAKE_STATUS, ACPI_CLEAR_STATUS);
254 if (ACPI_FAILURE(status)) { 255 if (ACPI_FAILURE(status)) {
255 return_ACPI_STATUS(status); 256 return_ACPI_STATUS(status);
256 } 257 }
@@ -399,7 +400,10 @@ acpi_status asmlinkage acpi_enter_sleep_state_s4bios(void)
399 400
400 ACPI_FUNCTION_TRACE(acpi_enter_sleep_state_s4bios); 401 ACPI_FUNCTION_TRACE(acpi_enter_sleep_state_s4bios);
401 402
402 status = acpi_write_bit_register(ACPI_BITREG_WAKE_STATUS, 1); 403 /* Clear the wake status bit (PM1) */
404
405 status =
406 acpi_write_bit_register(ACPI_BITREG_WAKE_STATUS, ACPI_CLEAR_STATUS);
403 if (ACPI_FAILURE(status)) { 407 if (ACPI_FAILURE(status)) {
404 return_ACPI_STATUS(status); 408 return_ACPI_STATUS(status);
405 } 409 }
@@ -601,11 +605,13 @@ acpi_status acpi_leave_sleep_state(u8 sleep_state)
601 605
602 (void) 606 (void)
603 acpi_write_bit_register(acpi_gbl_fixed_event_info 607 acpi_write_bit_register(acpi_gbl_fixed_event_info
604 [ACPI_EVENT_POWER_BUTTON].enable_register_id, 1); 608 [ACPI_EVENT_POWER_BUTTON].
609 enable_register_id, ACPI_ENABLE_EVENT);
605 610
606 (void) 611 (void)
607 acpi_write_bit_register(acpi_gbl_fixed_event_info 612 acpi_write_bit_register(acpi_gbl_fixed_event_info
608 [ACPI_EVENT_POWER_BUTTON].status_register_id, 1); 613 [ACPI_EVENT_POWER_BUTTON].
614 status_register_id, ACPI_CLEAR_STATUS);
609 615
610 arg.integer.value = ACPI_SST_WORKING; 616 arg.integer.value = ACPI_SST_WORKING;
611 status = acpi_evaluate_object(NULL, METHOD_NAME__SST, &arg_list, NULL); 617 status = acpi_evaluate_object(NULL, METHOD_NAME__SST, &arg_list, NULL);
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h
index 1b9601c665e6..f555d927f7c0 100644
--- a/include/acpi/actypes.h
+++ b/include/acpi/actypes.h
@@ -787,6 +787,15 @@ typedef u8 acpi_adr_space_type;
787#define ACPI_BITREG_MAX 0x13 787#define ACPI_BITREG_MAX 0x13
788#define ACPI_NUM_BITREG ACPI_BITREG_MAX + 1 788#define ACPI_NUM_BITREG ACPI_BITREG_MAX + 1
789 789
790/* Status register values. A 1 clears a status bit. 0 = no effect */
791
792#define ACPI_CLEAR_STATUS 1
793
794/* Enable and Control register values */
795
796#define ACPI_ENABLE_EVENT 1
797#define ACPI_DISABLE_EVENT 0
798
790/* 799/*
791 * External ACPI object definition 800 * External ACPI object definition
792 */ 801 */