From cacecefb2703e15563616bd83b276dee68130e8a Mon Sep 17 00:00:00 2001 From: Duncan Laurie Date: Mon, 15 Jul 2019 17:37:09 -0700 Subject: [PATCH] ec/google/chromeec: Pass reference of object to BBST() method The BBST() method writes an updated status flag mask that is intended to be stored back in the battery object. This value needs to be passed as a reference to an object to prevent it from being evaluated at the time the method is loaded or it will not actually update the BSTP value in the battery device. This was tested by instrumenting the _BST method in the primary battery and ensuring the value can be updated by the BBST method. Change-Id: Ia8e207a2990059a60d96d8e0f3ed3c16a55c50f4 Signed-off-by: Duncan Laurie Reviewed-on: https://review.coreboot.org/c/coreboot/+/34356 Tested-by: build bot (Jenkins) Reviewed-by: Furquan Shaikh Reviewed-by: Martin Roth --- src/ec/google/chromeec/acpi/battery.asl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ec/google/chromeec/acpi/battery.asl b/src/ec/google/chromeec/acpi/battery.asl index 1ff50991c0..025339540f 100644 --- a/src/ec/google/chromeec/acpi/battery.asl +++ b/src/ec/google/chromeec/acpi/battery.asl @@ -194,7 +194,7 @@ Method (BBST, 4, Serialized) Store (Local1, Index (Arg1, 0)) // Notify if battery state has changed since last time - If (LNotEqual (Local1, Arg2)) { + If (LNotEqual (Local1, DeRefOf (Arg2))) { Store (Local1, Arg2) If (LEqual(Arg0, 0)) { Notify (BAT0, 0x80) @@ -326,7 +326,7 @@ Device (BAT0) Method (_BST, 0, Serialized) { - Return (BBST (0, PBST, BSTP, BFWK)) + Return (BBST (0, PBST, RefOf (BSTP), BFWK)) } } @@ -416,7 +416,7 @@ Device (BAT1) Method (_BST, 0, Serialized) { - Return (BBST (1, PBST, BSTP, BFWK)) + Return (BBST (1, PBST, RefOf (BSTP), BFWK)) } } #endif