diff options
author | Bob Moore <robert.moore@intel.com> | 2012-12-31 00:07:31 +0000 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-01-10 12:36:22 +0100 |
commit | 9cea6249c9154a7d0b322a226261697f947692ad (patch) | |
tree | a991188c19927732d4758d1cf855510a9599f646 /drivers/acpi/acpica | |
parent | f7b488e23cadc76503cbf37d7c432cfb0a77f41f (diff) | |
download | linux-3.10-9cea6249c9154a7d0b322a226261697f947692ad.tar.gz linux-3.10-9cea6249c9154a7d0b322a226261697f947692ad.tar.bz2 linux-3.10-9cea6249c9154a7d0b322a226261697f947692ad.zip |
ACPICA: Resources: Split interrupt share/wake bits into two fields.
These two bits are merged at the external interface level for the
IRQ, Interrupt, and GpioInt resource descriptors. However, these
bits are logically independent and there is no need to keep them
merged internally. Therefore, this change splits the bits into
"sharable" and "wake capable" fields within the resource manager.
This simplifies drive code that needs to examine these bits.
Aaron Lu, Bob Moore.
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/rsirq.c | 32 | ||||
-rw-r--r-- | drivers/acpi/acpica/rsserial.c | 8 |
2 files changed, 28 insertions, 12 deletions
diff --git a/drivers/acpi/acpica/rsirq.c b/drivers/acpi/acpica/rsirq.c index f3733ee0cac..9c1d74a8a67 100644 --- a/drivers/acpi/acpica/rsirq.c +++ b/drivers/acpi/acpica/rsirq.c @@ -53,7 +53,7 @@ ACPI_MODULE_NAME("rsirq") * acpi_rs_get_irq * ******************************************************************************/ -struct acpi_rsconvert_info acpi_rs_get_irq[8] = { +struct acpi_rsconvert_info acpi_rs_get_irq[9] = { {ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_IRQ, ACPI_RS_SIZE(struct acpi_resource_irq), ACPI_RSC_TABLE_SIZE(acpi_rs_get_irq)}, @@ -80,7 +80,7 @@ struct acpi_rsconvert_info acpi_rs_get_irq[8] = { {ACPI_RSC_EXIT_NE, ACPI_RSC_COMPARE_AML_LENGTH, 0, 3}, - /* Get flags: Triggering[0], Polarity[3], sharing_and_wake[4:5] */ + /* Get flags: Triggering[0], Polarity[3], Sharing[4], Wake[5] */ {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.irq.triggering), AML_OFFSET(irq.flags), @@ -90,9 +90,13 @@ struct acpi_rsconvert_info acpi_rs_get_irq[8] = { AML_OFFSET(irq.flags), 3}, - {ACPI_RSC_2BITFLAG, ACPI_RS_OFFSET(data.irq.sharable), + {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.irq.sharable), AML_OFFSET(irq.flags), - 4} + 4}, + + {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.irq.wake_capable), + AML_OFFSET(irq.flags), + 5} }; /******************************************************************************* @@ -101,7 +105,7 @@ struct acpi_rsconvert_info acpi_rs_get_irq[8] = { * ******************************************************************************/ -struct acpi_rsconvert_info acpi_rs_set_irq[13] = { +struct acpi_rsconvert_info acpi_rs_set_irq[14] = { /* Start with a default descriptor of length 3 */ {ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_IRQ, @@ -114,7 +118,7 @@ struct acpi_rsconvert_info acpi_rs_set_irq[13] = { AML_OFFSET(irq.irq_mask), ACPI_RS_OFFSET(data.irq.interrupt_count)}, - /* Set flags: Triggering[0], Polarity[3], sharing_and_wake[4:5] */ + /* Set flags: Triggering[0], Polarity[3], Sharing[4], Wake[5] */ {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.irq.triggering), AML_OFFSET(irq.flags), @@ -124,10 +128,14 @@ struct acpi_rsconvert_info acpi_rs_set_irq[13] = { AML_OFFSET(irq.flags), 3}, - {ACPI_RSC_2BITFLAG, ACPI_RS_OFFSET(data.irq.sharable), + {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.irq.sharable), AML_OFFSET(irq.flags), 4}, + {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.irq.wake_capable), + AML_OFFSET(irq.flags), + 5}, + /* * All done if the output descriptor length is required to be 3 * (i.e., optimization to 2 bytes cannot be attempted) @@ -181,7 +189,7 @@ struct acpi_rsconvert_info acpi_rs_set_irq[13] = { * ******************************************************************************/ -struct acpi_rsconvert_info acpi_rs_convert_ext_irq[9] = { +struct acpi_rsconvert_info acpi_rs_convert_ext_irq[10] = { {ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_EXTENDED_IRQ, ACPI_RS_SIZE(struct acpi_resource_extended_irq), ACPI_RSC_TABLE_SIZE(acpi_rs_convert_ext_irq)}, @@ -192,7 +200,7 @@ struct acpi_rsconvert_info acpi_rs_convert_ext_irq[9] = { /* * Flags: Producer/Consumer[0], Triggering[1], Polarity[2], - * sharing_and_wake[3:4] + * Sharing[3], Wake[4] */ {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.extended_irq.producer_consumer), AML_OFFSET(extended_irq.flags), @@ -206,10 +214,14 @@ struct acpi_rsconvert_info acpi_rs_convert_ext_irq[9] = { AML_OFFSET(extended_irq.flags), 2}, - {ACPI_RSC_2BITFLAG, ACPI_RS_OFFSET(data.extended_irq.sharable), + {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.extended_irq.sharable), AML_OFFSET(extended_irq.flags), 3}, + {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.extended_irq.wake_capable), + AML_OFFSET(extended_irq.flags), + 4}, + /* IRQ Table length (Byte4) */ {ACPI_RSC_COUNT, ACPI_RS_OFFSET(data.extended_irq.interrupt_count), diff --git a/drivers/acpi/acpica/rsserial.c b/drivers/acpi/acpica/rsserial.c index 9aa5e689b44..197bab0248e 100644 --- a/drivers/acpi/acpica/rsserial.c +++ b/drivers/acpi/acpica/rsserial.c @@ -53,7 +53,7 @@ ACPI_MODULE_NAME("rsserial") * acpi_rs_convert_gpio * ******************************************************************************/ -struct acpi_rsconvert_info acpi_rs_convert_gpio[17] = { +struct acpi_rsconvert_info acpi_rs_convert_gpio[18] = { {ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_GPIO, ACPI_RS_SIZE(struct acpi_resource_gpio), ACPI_RSC_TABLE_SIZE(acpi_rs_convert_gpio)}, @@ -75,10 +75,14 @@ struct acpi_rsconvert_info acpi_rs_convert_gpio[17] = { AML_OFFSET(gpio.flags), 0}, - {ACPI_RSC_2BITFLAG, ACPI_RS_OFFSET(data.gpio.sharable), + {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.gpio.sharable), AML_OFFSET(gpio.int_flags), 3}, + {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET(data.gpio.wake_capable), + AML_OFFSET(gpio.int_flags), + 4}, + {ACPI_RSC_2BITFLAG, ACPI_RS_OFFSET(data.gpio.io_restriction), AML_OFFSET(gpio.int_flags), 0}, |