From 52f46525b48b6e6dff2c5574f3e961e1f7f16128 Mon Sep 17 00:00:00 2001 From: Felix Singer Date: Mon, 12 Dec 2022 02:25:37 +0100 Subject: [PATCH] drivers/intel/gma/acpi: Replace Store(a,b) with ASL 2.0 syntax Replace `Store (a, b)` with `b = a`. Change-Id: Ifd3a814228df6a399fe1110abf5b5bc18e6fd6d2 Signed-off-by: Felix Singer Reviewed-on: https://review.coreboot.org/c/coreboot/+/70629 Tested-by: build bot (Jenkins) Reviewed-by: Eric Lai Reviewed-by: Elyes Haouas --- src/drivers/intel/gma/acpi/common.asl | 8 +++---- .../gma/acpi/configure_brightness_levels.asl | 22 +++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/drivers/intel/gma/acpi/common.asl b/src/drivers/intel/gma/acpi/common.asl index 0d7f576aa8..59eae70bfa 100644 --- a/src/drivers/intel/gma/acpi/common.asl +++ b/src/drivers/intel/gma/acpi/common.asl @@ -6,7 +6,7 @@ Method(BRID, 1, NotSerialized) { - Store (Match (BRIG, MEQ, Arg0, MTR, Zero, 2), Local0) + Local0 = Match (BRIG, MEQ, Arg0, MTR, Zero, 2) If (Local0 == Ones) { Return (SizeOf(BRIG) - 1) @@ -16,7 +16,7 @@ Method (XBCL, 0, NotSerialized) { - Store (1, BRCT) + BRCT = 1 Return (BRIG) } @@ -37,7 +37,7 @@ { Notify (LCD0, 0x87) } Else { - Store (BRID (XBQC ()), Local0) + Local0 = BRID (XBQC ()) If (Local0 != 2) { Local0-- @@ -55,7 +55,7 @@ { Notify (LCD0, 0x86) } Else { - Store (BRID (XBQC ()), Local0) + Local0 = BRID (XBQC ()) If (Local0 != SizeOf(BRIG) - 1) { Local0++ diff --git a/src/drivers/intel/gma/acpi/configure_brightness_levels.asl b/src/drivers/intel/gma/acpi/configure_brightness_levels.asl index 342f760f82..852c96e898 100644 --- a/src/drivers/intel/gma/acpi/configure_brightness_levels.asl +++ b/src/drivers/intel/gma/acpi/configure_brightness_levels.asl @@ -53,12 +53,12 @@ /* Always keep BCLP up to date, even if driver is not ready. It requires a full 8-bit brightness value. 255 = 100% */ - Store (Arg0 * 255 / 100, Local1) + Local1 = Arg0 * 255 / 100 If (Local1 > 255) { - Store (255, Local1) + Local1 = 255 } /* also set valid bit */ - Store (Or (Local1, 0x80000000), BCLP) + BCLP = Or (Local1, 0x80000000) If (ARDY == 0) { @@ -66,11 +66,11 @@ } /* Request back-light change */ - Store (0x2, ASLC) + ASLC = 0x2 /* Trigger IRQ */ - Store (0x1, ASLE) + ASLE = 0x1 - Store (0x20, Local0) + Local0 = 0x20 While (Local0 > 0) { Sleep (1) @@ -105,7 +105,7 @@ Method (XBCM, 1, NotSerialized) { - Store (DRCL (Arg0 * BCLM, 100), BCLV) + BCLV = DRCL (Arg0 * BCLM, 100) } /* Find value closest to BCLV in BRIG (which must be ordered) */ @@ -117,14 +117,14 @@ Return (Zero) } /* Local0: current percentage */ - Store (DRCL (BCLV * 100, BCLM), Local0) + Local0 = DRCL (BCLV * 100, BCLM) /* Local1: loop index (selectable values start at 2 in BRIG) */ - Store (2, Local1) + Local1 = 2 While (Local1 < SizeOf (BRIG) - 1) { /* Local[23]: adjacent values in BRIG */ - Store (DeRefOf (BRIG[Local1]), Local2) - Store (DeRefOf (BRIG[Local1 + 1]), Local3) + Local2 = DeRefOf (BRIG[Local1]) + Local3 = DeRefOf (BRIG[Local1 + 1]) If (Local0 < Local3) { If (Local0 < Local2 || Local0 - Local2 < Local3 - Local0) {