mb/google/poppy: Remove redundant mutex
The mutex is only used in one method and that method is serialised. Remove the mutex. BUG=chromium:959232 Reported-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Tested-by: Jacopo Mondi <jacopo@jmondi.org> Change-Id: Ic173d557f4b49cc9e860d13b782fc4940fd80869 Reviewed-on: https://review.coreboot.org/c/coreboot/+/36745 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:
committed by
Patrick Georgi
parent
be0dfef30c
commit
68f0eb5269
@@ -400,50 +400,41 @@ Scope (\_SB.PCI0.I2C2)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Reference count for VSIO */
|
/* Reference count for VSIO */
|
||||||
Mutex (MUTV, 0)
|
|
||||||
Name (VSIC, 0)
|
Name (VSIC, 0)
|
||||||
Method (DOVD, 1, Serialized) {
|
Method (DOVD, 1, Serialized) {
|
||||||
/* Save Acquire result so we can check for
|
/* Turn off VSIO */
|
||||||
Mutex acquired */
|
If (LEqual (Arg0, Zero)) {
|
||||||
Store (Acquire (MUTV, 1000), Local0)
|
/* Decrement only if VSIC > 0 */
|
||||||
/* Check for Mutex acquired */
|
if (LGreater (VSIC, 0)) {
|
||||||
If (LEqual (Local0, Zero)) {
|
Decrement (VSIC)
|
||||||
/* Turn off VSIO */
|
If (LEqual (VSIC, Zero)) {
|
||||||
If (LEqual (Arg0, Zero)) {
|
VSIO = 0
|
||||||
/* Decrement only if VSIC > 0 */
|
Sleep(1)
|
||||||
if (LGreater (VSIC, 0)) {
|
PMOF()
|
||||||
Decrement (VSIC)
|
|
||||||
If (LEqual (VSIC, Zero)) {
|
|
||||||
VSIO = 0
|
|
||||||
Sleep(1)
|
|
||||||
PMOF()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} ElseIf (LEqual (Arg0, 1)) {
|
|
||||||
/* Increment only if VSIC < 4 */
|
|
||||||
If (LLess (VSIC, 4)) {
|
|
||||||
/* Turn on VSIO */
|
|
||||||
If (LEqual (VSIC, Zero)) {
|
|
||||||
PMON()
|
|
||||||
VSIO = 3
|
|
||||||
|
|
||||||
if (LNotEqual (IOVA, 52)) {
|
|
||||||
/* Set VSIO value as
|
|
||||||
1.8006 V */
|
|
||||||
IOVA = 52
|
|
||||||
}
|
|
||||||
if (LNotEqual (SIOV, 52)) {
|
|
||||||
/* Set VSIO value as
|
|
||||||
1.8006 V */
|
|
||||||
SIOV = 52
|
|
||||||
}
|
|
||||||
Sleep(3)
|
|
||||||
}
|
|
||||||
Increment (VSIC)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} ElseIf (LEqual (Arg0, 1)) {
|
||||||
|
/* Increment only if VSIC < 4 */
|
||||||
|
If (LLess (VSIC, 4)) {
|
||||||
|
/* Turn on VSIO */
|
||||||
|
If (LEqual (VSIC, Zero)) {
|
||||||
|
PMON()
|
||||||
|
VSIO = 3
|
||||||
|
|
||||||
Release (MUTV)
|
if (LNotEqual (IOVA, 52)) {
|
||||||
|
/* Set VSIO value as
|
||||||
|
1.8006 V */
|
||||||
|
IOVA = 52
|
||||||
|
}
|
||||||
|
if (LNotEqual (SIOV, 52)) {
|
||||||
|
/* Set VSIO value as
|
||||||
|
1.8006 V */
|
||||||
|
SIOV = 52
|
||||||
|
}
|
||||||
|
Sleep(3)
|
||||||
|
}
|
||||||
|
Increment (VSIC)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user