diff options
author | Bob Moore <robert.moore@intel.com> | 2009-03-12 21:10:46 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2009-03-27 12:11:03 -0400 |
commit | 20869dcfde204e1c21b642608d708d82472fee2b (patch) | |
tree | a3e6dca8ff835def8ba6a41606aa30cac5d9fa1c /drivers/acpi/acpica/hwregs.c | |
parent | 8636f8d257b3edf5a1529df93119cdc630ed85c7 (diff) |
ACPICA: Preserve all PM control reserved and ignored bits
As per the ACPI specification, preserve (read/modify/write) all
bits that are defined as either reserved or ignored (PM control
control registers only.)
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@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 | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/acpi/acpica/hwregs.c b/drivers/acpi/acpica/hwregs.c index fd7abe277db3..611736266f9f 100644 --- a/drivers/acpi/acpica/hwregs.c +++ b/drivers/acpi/acpica/hwregs.c | |||
@@ -328,6 +328,21 @@ acpi_status acpi_hw_register_write(u32 register_id, u32 value) | |||
328 | 328 | ||
329 | case ACPI_REGISTER_PM2_CONTROL: /* 8-bit access */ | 329 | case ACPI_REGISTER_PM2_CONTROL: /* 8-bit access */ |
330 | 330 | ||
331 | /* | ||
332 | * For control registers, all reserved bits must be preserved, | ||
333 | * as per the ACPI spec. | ||
334 | */ | ||
335 | status = | ||
336 | acpi_read(&read_value, &acpi_gbl_FADT.xpm2_control_block); | ||
337 | if (ACPI_FAILURE(status)) { | ||
338 | goto exit; | ||
339 | } | ||
340 | |||
341 | /* Insert the bits to be preserved */ | ||
342 | |||
343 | ACPI_INSERT_BITS(value, ACPI_PM2_CONTROL_PRESERVED_BITS, | ||
344 | read_value); | ||
345 | |||
331 | status = acpi_write(value, &acpi_gbl_FADT.xpm2_control_block); | 346 | status = acpi_write(value, &acpi_gbl_FADT.xpm2_control_block); |
332 | break; | 347 | break; |
333 | 348 | ||