aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/hardware
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/hardware')
-rw-r--r--drivers/acpi/hardware/hwacpi.c25
-rw-r--r--drivers/acpi/hardware/hwgpe.c2
-rw-r--r--drivers/acpi/hardware/hwregs.c59
-rw-r--r--drivers/acpi/hardware/hwsleep.c23
-rw-r--r--drivers/acpi/hardware/hwtimer.c2
5 files changed, 56 insertions, 55 deletions
diff --git a/drivers/acpi/hardware/hwacpi.c b/drivers/acpi/hardware/hwacpi.c
index 1bb3463d7040..ea2f13271ff1 100644
--- a/drivers/acpi/hardware/hwacpi.c
+++ b/drivers/acpi/hardware/hwacpi.c
@@ -6,7 +6,7 @@
6 *****************************************************************************/ 6 *****************************************************************************/
7 7
8/* 8/*
9 * Copyright (C) 2000 - 2005, R. Byron Moore 9 * Copyright (C) 2000 - 2006, R. Byron Moore
10 * All rights reserved. 10 * All rights reserved.
11 * 11 *
12 * Redistribution and use in source and binary forms, with or without 12 * Redistribution and use in source and binary forms, with or without
@@ -68,8 +68,7 @@ acpi_status acpi_hw_initialize(void)
68 /* We must have the ACPI tables by the time we get here */ 68 /* We must have the ACPI tables by the time we get here */
69 69
70 if (!acpi_gbl_FADT) { 70 if (!acpi_gbl_FADT) {
71 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "No FADT is present\n")); 71 ACPI_ERROR((AE_INFO, "No FADT is present"));
72
73 return_ACPI_STATUS(AE_NO_ACPI_TABLES); 72 return_ACPI_STATUS(AE_NO_ACPI_TABLES);
74 } 73 }
75 74
@@ -108,7 +107,8 @@ acpi_status acpi_hw_set_mode(u32 mode)
108 * system does not support mode transition. 107 * system does not support mode transition.
109 */ 108 */
110 if (!acpi_gbl_FADT->smi_cmd) { 109 if (!acpi_gbl_FADT->smi_cmd) {
111 ACPI_REPORT_ERROR(("No SMI_CMD in FADT, mode transition failed.\n")); 110 ACPI_ERROR((AE_INFO,
111 "No SMI_CMD in FADT, mode transition failed"));
112 return_ACPI_STATUS(AE_NO_HARDWARE_RESPONSE); 112 return_ACPI_STATUS(AE_NO_HARDWARE_RESPONSE);
113 } 113 }
114 114
@@ -120,7 +120,8 @@ acpi_status acpi_hw_set_mode(u32 mode)
120 * transitions are not supported. 120 * transitions are not supported.
121 */ 121 */
122 if (!acpi_gbl_FADT->acpi_enable && !acpi_gbl_FADT->acpi_disable) { 122 if (!acpi_gbl_FADT->acpi_enable && !acpi_gbl_FADT->acpi_disable) {
123 ACPI_REPORT_ERROR(("No ACPI mode transition supported in this system (enable/disable both zero)\n")); 123 ACPI_ERROR((AE_INFO,
124 "No ACPI mode transition supported in this system (enable/disable both zero)"));
124 return_ACPI_STATUS(AE_OK); 125 return_ACPI_STATUS(AE_OK);
125 } 126 }
126 127
@@ -154,8 +155,8 @@ acpi_status acpi_hw_set_mode(u32 mode)
154 } 155 }
155 156
156 if (ACPI_FAILURE(status)) { 157 if (ACPI_FAILURE(status)) {
157 ACPI_REPORT_ERROR(("Could not write mode change, %s\n", 158 ACPI_EXCEPTION((AE_INFO, status,
158 acpi_format_exception(status))); 159 "Could not write ACPI mode change"));
159 return_ACPI_STATUS(status); 160 return_ACPI_STATUS(status);
160 } 161 }
161 162
@@ -175,7 +176,7 @@ acpi_status acpi_hw_set_mode(u32 mode)
175 retry--; 176 retry--;
176 } 177 }
177 178
178 ACPI_REPORT_ERROR(("Hardware never changed modes\n")); 179 ACPI_ERROR((AE_INFO, "Hardware did not change modes"));
179 return_ACPI_STATUS(AE_NO_HARDWARE_RESPONSE); 180 return_ACPI_STATUS(AE_NO_HARDWARE_RESPONSE);
180} 181}
181 182
@@ -204,18 +205,18 @@ u32 acpi_hw_get_mode(void)
204 * system does not support mode transition. 205 * system does not support mode transition.
205 */ 206 */
206 if (!acpi_gbl_FADT->smi_cmd) { 207 if (!acpi_gbl_FADT->smi_cmd) {
207 return_VALUE(ACPI_SYS_MODE_ACPI); 208 return_UINT32(ACPI_SYS_MODE_ACPI);
208 } 209 }
209 210
210 status = 211 status =
211 acpi_get_register(ACPI_BITREG_SCI_ENABLE, &value, ACPI_MTX_LOCK); 212 acpi_get_register(ACPI_BITREG_SCI_ENABLE, &value, ACPI_MTX_LOCK);
212 if (ACPI_FAILURE(status)) { 213 if (ACPI_FAILURE(status)) {
213 return_VALUE(ACPI_SYS_MODE_LEGACY); 214 return_UINT32(ACPI_SYS_MODE_LEGACY);
214 } 215 }
215 216
216 if (value) { 217 if (value) {
217 return_VALUE(ACPI_SYS_MODE_ACPI); 218 return_UINT32(ACPI_SYS_MODE_ACPI);
218 } else { 219 } else {
219 return_VALUE(ACPI_SYS_MODE_LEGACY); 220 return_UINT32(ACPI_SYS_MODE_LEGACY);
220 } 221 }
221} 222}
diff --git a/drivers/acpi/hardware/hwgpe.c b/drivers/acpi/hardware/hwgpe.c
index 5c8e5dfd024e..d84942d22dd5 100644
--- a/drivers/acpi/hardware/hwgpe.c
+++ b/drivers/acpi/hardware/hwgpe.c
@@ -6,7 +6,7 @@
6 *****************************************************************************/ 6 *****************************************************************************/
7 7
8/* 8/*
9 * Copyright (C) 2000 - 2005, R. Byron Moore 9 * Copyright (C) 2000 - 2006, R. Byron Moore
10 * All rights reserved. 10 * All rights reserved.
11 * 11 *
12 * Redistribution and use in source and binary forms, with or without 12 * Redistribution and use in source and binary forms, with or without
diff --git a/drivers/acpi/hardware/hwregs.c b/drivers/acpi/hardware/hwregs.c
index 536a7aea80c9..e1fe75498415 100644
--- a/drivers/acpi/hardware/hwregs.c
+++ b/drivers/acpi/hardware/hwregs.c
@@ -7,7 +7,7 @@
7 ******************************************************************************/ 7 ******************************************************************************/
8 8
9/* 9/*
10 * Copyright (C) 2000 - 2005, R. Byron Moore 10 * Copyright (C) 2000 - 2006, R. Byron Moore
11 * All rights reserved. 11 * All rights reserved.
12 * 12 *
13 * Redistribution and use in source and binary forms, with or without 13 * Redistribution and use in source and binary forms, with or without
@@ -144,7 +144,8 @@ acpi_get_sleep_type_data(u8 sleep_state, u8 * sleep_type_a, u8 * sleep_type_b)
144 144
145 info.parameters = NULL; 145 info.parameters = NULL;
146 info.return_object = NULL; 146 info.return_object = NULL;
147 sleep_state_name = (char *)acpi_gbl_sleep_state_names[sleep_state]; 147 sleep_state_name =
148 ACPI_CAST_PTR(char, acpi_gbl_sleep_state_names[sleep_state]);
148 149
149 status = acpi_ns_evaluate_by_name(sleep_state_name, &info); 150 status = acpi_ns_evaluate_by_name(sleep_state_name, &info);
150 if (ACPI_FAILURE(status)) { 151 if (ACPI_FAILURE(status)) {
@@ -159,15 +160,16 @@ acpi_get_sleep_type_data(u8 sleep_state, u8 * sleep_type_a, u8 * sleep_type_b)
159 /* Must have a return object */ 160 /* Must have a return object */
160 161
161 if (!info.return_object) { 162 if (!info.return_object) {
162 ACPI_REPORT_ERROR(("No Sleep State object returned from [%s]\n", 163 ACPI_ERROR((AE_INFO, "No Sleep State object returned from [%s]",
163 sleep_state_name)); 164 sleep_state_name));
164 status = AE_NOT_EXIST; 165 status = AE_NOT_EXIST;
165 } 166 }
166 167
167 /* It must be of type Package */ 168 /* It must be of type Package */
168 169
169 else if (ACPI_GET_OBJECT_TYPE(info.return_object) != ACPI_TYPE_PACKAGE) { 170 else if (ACPI_GET_OBJECT_TYPE(info.return_object) != ACPI_TYPE_PACKAGE) {
170 ACPI_REPORT_ERROR(("Sleep State return object is not a Package\n")); 171 ACPI_ERROR((AE_INFO,
172 "Sleep State return object is not a Package"));
171 status = AE_AML_OPERAND_TYPE; 173 status = AE_AML_OPERAND_TYPE;
172 } 174 }
173 175
@@ -179,7 +181,8 @@ acpi_get_sleep_type_data(u8 sleep_state, u8 * sleep_type_a, u8 * sleep_type_b)
179 * one per sleep type (A/B). 181 * one per sleep type (A/B).
180 */ 182 */
181 else if (info.return_object->package.count < 2) { 183 else if (info.return_object->package.count < 2) {
182 ACPI_REPORT_ERROR(("Sleep State return package does not have at least two elements\n")); 184 ACPI_ERROR((AE_INFO,
185 "Sleep State return package does not have at least two elements"));
183 status = AE_AML_NO_OPERAND; 186 status = AE_AML_NO_OPERAND;
184 } 187 }
185 188
@@ -189,7 +192,12 @@ acpi_get_sleep_type_data(u8 sleep_state, u8 * sleep_type_a, u8 * sleep_type_b)
189 != ACPI_TYPE_INTEGER) || 192 != ACPI_TYPE_INTEGER) ||
190 (ACPI_GET_OBJECT_TYPE(info.return_object->package.elements[1]) 193 (ACPI_GET_OBJECT_TYPE(info.return_object->package.elements[1])
191 != ACPI_TYPE_INTEGER)) { 194 != ACPI_TYPE_INTEGER)) {
192 ACPI_REPORT_ERROR(("Sleep State return package elements are not both Integers (%s, %s)\n", acpi_ut_get_object_type_name(info.return_object->package.elements[0]), acpi_ut_get_object_type_name(info.return_object->package.elements[1]))); 195 ACPI_ERROR((AE_INFO,
196 "Sleep State return package elements are not both Integers (%s, %s)",
197 acpi_ut_get_object_type_name(info.return_object->
198 package.elements[0]),
199 acpi_ut_get_object_type_name(info.return_object->
200 package.elements[1])));
193 status = AE_AML_OPERAND_TYPE; 201 status = AE_AML_OPERAND_TYPE;
194 } else { 202 } else {
195 /* Valid _Sx_ package size, type, and value */ 203 /* Valid _Sx_ package size, type, and value */
@@ -201,12 +209,11 @@ acpi_get_sleep_type_data(u8 sleep_state, u8 * sleep_type_a, u8 * sleep_type_b)
201 } 209 }
202 210
203 if (ACPI_FAILURE(status)) { 211 if (ACPI_FAILURE(status)) {
204 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 212 ACPI_EXCEPTION((AE_INFO, status,
205 "%s While evaluating sleep_state [%s], bad Sleep object %p type %s\n", 213 "While evaluating sleep_state [%s], bad Sleep object %p type %s",
206 acpi_format_exception(status), 214 sleep_state_name, info.return_object,
207 sleep_state_name, info.return_object, 215 acpi_ut_get_object_type_name(info.
208 acpi_ut_get_object_type_name(info. 216 return_object)));
209 return_object)));
210 } 217 }
211 218
212 acpi_ut_remove_reference(info.return_object); 219 acpi_ut_remove_reference(info.return_object);
@@ -229,12 +236,11 @@ EXPORT_SYMBOL(acpi_get_sleep_type_data);
229 236
230struct acpi_bit_register_info *acpi_hw_get_bit_register_info(u32 register_id) 237struct acpi_bit_register_info *acpi_hw_get_bit_register_info(u32 register_id)
231{ 238{
232 ACPI_FUNCTION_NAME("hw_get_bit_register_info"); 239 ACPI_FUNCTION_ENTRY();
233 240
234 if (register_id > ACPI_BITREG_MAX) { 241 if (register_id > ACPI_BITREG_MAX) {
235 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 242 ACPI_ERROR((AE_INFO, "Invalid bit_register ID: %X",
236 "Invalid bit_register ID: %X\n", 243 register_id));
237 register_id));
238 return (NULL); 244 return (NULL);
239 } 245 }
240 246
@@ -334,8 +340,8 @@ acpi_status acpi_set_register(u32 register_id, u32 value, u32 flags)
334 340
335 bit_reg_info = acpi_hw_get_bit_register_info(register_id); 341 bit_reg_info = acpi_hw_get_bit_register_info(register_id);
336 if (!bit_reg_info) { 342 if (!bit_reg_info) {
337 ACPI_REPORT_ERROR(("Bad ACPI HW register_id: %X\n", 343 ACPI_ERROR((AE_INFO, "Bad ACPI HW register_id: %X",
338 register_id)); 344 register_id));
339 return_ACPI_STATUS(AE_BAD_PARAMETER); 345 return_ACPI_STATUS(AE_BAD_PARAMETER);
340 } 346 }
341 347
@@ -569,8 +575,7 @@ acpi_hw_register_read(u8 use_lock, u32 register_id, u32 * return_value)
569 break; 575 break;
570 576
571 default: 577 default:
572 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Unknown Register ID: %X\n", 578 ACPI_ERROR((AE_INFO, "Unknown Register ID: %X", register_id));
573 register_id));
574 status = AE_BAD_PARAMETER; 579 status = AE_BAD_PARAMETER;
575 break; 580 break;
576 } 581 }
@@ -765,9 +770,9 @@ acpi_hw_low_level_read(u32 width, u32 * value, struct acpi_generic_address *reg)
765 break; 770 break;
766 771
767 default: 772 default:
768 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 773 ACPI_ERROR((AE_INFO,
769 "Unsupported address space: %X\n", 774 "Unsupported address space: %X",
770 reg->address_space_id)); 775 reg->address_space_id));
771 return (AE_BAD_PARAMETER); 776 return (AE_BAD_PARAMETER);
772 } 777 }
773 778
@@ -836,9 +841,9 @@ acpi_hw_low_level_write(u32 width, u32 value, struct acpi_generic_address * reg)
836 break; 841 break;
837 842
838 default: 843 default:
839 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 844 ACPI_ERROR((AE_INFO,
840 "Unsupported address space: %X\n", 845 "Unsupported address space: %X",
841 reg->address_space_id)); 846 reg->address_space_id));
842 return (AE_BAD_PARAMETER); 847 return (AE_BAD_PARAMETER);
843 } 848 }
844 849
diff --git a/drivers/acpi/hardware/hwsleep.c b/drivers/acpi/hardware/hwsleep.c
index 34519069050c..89269272fd62 100644
--- a/drivers/acpi/hardware/hwsleep.c
+++ b/drivers/acpi/hardware/hwsleep.c
@@ -6,7 +6,7 @@
6 *****************************************************************************/ 6 *****************************************************************************/
7 7
8/* 8/*
9 * Copyright (C) 2000 - 2005, R. Byron Moore 9 * Copyright (C) 2000 - 2006, R. Byron Moore
10 * All rights reserved. 10 * All rights reserved.
11 * 11 *
12 * Redistribution and use in source and binary forms, with or without 12 * Redistribution and use in source and binary forms, with or without
@@ -199,8 +199,8 @@ acpi_status acpi_enter_sleep_state_prep(u8 sleep_state)
199 199
200 status = acpi_evaluate_object(NULL, METHOD_NAME__SST, &arg_list, NULL); 200 status = acpi_evaluate_object(NULL, METHOD_NAME__SST, &arg_list, NULL);
201 if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) { 201 if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) {
202 ACPI_REPORT_ERROR(("Method _SST failed, %s\n", 202 ACPI_EXCEPTION((AE_INFO, status,
203 acpi_format_exception(status))); 203 "While executing method _SST"));
204 } 204 }
205 205
206 return_ACPI_STATUS(AE_OK); 206 return_ACPI_STATUS(AE_OK);
@@ -232,9 +232,8 @@ acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state)
232 232
233 if ((acpi_gbl_sleep_type_a > ACPI_SLEEP_TYPE_MAX) || 233 if ((acpi_gbl_sleep_type_a > ACPI_SLEEP_TYPE_MAX) ||
234 (acpi_gbl_sleep_type_b > ACPI_SLEEP_TYPE_MAX)) { 234 (acpi_gbl_sleep_type_b > ACPI_SLEEP_TYPE_MAX)) {
235 ACPI_REPORT_ERROR(("Sleep values out of range: A=%X B=%X\n", 235 ACPI_ERROR((AE_INFO, "Sleep values out of range: A=%X B=%X",
236 acpi_gbl_sleep_type_a, 236 acpi_gbl_sleep_type_a, acpi_gbl_sleep_type_b));
237 acpi_gbl_sleep_type_b));
238 return_ACPI_STATUS(AE_AML_OPERAND_VALUE); 237 return_ACPI_STATUS(AE_AML_OPERAND_VALUE);
239 } 238 }
240 239
@@ -533,21 +532,18 @@ acpi_status acpi_leave_sleep_state(u8 sleep_state)
533 arg.integer.value = ACPI_SST_WAKING; 532 arg.integer.value = ACPI_SST_WAKING;
534 status = acpi_evaluate_object(NULL, METHOD_NAME__SST, &arg_list, NULL); 533 status = acpi_evaluate_object(NULL, METHOD_NAME__SST, &arg_list, NULL);
535 if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) { 534 if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) {
536 ACPI_REPORT_ERROR(("Method _SST failed, %s\n", 535 ACPI_EXCEPTION((AE_INFO, status, "During Method _SST"));
537 acpi_format_exception(status)));
538 } 536 }
539 537
540 arg.integer.value = sleep_state; 538 arg.integer.value = sleep_state;
541 status = acpi_evaluate_object(NULL, METHOD_NAME__BFS, &arg_list, NULL); 539 status = acpi_evaluate_object(NULL, METHOD_NAME__BFS, &arg_list, NULL);
542 if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) { 540 if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) {
543 ACPI_REPORT_ERROR(("Method _BFS failed, %s\n", 541 ACPI_EXCEPTION((AE_INFO, status, "During Method _BFS"));
544 acpi_format_exception(status)));
545 } 542 }
546 543
547 status = acpi_evaluate_object(NULL, METHOD_NAME__WAK, &arg_list, NULL); 544 status = acpi_evaluate_object(NULL, METHOD_NAME__WAK, &arg_list, NULL);
548 if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) { 545 if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) {
549 ACPI_REPORT_ERROR(("Method _WAK failed, %s\n", 546 ACPI_EXCEPTION((AE_INFO, status, "During Method _WAK"));
550 acpi_format_exception(status)));
551 } 547 }
552 /* TBD: _WAK "sometimes" returns stuff - do we want to look at it? */ 548 /* TBD: _WAK "sometimes" returns stuff - do we want to look at it? */
553 549
@@ -582,8 +578,7 @@ acpi_status acpi_leave_sleep_state(u8 sleep_state)
582 arg.integer.value = ACPI_SST_WORKING; 578 arg.integer.value = ACPI_SST_WORKING;
583 status = acpi_evaluate_object(NULL, METHOD_NAME__SST, &arg_list, NULL); 579 status = acpi_evaluate_object(NULL, METHOD_NAME__SST, &arg_list, NULL);
584 if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) { 580 if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) {
585 ACPI_REPORT_ERROR(("Method _SST failed, %s\n", 581 ACPI_EXCEPTION((AE_INFO, status, "During Method _SST"));
586 acpi_format_exception(status)));
587 } 582 }
588 583
589 return_ACPI_STATUS(status); 584 return_ACPI_STATUS(status);
diff --git a/drivers/acpi/hardware/hwtimer.c b/drivers/acpi/hardware/hwtimer.c
index aff6dc141784..fc10b7cb456f 100644
--- a/drivers/acpi/hardware/hwtimer.c
+++ b/drivers/acpi/hardware/hwtimer.c
@@ -6,7 +6,7 @@
6 *****************************************************************************/ 6 *****************************************************************************/
7 7
8/* 8/*
9 * Copyright (C) 2000 - 2005, R. Byron Moore 9 * Copyright (C) 2000 - 2006, R. Byron Moore
10 * All rights reserved. 10 * All rights reserved.
11 * 11 *
12 * Redistribution and use in source and binary forms, with or without 12 * Redistribution and use in source and binary forms, with or without