aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2013-03-08 04:22:14 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-03-11 19:45:04 -0400
commitc39660b232c5e4aee3cded5a02d28e71ca447fb8 (patch)
tree6b7cee9e3520270c28eb1d347eb127d0130ed303 /drivers/acpi/acpica
parentf1778eb1ab3e3ef90826b6b6b0ad7fbafa46308b (diff)
ACPICA: Update for ACPI 5 hardware-reduced feature
Ensure that AcpiEnable and AcpiDisable work properly when the hardware-reduced flag is set in the FADT. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/acpica')
-rw-r--r--drivers/acpi/acpica/evxfevnt.c12
-rw-r--r--drivers/acpi/acpica/hwacpi.c12
2 files changed, 24 insertions, 0 deletions
diff --git a/drivers/acpi/acpica/evxfevnt.c b/drivers/acpi/acpica/evxfevnt.c
index d6e4e42316db..7039606a0ba8 100644
--- a/drivers/acpi/acpica/evxfevnt.c
+++ b/drivers/acpi/acpica/evxfevnt.c
@@ -74,6 +74,12 @@ acpi_status acpi_enable(void)
74 return_ACPI_STATUS(AE_NO_ACPI_TABLES); 74 return_ACPI_STATUS(AE_NO_ACPI_TABLES);
75 } 75 }
76 76
77 /* If the Hardware Reduced flag is set, machine is always in acpi mode */
78
79 if (acpi_gbl_reduced_hardware) {
80 return_ACPI_STATUS(AE_OK);
81 }
82
77 /* Check current mode */ 83 /* Check current mode */
78 84
79 if (acpi_hw_get_mode() == ACPI_SYS_MODE_ACPI) { 85 if (acpi_hw_get_mode() == ACPI_SYS_MODE_ACPI) {
@@ -126,6 +132,12 @@ acpi_status acpi_disable(void)
126 132
127 ACPI_FUNCTION_TRACE(acpi_disable); 133 ACPI_FUNCTION_TRACE(acpi_disable);
128 134
135 /* If the Hardware Reduced flag is set, machine is always in acpi mode */
136
137 if (acpi_gbl_reduced_hardware) {
138 return_ACPI_STATUS(AE_OK);
139 }
140
129 if (acpi_hw_get_mode() == ACPI_SYS_MODE_LEGACY) { 141 if (acpi_hw_get_mode() == ACPI_SYS_MODE_LEGACY) {
130 ACPI_DEBUG_PRINT((ACPI_DB_INIT, 142 ACPI_DEBUG_PRINT((ACPI_DB_INIT,
131 "System is already in legacy (non-ACPI) mode\n")); 143 "System is already in legacy (non-ACPI) mode\n"));
diff --git a/drivers/acpi/acpica/hwacpi.c b/drivers/acpi/acpica/hwacpi.c
index deb3f61e2bd1..9b02a9f5b04a 100644
--- a/drivers/acpi/acpica/hwacpi.c
+++ b/drivers/acpi/acpica/hwacpi.c
@@ -66,6 +66,12 @@ acpi_status acpi_hw_set_mode(u32 mode)
66 66
67 ACPI_FUNCTION_TRACE(hw_set_mode); 67 ACPI_FUNCTION_TRACE(hw_set_mode);
68 68
69 /* If the Hardware Reduced flag is set, machine is always in acpi mode */
70
71 if (acpi_gbl_reduced_hardware) {
72 return_ACPI_STATUS(AE_OK);
73 }
74
69 /* 75 /*
70 * ACPI 2.0 clarified that if SMI_CMD in FADT is zero, 76 * ACPI 2.0 clarified that if SMI_CMD in FADT is zero,
71 * system does not support mode transition. 77 * system does not support mode transition.
@@ -146,6 +152,12 @@ u32 acpi_hw_get_mode(void)
146 152
147 ACPI_FUNCTION_TRACE(hw_get_mode); 153 ACPI_FUNCTION_TRACE(hw_get_mode);
148 154
155 /* If the Hardware Reduced flag is set, machine is always in acpi mode */
156
157 if (acpi_gbl_reduced_hardware) {
158 return_VALUE(ACPI_SYS_MODE_ACPI);
159 }
160
149 /* 161 /*
150 * ACPI 2.0 clarified that if SMI_CMD in FADT is zero, 162 * ACPI 2.0 clarified that if SMI_CMD in FADT is zero,
151 * system does not support mode transition. 163 * system does not support mode transition.