aboutsummaryrefslogtreecommitdiff
path: root/src/ec/quanta
diff options
context:
space:
mode:
authorFelix Singer <felixsinger@posteo.net>2022-12-12 04:56:53 +0100
committerFelix Singer <felixsinger@posteo.net>2022-12-14 00:48:46 +0000
commit612801d0f88bd8ca12fbca372af1348ce1f297c4 (patch)
tree368dceec6e50a32fd1978bb8219c71e713248fbd /src/ec/quanta
parentff6b3af113f84a1957dcdf8a8179a751ce08becf (diff)
ec/quanta/acpi: Replace Store(a,b) with ASL 2.0 syntax
Replace `Store (a, b)` with `b = a`. Change-Id: I00a6ece73048209861221cba5f2c7381adfa54b9 Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/70639 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Diffstat (limited to 'src/ec/quanta')
-rw-r--r--src/ec/quanta/ene_kb3940q/acpi/ac.asl2
-rw-r--r--src/ec/quanta/ene_kb3940q/acpi/ec.asl24
-rw-r--r--src/ec/quanta/it8518/acpi/ac.asl2
-rw-r--r--src/ec/quanta/it8518/acpi/battery.asl68
-rw-r--r--src/ec/quanta/it8518/acpi/ec.asl18
5 files changed, 57 insertions, 57 deletions
diff --git a/src/ec/quanta/ene_kb3940q/acpi/ac.asl b/src/ec/quanta/ene_kb3940q/acpi/ac.asl
index b086bf5cd2..cc14b33add 100644
--- a/src/ec/quanta/ene_kb3940q/acpi/ac.asl
+++ b/src/ec/quanta/ene_kb3940q/acpi/ac.asl
@@ -9,7 +9,7 @@ Device (AC)
Method (_PSR)
{
- Store(ADPT, Local0)
+ Local0 = ADPT
Return(Local0)
}
diff --git a/src/ec/quanta/ene_kb3940q/acpi/ec.asl b/src/ec/quanta/ene_kb3940q/acpi/ec.asl
index 9294e1bbba..9d38bb6461 100644
--- a/src/ec/quanta/ene_kb3940q/acpi/ec.asl
+++ b/src/ec/quanta/ene_kb3940q/acpi/ec.asl
@@ -122,23 +122,23 @@ Device (EC0)
Method (_REG, 2, NotSerialized)
{
// Initialize AC power state
- Store (ADPT, \PWRS)
+ \PWRS = ADPT
// Initialize LID switch state
- Store (LIDF, \LIDS)
+ \LIDS = LIDF
// Force a read of CPU temperature
- Store (CTMP, Local0)
+ Local0 = CTMP
// Use Local0 to avoid iasl warning: Method Local is set but never used
And(Local0, Ones, Local0)
// Find and program number of P-States
- Store (SizeOf (\_SB.CP00._PSS), MPST)
+ MPST = SizeOf (\_SB.CP00._PSS)
Printf ("Programming number of P-states: %o", MPST)
// Find and program the current P-State
- Store(\_SB.CP00._PPC, NPST)
+ NPST = \_SB.CP00._PPC
Printf ("Programming Current P-state: %o", NPST)
}
@@ -176,7 +176,7 @@ Device (EC0)
{
Printf ("Pstate Event 0x0E")
- Store(\_SB.CP00._PPC, Local0)
+ Local0 = \_SB.CP00._PPC
Local1 = PPCM - 1
If(Local0 < Local1) {
@@ -184,28 +184,28 @@ Device (EC0)
\PPCN ()
}
- Store(Local0, NPST)
+ NPST = Local0
}
// Pstate Up
Method (_Q0F)
{
Printf ("Pstate Event 0x0F")
- Store(\_SB.CP00._PPC, Local0)
+ Local0 = \_SB.CP00._PPC
If(Local0) {
Local0--
\PPCN ()
}
- Store(Local0, NPST)
+ NPST = Local0
}
// AC Power Connected
Method (_Q10, 0, NotSerialized)
{
Printf ("AC Insertion Event 0x10")
- Store (One, \PWRS)
+ \PWRS = One
Notify (AC, 0x80)
Notify (BATX, 0x80)
\PNOT ()
@@ -215,7 +215,7 @@ Device (EC0)
Method (_Q11, 0, NotSerialized)
{
Printf ("AC Detach Event 0x11")
- Store (Zero, \PWRS)
+ \PWRS = Zero
Notify (AC, 0x80)
Notify (BATX, 0x80)
\PNOT ()
@@ -255,7 +255,7 @@ Device (EC0)
{
Printf ("Lid Switch Event 0x06")
sleep(20)
- Store (LIDF, \LIDS)
+ \LIDS = LIDF
Notify (\_SB.LID0, 0x80)
}
diff --git a/src/ec/quanta/it8518/acpi/ac.asl b/src/ec/quanta/it8518/acpi/ac.asl
index 4da27e0f15..f88baef157 100644
--- a/src/ec/quanta/it8518/acpi/ac.asl
+++ b/src/ec/quanta/it8518/acpi/ac.asl
@@ -9,7 +9,7 @@ Device (AC)
Method (_PSR)
{
- Store(ACPW, Local0)
+ Local0 = ACPW
Return(Local0)
}
diff --git a/src/ec/quanta/it8518/acpi/battery.asl b/src/ec/quanta/it8518/acpi/battery.asl
index 67843fd3e5..7a3f77467a 100644
--- a/src/ec/quanta/it8518/acpi/battery.asl
+++ b/src/ec/quanta/it8518/acpi/battery.asl
@@ -49,20 +49,20 @@ Device (BATX)
// Method to enable full battery workaround
Method (BFWE)
{
- Store (One, BFWK)
+ BFWK = One
}
// Method to disable full battery workaround
Method (BFWD)
{
- Store (Zero, BFWK)
+ BFWK = Zero
}
// Method to wait for EC to be ready after changing the Battery Info ID
// Selector
Method (WAEC)
{
- Store (20, Local0) // Timeout 100 msec
+ Local0 = 20 // Timeout 100 msec
While (HSID == 0)
{
// EC Is not ready
@@ -78,7 +78,7 @@ Device (BATX)
// Battery Slot Status
Method (_STA, 0, Serialized)
{
- Store (MBTS, BXST)
+ BXST = MBTS
If (BXST)
{
// Battery is present
@@ -97,7 +97,7 @@ Device (BATX)
//
// Information ID 1 -
//
- Store (One, HIID)
+ HIID = One
WAEC ()
//
@@ -105,13 +105,13 @@ Device (BATX)
// SMART battery : 1 - 10mWh : 0 - mAh
// ACPI spec : 0 - mWh : 1 - mAh
//
- Store(SBCM, Local7)
+ Local7 = SBCM
XOr (Local7, One, PBIF[0])
//
// Information ID 0 -
//
- Store (Zero, HIID)
+ HIID = Zero
WAEC ()
//
@@ -123,13 +123,13 @@ Device (BATX)
}
Else
{
- Store (SBFC, PBIF[2])
+ PBIF[2] = SBFC
}
//
// Information ID 2 -
//
- Store (2, HIID)
+ HIID = 2
WAEC ()
//
@@ -141,9 +141,9 @@ Device (BATX)
}
Else
{
- Store (SBDC, Local0)
+ Local0 = SBDC
}
- Store (Local0, PBIF[1])
+ PBIF[1] = Local0
//
// Design capacity of High (5%)
@@ -155,45 +155,45 @@ Device (BATX)
//
// Design voltage
//
- Store (SBDV, PBIF[4])
+ PBIF[4] = SBDV
//
// Serial Number
//
- Store (ToHexString (SBSN), PBIF[10])
+ PBIF[10] = ToHexString (SBSN)
//
// Information ID 4 -
//
- Store (4, HIID)
+ HIID = 4
WAEC ()
//
// Battery Type - Device Chemistry
//
- Store (ToString (Concatenate(SBCH, 0x00)), PBIF[11])
+ PBIF[11] = ToString (Concatenate(SBCH, 0x00))
//
// Information ID 5 -
//
- Store (5, HIID)
+ HIID = 5
WAEC ()
//
// OEM Information - Manufacturer Name
//
- Store (ToString (Concatenate(SBMN, 0x00)), PBIF[12])
+ PBIF[12] = ToString (Concatenate(SBMN, 0x00))
//
// Information ID 6 -
//
- Store (6, HIID)
+ HIID = 6
WAEC ()
//
// Model Number - Device Name
//
- Store (ToString (Concatenate(SBDN, 0x00)), PBIF[9])
+ PBIF[9] = ToString (Concatenate(SBDN, 0x00))
Return (PBIF)
}
@@ -218,17 +218,17 @@ Device (BATX)
// Get battery state from EC
If (And (HB0S, 0x20))
{
- Store (2, Local0)
+ Local0 = 2
}
Else
{
if (And (HB0S, 0x40))
{
- Store (One, Local0)
+ Local0 = One
}
Else
{
- Store (Zero, Local0)
+ Local0 = Zero
}
}
@@ -238,7 +238,7 @@ Device (BATX)
Or (Local0, 4, Local0)
}
- Store (Zero, Local1)
+ Local1 = Zero
// Check if AC is present
If (ACPW)
@@ -249,18 +249,18 @@ Device (BATX)
Else
{
// Always discharging when on battery power
- Store (One, Local1)
+ Local1 = One
}
// Flag if the battery level is critical
And (Local0, 0x04, Local4)
Or (Local1, Local4, Local1)
- Store (Local1, PBST[0])
+ PBST[0] = Local1
//
// 1: BATTERY PRESENT RATE/CURRENT
//
- Store (ECAC, Local1)
+ Local1 = ECAC
If (Local1 >= 0x8000)
{
If (And (Local0, 1))
@@ -270,7 +270,7 @@ Device (BATX)
Else
{
// Error
- Store (Zero, Local1)
+ Local1 = Zero
}
}
Else
@@ -278,7 +278,7 @@ Device (BATX)
If (!(AND (Local0, 2)))
{
// Battery is not charging
- Store (Zero, Local1)
+ Local1 = Zero
}
}
@@ -289,7 +289,7 @@ Device (BATX)
Local1 *= ECVO
Local1 /= 1000
}
- Store (Local1, PBST[1])
+ PBST[1] = Local1
//
// 2: BATTERY REMAINING CAPACITY
@@ -303,7 +303,7 @@ Device (BATX)
}
Else
{
- Store (ECRC, Local1)
+ Local1 = ECRC
}
If (BFWK && ACPW && !Local0)
@@ -313,21 +313,21 @@ Device (BATX)
// to report same capacity as last full charge.
// https://bugzilla.kernel.org/show_bug.cgi?id=12632
// TODO: Is SBRS the "battery gas gauge"?
- Store (SBRS, Local2)
+ Local2 = SBRS
// See if within ~3% of full
ShiftRight (Local2, 5, Local3)
If (Local1 > Local2 - Local3 && Local1 < Local2 + Local3)
{
- Store (Local2, Local1)
+ Local1 = Local2
}
}
- Store (Local1, PBST[2])
+ PBST[2] = Local1
//
// 3: BATTERY PRESENT VOLTAGE
//
- Store (ECVO, PBST[3])
+ PBST[3] = ECVO
Return (PBST)
}
diff --git a/src/ec/quanta/it8518/acpi/ec.asl b/src/ec/quanta/it8518/acpi/ec.asl
index 3d1e2442bd..38c579899f 100644
--- a/src/ec/quanta/it8518/acpi/ec.asl
+++ b/src/ec/quanta/it8518/acpi/ec.asl
@@ -544,17 +544,17 @@ Device (EC0)
Method (_REG, 2, NotSerialized)
{
// Initialize AC power state
- Store (ACPW, \PWRS)
+ \PWRS = ACPW
// Initialize LID switch state
- Store (NOT(HPLD), \LIDS)
+ \LIDS = NOT(HPLD)
// Enable OS control of fan speed
- // TODO Store (One, FCOS)
+ // TODO FCOS = One
// Force a read of CPU temperature
// TODO Which temperature corresponds to the CPU?
- Store (TMP0, Local0)
+ Local0 = TMP0
/* So that we don't get a warning that Local0 is unused. */
Local0++
}
@@ -593,7 +593,7 @@ Device (EC0)
// AC Power Connected
Method (_Q26, 0, NotSerialized)
{
- Store (One, \PWRS)
+ \PWRS = One
Notify (AC, 0x80)
Notify (BATX, 0x80)
\PNOT ()
@@ -602,7 +602,7 @@ Device (EC0)
// AC Power Removed
Method (_Q27, 0, NotSerialized)
{
- Store (Zero, \PWRS)
+ \PWRS = Zero
Notify (AC, 0x80)
\PNOT ()
}
@@ -610,14 +610,14 @@ Device (EC0)
// LID Open
Method (_Q2A)
{
- Store (One, \LIDS)
+ \LIDS = One
Notify (\_SB.LID0, 0x80)
}
// LID Close (Suspend Trigger)
Method (_Q2B)
{
- Store (Zero, \LIDS)
+ \LIDS = Zero
Notify (\_SB.LID0, 0x80)
}
@@ -640,7 +640,7 @@ Device (EC0)
{
IF (DCWL) //if Wlan exist
{
- //TODO Store (WLAT, LANE)
+ //TODO LANE = WLAT
}
}