mb/google/poppy: Remove useless ifs around voltage and GPIO direction configuration

The methods generally tested OP region settings and only changed them if
they were not in their desired values. Instead, assign them directly
without checking them.

BUG=chromium:959232

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Tested-by: Jacopo Mondi <jacopo@jmondi.org>
Change-Id: I3ceca4bd51c4410c7020431f4fd682c4ca925110
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36746
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Sakari Ailus 2019-11-01 19:13:01 +02:00 committed by Patrick Georgi
parent 68f0eb5269
commit 00517b687a
1 changed files with 11 additions and 30 deletions

View File

@ -438,10 +438,6 @@ Scope (\_SB.PCI0.I2C2)
} }
} }
/* C0GP is used to indicate if CAM0
* GPIOs are configured as input.
*/
Name (C0GP, 0)
/* Power resource methods for CAM0 */ /* Power resource methods for CAM0 */
PowerResource (OVTH, 0, 0) { PowerResource (OVTH, 0, 0) {
Name (STA, 0) Name (STA, 0)
@ -453,22 +449,15 @@ Scope (\_SB.PCI0.I2C2)
daisy chain */ daisy chain */
DOVD(1) DOVD(1)
If (LEqual (C0GP, 0)) {
\_SB.PCI0.I2C2.PMIC.CGP1() \_SB.PCI0.I2C2.PMIC.CGP1()
\_SB.PCI0.I2C2.PMIC.CGP2() \_SB.PCI0.I2C2.PMIC.CGP2()
C0GP = 1
}
if (LNotEqual (ACVA, 109)) {
/* Set ANA at 2.8152V */ /* Set ANA at 2.8152V */
ACVA = 109 ACVA = 109
}
VACT = 1 VACT = 1
if (LNotEqual (DCVA, 12)) {
/* Set CORE at 1.2V */ /* Set CORE at 1.2V */
DCVA = 12 DCVA = 12
}
VDCT = 1 VDCT = 1
\_SB.PCI0.I2C2.PMIC.CLKE() \_SB.PCI0.I2C2.PMIC.CLKE()
@ -527,11 +516,8 @@ Scope (\_SB.PCI0.I2C2)
daisy chain */ daisy chain */
DOVD(1) DOVD(1)
if (LNotEqual (AX2V, 52)) { /* Set VAUX2 as 1.8006 V */
/* Set VAUX2 as
1.8006 V */
AX2V = 52 AX2V = 52
}
VAX2 = 1 /* Enable VAUX2 */ VAX2 = 1 /* Enable VAUX2 */
\_SB.PCI0.I2C2.PMIC.CGP4(1) \_SB.PCI0.I2C2.PMIC.CGP4(1)
@ -542,10 +528,8 @@ Scope (\_SB.PCI0.I2C2)
*/ */
Sleep(1) Sleep(1)
if (LNotEqual (AX1V, 19)) {
/* Set VAUX1 as 1.2132V */ /* Set VAUX1 as 1.2132V */
AX1V = 19 AX1V = 19
}
VAX1 = 1 /* Enable VAUX1 */ VAX1 = 1 /* Enable VAUX1 */
/* Wait for VDD to settle. */ /* Wait for VDD to settle. */
@ -603,11 +587,8 @@ Scope (\_SB.PCI0.I2C2)
/* Enable VCM regulator */ /* Enable VCM regulator */
VCMC = 1 VCMC = 1
if (LNotEqual (VCMV, 109)) { /* Set VCM value at 2.8152 V */
/* Set VCM value at
2.8152 V */
VCMV = 109 VCMV = 109
}
Sleep(3) Sleep(3)
STA = 1 STA = 1