Angel Pons has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/46776 )
Change subject: sb/intel/lynxpoint/acpi/gpio.asl: Simplify constants ......................................................................
sb/intel/lynxpoint/acpi/gpio.asl: Simplify constants
Only LPT-LP includes this file, so `ISLP` is effectively constant. Thus, eliminate some unnecessary if-blocks, since only one branch gets taken.
Change-Id: Ie8ba787bf5c021845e1e47256a6303697aa97fe1 Signed-off-by: Angel Pons th3fanbus@gmail.com --- M src/southbridge/intel/lynxpoint/acpi/gpio.asl 1 file changed, 7 insertions(+), 13 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/76/46776/1
diff --git a/src/southbridge/intel/lynxpoint/acpi/gpio.asl b/src/southbridge/intel/lynxpoint/acpi/gpio.asl index 1eefcdd..7f30307 100644 --- a/src/southbridge/intel/lynxpoint/acpi/gpio.asl +++ b/src/southbridge/intel/lynxpoint/acpi/gpio.asl @@ -29,27 +29,21 @@
Method (_CRS, 0, NotSerialized) { - If (\ISLP ()) { - CreateDwordField (^RBUF, ^BAR0._MIN, BMIN) - CreateDwordField (^RBUF, ^BAR0._MAX, BMAX) - CreateDwordField (^RBUF, ^BAR0._LEN, BLEN) + CreateDwordField (^RBUF, ^BAR0._MIN, BMIN) + CreateDwordField (^RBUF, ^BAR0._MAX, BMAX) + CreateDwordField (^RBUF, ^BAR0._LEN, BLEN)
- Store (DEFAULT_GPIOSIZE, BLEN) - Store (DEFAULT_GPIOBASE, BMIN) - Store (Subtract (Add (DEFAULT_GPIOBASE, + Store (DEFAULT_GPIOSIZE, BLEN) + Store (DEFAULT_GPIOBASE, BMIN) + Store (Subtract (Add (DEFAULT_GPIOBASE, DEFAULT_GPIOSIZE), 1), BMAX) - }
Return (RBUF) }
Method (_STA, 0, NotSerialized) { - If (\ISLP ()) { - Return (0xF) - } Else { - Return (0x0) - } + Return (0xF) }
// GWAK: Setup GPIO as ACPI GPE for Wake
Michael Niewöhner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46776 )
Change subject: sb/intel/lynxpoint/acpi/gpio.asl: Simplify constants ......................................................................
Patch Set 8:
(1 comment)
https://review.coreboot.org/c/coreboot/+/46776/8//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/46776/8//COMMIT_MSG@9 PS8, Line 9: LPT-LP so, is it missing in LPT-H or is it unneccessary?
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46776 )
Change subject: sb/intel/lynxpoint/acpi/gpio.asl: Simplify constants ......................................................................
Patch Set 8:
(1 comment)
https://review.coreboot.org/c/coreboot/+/46776/8//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/46776/8//COMMIT_MSG@9 PS8, Line 9: LPT-LP
so, is it missing in LPT-H or is it unneccessary?
LPT-H uses a completely different system for GPIOs, as it doesn't have any SerialIO stuff. This is why LPT-H doesn't need this code (it would be completely wrong for LPT-H).
Michael Niewöhner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46776 )
Change subject: sb/intel/lynxpoint/acpi/gpio.asl: Simplify constants ......................................................................
Patch Set 8: Code-Review+2
Angel Pons has submitted this change. ( https://review.coreboot.org/c/coreboot/+/46776 )
Change subject: sb/intel/lynxpoint/acpi/gpio.asl: Simplify constants ......................................................................
sb/intel/lynxpoint/acpi/gpio.asl: Simplify constants
Only LPT-LP includes this file, so `ISLP` is effectively constant. Thus, eliminate some unnecessary if-blocks, since only one branch gets taken.
Change-Id: Ie8ba787bf5c021845e1e47256a6303697aa97fe1 Signed-off-by: Angel Pons th3fanbus@gmail.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/46776 Reviewed-by: Michael Niewöhner foss@mniewoehner.de Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/southbridge/intel/lynxpoint/acpi/gpio.asl 1 file changed, 7 insertions(+), 13 deletions(-)
Approvals: build bot (Jenkins): Verified Michael Niewöhner: Looks good to me, approved
diff --git a/src/southbridge/intel/lynxpoint/acpi/gpio.asl b/src/southbridge/intel/lynxpoint/acpi/gpio.asl index 1eefcdd..7f30307 100644 --- a/src/southbridge/intel/lynxpoint/acpi/gpio.asl +++ b/src/southbridge/intel/lynxpoint/acpi/gpio.asl @@ -29,27 +29,21 @@
Method (_CRS, 0, NotSerialized) { - If (\ISLP ()) { - CreateDwordField (^RBUF, ^BAR0._MIN, BMIN) - CreateDwordField (^RBUF, ^BAR0._MAX, BMAX) - CreateDwordField (^RBUF, ^BAR0._LEN, BLEN) + CreateDwordField (^RBUF, ^BAR0._MIN, BMIN) + CreateDwordField (^RBUF, ^BAR0._MAX, BMAX) + CreateDwordField (^RBUF, ^BAR0._LEN, BLEN)
- Store (DEFAULT_GPIOSIZE, BLEN) - Store (DEFAULT_GPIOBASE, BMIN) - Store (Subtract (Add (DEFAULT_GPIOBASE, + Store (DEFAULT_GPIOSIZE, BLEN) + Store (DEFAULT_GPIOBASE, BMIN) + Store (Subtract (Add (DEFAULT_GPIOBASE, DEFAULT_GPIOSIZE), 1), BMAX) - }
Return (RBUF) }
Method (_STA, 0, NotSerialized) { - If (\ISLP ()) { - Return (0xF) - } Else { - Return (0x0) - } + Return (0xF) }
// GWAK: Setup GPIO as ACPI GPE for Wake