aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/hardware/hwacpi.c
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2007-02-02 11:48:18 -0500
committerLen Brown <len.brown@intel.com>2007-02-02 21:14:21 -0500
commitf3d2e7865c816258c699ff965768e46b50d536d3 (patch)
tree83d21269e506109275b77d3ed161883bba8a39cf /drivers/acpi/hardware/hwacpi.c
parent2e42005bcdb4f63bed1cea7f537a5534d4bd7a57 (diff)
ACPICA: Implement simplified Table Manager
The Table Manager component has been completely redesigned and reimplemented. The new design is much simpler, and reduces the overall code and data size of the kernel-resident ACPICA by approximately 5%. Also, it is now possible to obtain the ACPI tables very early during kernel initialization, even before dynamic memory management is initialized. Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/hardware/hwacpi.c')
-rw-r--r--drivers/acpi/hardware/hwacpi.c22
1 files changed, 7 insertions, 15 deletions
diff --git a/drivers/acpi/hardware/hwacpi.c b/drivers/acpi/hardware/hwacpi.c
index de50fab2a910..14e8111769a3 100644
--- a/drivers/acpi/hardware/hwacpi.c
+++ b/drivers/acpi/hardware/hwacpi.c
@@ -65,13 +65,6 @@ acpi_status acpi_hw_initialize(void)
65 65
66 ACPI_FUNCTION_TRACE(hw_initialize); 66 ACPI_FUNCTION_TRACE(hw_initialize);
67 67
68 /* We must have the ACPI tables by the time we get here */
69
70 if (!acpi_gbl_FADT) {
71 ACPI_ERROR((AE_INFO, "No FADT is present"));
72 return_ACPI_STATUS(AE_NO_ACPI_TABLES);
73 }
74
75 /* Sanity check the FADT for valid values */ 68 /* Sanity check the FADT for valid values */
76 69
77 status = acpi_ut_validate_fadt(); 70 status = acpi_ut_validate_fadt();
@@ -106,7 +99,7 @@ acpi_status acpi_hw_set_mode(u32 mode)
106 * ACPI 2.0 clarified that if SMI_CMD in FADT is zero, 99 * ACPI 2.0 clarified that if SMI_CMD in FADT is zero,
107 * system does not support mode transition. 100 * system does not support mode transition.
108 */ 101 */
109 if (!acpi_gbl_FADT->smi_cmd) { 102 if (!acpi_gbl_FADT.smi_command) {
110 ACPI_ERROR((AE_INFO, 103 ACPI_ERROR((AE_INFO,
111 "No SMI_CMD in FADT, mode transition failed")); 104 "No SMI_CMD in FADT, mode transition failed"));
112 return_ACPI_STATUS(AE_NO_HARDWARE_RESPONSE); 105 return_ACPI_STATUS(AE_NO_HARDWARE_RESPONSE);
@@ -119,7 +112,7 @@ acpi_status acpi_hw_set_mode(u32 mode)
119 * we make sure both the numbers are zero to determine these 112 * we make sure both the numbers are zero to determine these
120 * transitions are not supported. 113 * transitions are not supported.
121 */ 114 */
122 if (!acpi_gbl_FADT->acpi_enable && !acpi_gbl_FADT->acpi_disable) { 115 if (!acpi_gbl_FADT.acpi_enable && !acpi_gbl_FADT.acpi_disable) {
123 ACPI_ERROR((AE_INFO, 116 ACPI_ERROR((AE_INFO,
124 "No ACPI mode transition supported in this system (enable/disable both zero)")); 117 "No ACPI mode transition supported in this system (enable/disable both zero)"));
125 return_ACPI_STATUS(AE_OK); 118 return_ACPI_STATUS(AE_OK);
@@ -130,9 +123,8 @@ acpi_status acpi_hw_set_mode(u32 mode)
130 123
131 /* BIOS should have disabled ALL fixed and GP events */ 124 /* BIOS should have disabled ALL fixed and GP events */
132 125
133 status = acpi_os_write_port(acpi_gbl_FADT->smi_cmd, 126 status = acpi_os_write_port(acpi_gbl_FADT.smi_command,
134 (u32) acpi_gbl_FADT->acpi_enable, 127 (u32) acpi_gbl_FADT.acpi_enable, 8);
135 8);
136 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 128 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
137 "Attempting to enable ACPI mode\n")); 129 "Attempting to enable ACPI mode\n"));
138 break; 130 break;
@@ -143,8 +135,8 @@ acpi_status acpi_hw_set_mode(u32 mode)
143 * BIOS should clear all fixed status bits and restore fixed event 135 * BIOS should clear all fixed status bits and restore fixed event
144 * enable bits to default 136 * enable bits to default
145 */ 137 */
146 status = acpi_os_write_port(acpi_gbl_FADT->smi_cmd, 138 status = acpi_os_write_port(acpi_gbl_FADT.smi_command,
147 (u32) acpi_gbl_FADT->acpi_disable, 139 (u32) acpi_gbl_FADT.acpi_disable,
148 8); 140 8);
149 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 141 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
150 "Attempting to enable Legacy (non-ACPI) mode\n")); 142 "Attempting to enable Legacy (non-ACPI) mode\n"));
@@ -204,7 +196,7 @@ u32 acpi_hw_get_mode(void)
204 * ACPI 2.0 clarified that if SMI_CMD in FADT is zero, 196 * ACPI 2.0 clarified that if SMI_CMD in FADT is zero,
205 * system does not support mode transition. 197 * system does not support mode transition.
206 */ 198 */
207 if (!acpi_gbl_FADT->smi_cmd) { 199 if (!acpi_gbl_FADT.smi_command) {
208 return_UINT32(ACPI_SYS_MODE_ACPI); 200 return_UINT32(ACPI_SYS_MODE_ACPI);
209 } 201 }
210 202