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:
		@@ -122,7 +122,7 @@ Device (BAT0)
 | 
				
			|||||||
		If (B1RC != 0xffff) {
 | 
							If (B1RC != 0xffff) {
 | 
				
			||||||
			PKG1[2] = B1RC
 | 
								PKG1[2] = B1RC
 | 
				
			||||||
		} Else {
 | 
							} Else {
 | 
				
			||||||
			PKG1[2] = B1RP * (B1DC / 100)
 | 
								PKG1[2] = (B1RP * B1DC) / 100
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		PKG1[3] = B1PV
 | 
							PKG1[3] = B1PV
 | 
				
			||||||
		Return (PKG1)
 | 
							Return (PKG1)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user