aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/hardware/hwacpi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/hardware/hwacpi.c')
-rw-r--r--drivers/acpi/hardware/hwacpi.c25
1 files changed, 13 insertions, 12 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}