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>
This commit is contained in:
Angel Pons 2020-10-25 19:44:16 +01:00
parent df7a887cb5
commit 527647677a
1 changed files with 7 additions and 13 deletions

View File

@ -29,27 +29,21 @@ Device (GPIO)
Method (_CRS, 0, NotSerialized) Method (_CRS, 0, NotSerialized)
{ {
If (\ISLP ()) { CreateDwordField (^RBUF, ^BAR0._MIN, BMIN)
CreateDwordField (^RBUF, ^BAR0._MIN, BMIN) CreateDwordField (^RBUF, ^BAR0._MAX, BMAX)
CreateDwordField (^RBUF, ^BAR0._MAX, BMAX) CreateDwordField (^RBUF, ^BAR0._LEN, BLEN)
CreateDwordField (^RBUF, ^BAR0._LEN, BLEN)
Store (DEFAULT_GPIOSIZE, BLEN) Store (DEFAULT_GPIOSIZE, BLEN)
Store (DEFAULT_GPIOBASE, BMIN) Store (DEFAULT_GPIOBASE, BMIN)
Store (Subtract (Add (DEFAULT_GPIOBASE, Store (Subtract (Add (DEFAULT_GPIOBASE,
DEFAULT_GPIOSIZE), 1), BMAX) DEFAULT_GPIOSIZE), 1), BMAX)
}
Return (RBUF) Return (RBUF)
} }
Method (_STA, 0, NotSerialized) Method (_STA, 0, NotSerialized)
{ {
If (\ISLP ()) { Return (0xF)
Return (0xF)
} Else {
Return (0x0)
}
} }
// GWAK: Setup GPIO as ACPI GPE for Wake // GWAK: Setup GPIO as ACPI GPE for Wake