diff options
author | Lin Ming <ming.m.lin@intel.com> | 2009-03-18 21:51:01 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2009-03-27 12:11:03 -0400 |
commit | c3dd25f4c1ca84baa170c0a3a15a884f4f06297e (patch) | |
tree | 817cc0715dcc8e4d546cee10fce6d2d09553e80f /drivers/acpi/acpica/hwregs.c | |
parent | f9ca058430333c9a24c5ca926aa445125f88df18 (diff) |
ACPICA: Clear PM register write-only bits on reading
Affects PM1 Control register only. When reading the register, zero
the write-only bits as per the ACPI spec. ACPICA BZ 443. Lin Ming.
http://www.acpica.org/bugzilla/show_bug.cgi?id=443
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/hwregs.c')
-rw-r--r-- | drivers/acpi/acpica/hwregs.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/acpi/acpica/hwregs.c b/drivers/acpi/acpica/hwregs.c index f8ee0a7fd44d..7b2fb602b5cb 100644 --- a/drivers/acpi/acpica/hwregs.c +++ b/drivers/acpi/acpica/hwregs.c | |||
@@ -207,6 +207,13 @@ acpi_hw_register_read(u32 register_id, u32 * return_value) | |||
207 | xpm1a_control_block, | 207 | xpm1a_control_block, |
208 | &acpi_gbl_FADT. | 208 | &acpi_gbl_FADT. |
209 | xpm1b_control_block); | 209 | xpm1b_control_block); |
210 | |||
211 | /* | ||
212 | * Zero the write-only bits. From the ACPI specification, "Hardware | ||
213 | * Write-Only Bits": "Upon reads to registers with write-only bits, | ||
214 | * software masks out all write-only bits." | ||
215 | */ | ||
216 | value &= ~ACPI_PM1_CONTROL_WRITEONLY_BITS; | ||
210 | break; | 217 | break; |
211 | 218 | ||
212 | case ACPI_REGISTER_PM2_CONTROL: /* 8-bit access */ | 219 | case ACPI_REGISTER_PM2_CONTROL: /* 8-bit access */ |