ec/starlabs/merlin: Improve accuracy of RSOC

Multiply before dividing to improve accuracy of the result.

Change-Id: I974cad3af4e1f86ae58e90c68db463fc436223af
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83619
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Sean Rhodes 2024-07-23 20:10:11 +01:00 committed by Felix Held
parent 24e550fd61
commit a3863ca44a

View File

@ -122,7 +122,7 @@ Device (BAT0)
If (B1RC != 0xffff) {
PKG1[2] = B1RC
} Else {
PKG1[2] = B1RP * (B1DC / 100)
PKG1[2] = (B1RP * B1DC) / 100
}
PKG1[3] = B1PV
Return (PKG1)