From 0ace876a741b063a7c3745f2ff96d61787927114 Mon Sep 17 00:00:00 2001 From: Matt DeVillier Date: Wed, 25 Jan 2023 14:27:24 -0600 Subject: [PATCH] ec/google/wilco: Fix ACPI EC RAM read/write ops While debugging lack of battery status under Windows, it was discovered that the read/write flags in the args to the EC RAM 'ECRW' method were not being correctly identified. Force set them from the R() and W() methods which call ECRW() so those calls are processed properly. TEST=build/boot Windows on google/drallion, verify battery status, charging, etc are all reported properly. Change-Id: I2a40b8d50ba65213813c781e53b56cc1a8b8debf Signed-off-by: Coolstar Signed-off-by: Matt DeVillier Reviewed-on: https://review.coreboot.org/c/coreboot/+/72472 Tested-by: build bot (Jenkins) Reviewed-by: Eric Lai --- src/ec/google/wilco/acpi/ec.asl | 7 +++++++ src/ec/google/wilco/acpi/ec_ram.asl | 3 --- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/ec/google/wilco/acpi/ec.asl b/src/ec/google/wilco/acpi/ec.asl index 3a9256eb09..7b41ef2e3f 100644 --- a/src/ec/google/wilco/acpi/ec.asl +++ b/src/ec/google/wilco/acpi/ec.asl @@ -1,5 +1,8 @@ /* SPDX-License-Identifier: GPL-2.0-only */ +Name (RD, 0) +Name (WR, 1) + Device (EC0) { Name (_HID, EisaId ("PNP0C09")) @@ -124,6 +127,8 @@ Device (EC0) */ Method (R, 1, Serialized, 2) { + /* Set read operation */ + Arg0[2] = RD Return (ECRW (Arg0, 0)) } @@ -134,6 +139,8 @@ Device (EC0) */ Method (W, 2, Serialized, 2) { + /* Set write operation */ + Arg0[2] = WR Return (ECRW (Arg0, Arg1)) } diff --git a/src/ec/google/wilco/acpi/ec_ram.asl b/src/ec/google/wilco/acpi/ec_ram.asl index 9329ee7e02..665fa1b481 100644 --- a/src/ec/google/wilco/acpi/ec_ram.asl +++ b/src/ec/google/wilco/acpi/ec_ram.asl @@ -1,8 +1,5 @@ /* SPDX-License-Identifier: GPL-2.0-only */ -Name (RD, 0) -Name (WR, 1) - /* * EC RAM READ */