Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 141861
b: refs/heads/master
c: 20869dc
h: refs/heads/master
i:
  141859: 5cf7ee1
v: v3
  • Loading branch information
Bob Moore authored and Len Brown committed Mar 27, 2009
1 parent 5faae65 commit 83e1481
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8636f8d257b3edf5a1529df93119cdc630ed85c7
refs/heads/master: 20869dcfde204e1c21b642608d708d82472fee2b
10 changes: 9 additions & 1 deletion trunk/drivers/acpi/acpica/aclocal.h
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,15 @@ struct acpi_bit_register_info {
* must be preserved.
*/
#define ACPI_PM1_STATUS_PRESERVED_BITS 0x0800 /* Bit 11 */
#define ACPI_PM1_CONTROL_PRESERVED_BITS 0x0200 /* Bit 9 (whatever) */

/* For control registers, both ignored and reserved bits must be preserved */

#define ACPI_PM1_CONTROL_IGNORED_BITS 0x0201 /* Bits 9, 0(SCI_EN) */
#define ACPI_PM1_CONTROL_RESERVED_BITS 0xC1F8 /* Bits 14-15, 3-8 */
#define ACPI_PM1_CONTROL_PRESERVED_BITS \
(ACPI_PM1_CONTROL_IGNORED_BITS | ACPI_PM1_CONTROL_RESERVED_BITS)

#define ACPI_PM2_CONTROL_PRESERVED_BITS 0xFFFFFFFE /* All except bit 0 */

/*
* Register IDs
Expand Down
15 changes: 15 additions & 0 deletions trunk/drivers/acpi/acpica/hwregs.c
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,21 @@ acpi_status acpi_hw_register_write(u32 register_id, u32 value)

case ACPI_REGISTER_PM2_CONTROL: /* 8-bit access */

/*
* For control registers, all reserved bits must be preserved,
* as per the ACPI spec.
*/
status =
acpi_read(&read_value, &acpi_gbl_FADT.xpm2_control_block);
if (ACPI_FAILURE(status)) {
goto exit;
}

/* Insert the bits to be preserved */

ACPI_INSERT_BITS(value, ACPI_PM2_CONTROL_PRESERVED_BITS,
read_value);

status = acpi_write(value, &acpi_gbl_FADT.xpm2_control_block);
break;

Expand Down

0 comments on commit 83e1481

Please sign in to comment.