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 <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70629
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
This commit is contained in:
Felix Singer 2022-12-12 02:25:37 +01:00
parent 0e9cc44d1b
commit 52f46525b4
2 changed files with 15 additions and 15 deletions

View File

@ -6,7 +6,7 @@
Method(BRID, 1, NotSerialized) Method(BRID, 1, NotSerialized)
{ {
Store (Match (BRIG, MEQ, Arg0, MTR, Zero, 2), Local0) Local0 = Match (BRIG, MEQ, Arg0, MTR, Zero, 2)
If (Local0 == Ones) If (Local0 == Ones)
{ {
Return (SizeOf(BRIG) - 1) Return (SizeOf(BRIG) - 1)
@ -16,7 +16,7 @@
Method (XBCL, 0, NotSerialized) Method (XBCL, 0, NotSerialized)
{ {
Store (1, BRCT) BRCT = 1
Return (BRIG) Return (BRIG)
} }
@ -37,7 +37,7 @@
{ {
Notify (LCD0, 0x87) Notify (LCD0, 0x87)
} Else { } Else {
Store (BRID (XBQC ()), Local0) Local0 = BRID (XBQC ())
If (Local0 != 2) If (Local0 != 2)
{ {
Local0-- Local0--
@ -55,7 +55,7 @@
{ {
Notify (LCD0, 0x86) Notify (LCD0, 0x86)
} Else { } Else {
Store (BRID (XBQC ()), Local0) Local0 = BRID (XBQC ())
If (Local0 != SizeOf(BRIG) - 1) If (Local0 != SizeOf(BRIG) - 1)
{ {
Local0++ Local0++

View File

@ -53,12 +53,12 @@
/* Always keep BCLP up to date, even if driver is not ready. /* Always keep BCLP up to date, even if driver is not ready.
It requires a full 8-bit brightness value. 255 = 100% */ It requires a full 8-bit brightness value. 255 = 100% */
Store (Arg0 * 255 / 100, Local1) Local1 = Arg0 * 255 / 100
If (Local1 > 255) { If (Local1 > 255) {
Store (255, Local1) Local1 = 255
} }
/* also set valid bit */ /* also set valid bit */
Store (Or (Local1, 0x80000000), BCLP) BCLP = Or (Local1, 0x80000000)
If (ARDY == 0) If (ARDY == 0)
{ {
@ -66,11 +66,11 @@
} }
/* Request back-light change */ /* Request back-light change */
Store (0x2, ASLC) ASLC = 0x2
/* Trigger IRQ */ /* Trigger IRQ */
Store (0x1, ASLE) ASLE = 0x1
Store (0x20, Local0) Local0 = 0x20
While (Local0 > 0) While (Local0 > 0)
{ {
Sleep (1) Sleep (1)
@ -105,7 +105,7 @@
Method (XBCM, 1, NotSerialized) 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) */ /* Find value closest to BCLV in BRIG (which must be ordered) */
@ -117,14 +117,14 @@
Return (Zero) Return (Zero)
} }
/* Local0: current percentage */ /* Local0: current percentage */
Store (DRCL (BCLV * 100, BCLM), Local0) Local0 = DRCL (BCLV * 100, BCLM)
/* Local1: loop index (selectable values start at 2 in BRIG) */ /* Local1: loop index (selectable values start at 2 in BRIG) */
Store (2, Local1) Local1 = 2
While (Local1 < SizeOf (BRIG) - 1) { While (Local1 < SizeOf (BRIG) - 1) {
/* Local[23]: adjacent values in BRIG */ /* Local[23]: adjacent values in BRIG */
Store (DeRefOf (BRIG[Local1]), Local2) Local2 = DeRefOf (BRIG[Local1])
Store (DeRefOf (BRIG[Local1 + 1]), Local3) Local3 = DeRefOf (BRIG[Local1 + 1])
If (Local0 < Local3) { If (Local0 < Local3) {
If (Local0 < Local2 || Local0 - Local2 < Local3 - Local0) { If (Local0 < Local2 || Local0 - Local2 < Local3 - Local0) {