ec/roda/it8518/acpi: Make use of the assignment operator

Replace `Store()` with the assignment operator.

Change-Id: I2931a3e1b9a55198ec4dacc9218b6c9028052631
Signed-off-by: Felix Singer <felix.singer@secunet.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56605
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
Felix Singer 2021-07-26 17:00:08 +02:00 committed by Nico Huber
parent 5b53d3e233
commit 7f4d53a21c
2 changed files with 25 additions and 25 deletions

View File

@ -44,13 +44,13 @@ Device (BAT0)
{
Printf ("-----> BAT0: _STA")
Store (0x0F, Local0)
Local0 = 0x0F
Store (ECPS, Local1)
Local1 = ECPS
And (Local1, 0x02, Local1)
If (LEqual (Local1, 0x02))
{
Store (0x1F, Local0)
Local0 = 0x1F
}
Printf ("<----- BAT0: _STA")
@ -62,9 +62,9 @@ Device (BAT0)
{
Printf ("-----> BAT0: _BIF")
Store (B0FC, PBIF[2])
Store (Divide (Multiply (B0FC, 6), 100), PBIF[5])
Store (Divide (Multiply (B0FC, 3), 100), PBIF[6])
PBIF[2] = B0FC
PBIF[5] = Divide (Multiply (B0FC, 6), 100)
PBIF[6] = Divide (Multiply (B0FC, 3), 100)
Printf ("<----- BAT0: _BIF")
@ -75,33 +75,33 @@ Device (BAT0)
{
Printf ("-----> BAT0: _BST")
Store (B0ST, Local0)
Local0 = B0ST
And (Local0, 0x40, Local0)
If (LEqual (Local0, 0x40))
{
If (LEqual (PWRS, 1))
{
Store (0x00, PBST[0])
PBST[0] = 0x00
}
Else
{
Store (0x01, PBST[0])
PBST[0] = 0x01
}
}
Else
{
Store (0x02, PBST[0])
PBST[0] = 0x02
}
Store (B0AC, Local1)
Local1 = B0AC
If (LGreaterEqual (Local1, 0x8000))
{
Subtract (0x00010000, Local1, Local1)
}
Store (Local1, PBST[1])
Store (B0RC, PBST[2])
Store (B0VT, PBST[3])
PBST[1] = Local1
PBST[2] = B0RC
PBST[3] = B0VT
Printf ("<----- BAT0: _BST")

View File

@ -53,7 +53,7 @@ Device (EC0)
{
Printf ("-----> EC: _REG")
Store (0x01, ECOS)
ECOS = 0x01
Printf ("<----- EC: _REG")
}
@ -62,7 +62,7 @@ Device (EC0)
{
Printf ("-----> EC: _Q29")
Store (1, PWRS)
PWRS = 1
Notify (AC, 0x80)
Notify (AC, 0x00)
Notify (BAT0, 0x00)
@ -75,7 +75,7 @@ Device (EC0)
{
Printf ("-----> EC: _Q31")
Store (0, PWRS)
PWRS = 0
Notify (AC, 0x80)
Notify (AC, 0x00)
Notify (BAT0, 0x00)
@ -132,12 +132,12 @@ Device (EC0)
{
Printf ("-----> EC: _Q43")
Store (BRIG, Local0)
Local0 = BRIG
Increment (Local0)
If (LGreater (Local0, 0xAA)) {
Store (0xAA, Local0)
Local0 = 0xAA
}
Store (Local0, BRIG)
BRIG = Local0
\_SB.PCI0.GFX0.INCB ()
@ -148,13 +148,13 @@ Device (EC0)
{
Printf ("-----> EC: _Q44")
Store (BRIG, Local0)
Local0 = BRIG
Decrement (Local0)
If (LLess (Local0, 0xA0))
{
Store (0xA0, Local0)
Local0 = 0xA0
}
Store (Local0, BRIG)
BRIG = Local0
\_SB.PCI0.GFX0.DECB ()
@ -165,7 +165,7 @@ Device (EC0)
{
Printf ("-----> EC: _Q45")
Store (0, LIDS)
LIDS = 0
Notify (LID, 0x80)
Printf ("<----- EC: _Q45")
@ -175,7 +175,7 @@ Device (EC0)
{
Printf ("-----> EC: _Q46")
Store (1, LIDS)
LIDS = 1
Notify (LID, 0x80)
Printf ("<----- EC: _Q46")