diff options
author | Felix Singer <felixsinger@posteo.net> | 2022-12-12 04:54:46 +0100 |
---|---|---|
committer | Felix Singer <felixsinger@posteo.net> | 2022-12-14 00:48:30 +0000 |
commit | ff6b3af113f84a1957dcdf8a8179a751ce08becf (patch) | |
tree | b11f64086861caf09ab2d0c283cac3396b0c62f9 | |
parent | f45a6c2a502a4c815444e1c5f0a9c54783442c89 (diff) |
ec/google/chromeec/acpi: Replace Store(a,b) with ASL 2.0 syntax
Replace `Store (a, b)` with `b = a`.
Change-Id: I2cdb1c9ae3a33bfc72767ff60d8948054d4e151a
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70638
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
-rw-r--r-- | src/ec/google/chromeec/acpi/battery.asl | 78 | ||||
-rw-r--r-- | src/ec/google/chromeec/acpi/ec.asl | 38 | ||||
-rw-r--r-- | src/ec/google/chromeec/acpi/keyboard_backlight.asl | 2 |
3 files changed, 59 insertions, 59 deletions
diff --git a/src/ec/google/chromeec/acpi/battery.asl b/src/ec/google/chromeec/acpi/battery.asl index 702fbb1112..0e48cac84a 100644 --- a/src/ec/google/chromeec/acpi/battery.asl +++ b/src/ec/google/chromeec/acpi/battery.asl @@ -17,8 +17,8 @@ Method (BTSW, 1) If (Arg0 >= BTCN) { Return (One) } - Store (Arg0, \_SB.PCI0.LPCB.EC0.BTID) - Store (5, Local0) // Timeout 5 msec + \_SB.PCI0.LPCB.EC0.BTID = Arg0 + Local0 = 5 // Timeout 5 msec While (BTIX != Arg0) { Sleep (1) @@ -45,9 +45,9 @@ Method (BSTA, 1, Serialized) } If (And(Not(BTSW (Arg0)), BTEX)) { - Store (0x1F, Local0) + Local0 = 0x1F } Else { - Store (0x0F, Local0) + Local0 = 0x0F } Release (^BATM) @@ -68,27 +68,27 @@ Method (BBIF, 2, Serialized) Return (Arg1) } // Last Full Charge Capacity - Store (BTDF, Arg1[2]) + Arg1[2] = BTDF // Design Voltage - Store (BTDV, Arg1[4]) + Arg1[4] = BTDV // Design Capacity - Store (BTDA, Local0) - Store (Local0, Arg1[1]) + Local0 = BTDA + Arg1[1] = Local0 // Design Capacity of Warning Local2 = Local0 * DWRN / 100 - Store (Local2, Arg1[5]) + Arg1[5] = Local2 // Design Capacity of Low Local2 = Local0 * DLOW / 100 - Store (Local2, Arg1[6]) + Arg1[6] = Local2 // Get battery info from mainboard - Store (ToString(Concatenate(BMOD, 0x00)), Arg1[9]) - Store (ToString(Concatenate(BSER, 0x00)), Arg1[10]) - Store (ToString(Concatenate(BMFG, 0x00)), Arg1[12]) + Arg1[9] = ToString(Concatenate(BMOD, 0x00)) + Arg1[10] = ToString(Concatenate(BSER, 0x00)) + Arg1[12] = ToString(Concatenate(BMFG, 0x00)) Release (^BATM) Return (Arg1) @@ -108,30 +108,30 @@ Method (BBIX, 2, Serialized) Return (Arg1) } // Last Full Charge Capacity - Store (BTDF, Arg1[3]) + Arg1[3] = BTDF // Design Voltage - Store (BTDV, Arg1[5]) + Arg1[5] = BTDV // Design Capacity - Store (BTDA, Local0) - Store (Local0, Arg1[2]) + Local0 = BTDA + Arg1[2] = Local0 // Design Capacity of Warning Local2 = Local0 * DWRN / 100 - Store (Local2, Arg1[6]) + Arg1[6] = Local2 // Design Capacity of Low Local2 = Local0 * DLOW / 100 - Store (Local2, Arg1[7]) + Arg1[7] = Local2 // Cycle Count - Store (BTCC, Arg1[8]) + Arg1[8] = BTCC // Get battery info from mainboard - Store (ToString(Concatenate(BMOD, 0x00)), Arg1[16]) - Store (ToString(Concatenate(BSER, 0x00)), Arg1[17]) - Store (ToString(Concatenate(BMFG, 0x00)), Arg1[19]) + Arg1[16] = ToString(Concatenate(BMOD, 0x00)) + Arg1[17] = ToString(Concatenate(BSER, 0x00)) + Arg1[19] = ToString(Concatenate(BMFG, 0x00)) Release (^BATM) Return (Arg1) @@ -159,29 +159,29 @@ Method (BBST, 4, Serialized) // bit 1 = charging // bit 2 = critical level // - Store (Zero, Local1) + Local1 = Zero // Check if AC is present If (ACEX) { If (BFCG) { - Store (0x02, Local1) + Local1 = 0x02 } ElseIf (BFDC) { - Store (0x01, Local1) + Local1 = 0x01 } } Else { // Always discharging when on battery power - Store (0x01, Local1) + Local1 = 0x01 } // Check for critical battery level If (BFCR) { Or (Local1, 0x04, Local1) } - Store (Local1, Arg1[0]) + Arg1[0] = Local1 // Notify if battery state has changed since last time If (Local1 != DeRefOf (Arg2)) { - Store (Local1, Arg2) + Arg2 = Local1 If (Arg0 == 0) { Notify (BAT0, 0x80) } @@ -195,32 +195,32 @@ Method (BBST, 4, Serialized) // // 1: BATTERY PRESENT RATE // - Store (BTPR, Arg1[1]) + Arg1[1] = BTPR // // 2: BATTERY REMAINING CAPACITY // - Store (BTRA, Local1) + Local1 = BTRA If (Arg3 && ACEX && !(BFDC && BFCG)) { // On AC power and battery is neither charging // nor discharging. Linux expects a full battery // to report same capacity as last full charge. // https://bugzilla.kernel.org/show_bug.cgi?id=12632 - Store (BTDF, Local2) + Local2 = BTDF // See if within ~6% of full ShiftRight (Local2, 4, Local3) If (Local1 > Local2 - Local3 && Local1 < Local2 + Local3) { - Store (Local2, Local1) + Local1 = Local2 } } - Store (Local1, Arg1[2]) + Arg1[2] = Local1 // // 3: BATTERY PRESENT VOLTAGE // - Store (BTVO, Arg1[3]) + Arg1[3] = BTVO Release (^BATM) Return (Arg1) @@ -285,13 +285,13 @@ Device (BAT0) // 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 (_STA, 0, Serialized) @@ -375,13 +375,13 @@ Device (BAT1) // 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 (_STA, 0, Serialized) diff --git a/src/ec/google/chromeec/acpi/ec.asl b/src/ec/google/chromeec/acpi/ec.asl index 7c252e6c81..8b0948df47 100644 --- a/src/ec/google/chromeec/acpi/ec.asl +++ b/src/ec/google/chromeec/acpi/ec.asl @@ -167,7 +167,7 @@ Device (EC0) Method (_REG, 2, NotSerialized) { // Initialize AC power state - Store (ACEX, \PWRS) + \PWRS = ACEX /* * Call PNOT (Platform Notify) to inform platform code * about the current AC/battery state. This handles all cases, @@ -178,7 +178,7 @@ Device (EC0) \PNOT () // Initialize LID switch state - Store (LIDS, \LIDS) + \LIDS = LIDS #if CONFIG(SOC_AMD_COMMON_BLOCK_ACPI_DPTC) /* @@ -194,7 +194,7 @@ Device (EC0) /* Read requested temperature and check against EC error values */ Method (TSRD, 1, Serialized) { - Store (\_SB.PCI0.LPCB.EC0.TINS (Arg0), Local0) + Local0 = \_SB.PCI0.LPCB.EC0.TINS (Arg0) /* Check for sensor not calibrated */ If (Local0 == \_SB.PCI0.LPCB.EC0.TNCA) { @@ -234,7 +234,7 @@ Device (EC0) \_SB.DPTC() } #endif - Store (LIDS, \LIDS) + \LIDS = LIDS #ifdef EC_ENABLE_LID_SWITCH Notify (LID0, 0x80) #endif @@ -249,7 +249,7 @@ Device (EC0) \_SB.DPTC() } #endif - Store (LIDS, \LIDS) + \LIDS = LIDS Notify (CREC, 0x2) #ifdef EC_ENABLE_LID_SWITCH Notify (LID0, 0x80) @@ -266,7 +266,7 @@ Device (EC0) Method (_Q04, 0, NotSerialized) { Printf ("EC: AC CONNECTED") - Store (ACEX, \PWRS) + \PWRS = ACEX Notify (AC, 0x80) #ifdef DPTF_ENABLE_CHARGER If (CondRefOf (\_SB.DPTF.TCHG)) { @@ -286,7 +286,7 @@ Device (EC0) Method (_Q05, 0, NotSerialized) { Printf ("EC: AC DISCONNECTED") - Store (ACEX, \PWRS) + \PWRS = ACEX Notify (AC, 0x80) #ifdef DPTF_ENABLE_CHARGER If (CondRefOf (\_SB.DPTF.TCHG)) { @@ -481,7 +481,7 @@ Device (EC0) } /* Set sensor ID */ - Store (ToInteger (Arg0), ^PATI) + ^PATI = ToInteger (Arg0) /* Temperature is passed in 1/10 Kelvin */ Local1 = ToInteger (Arg1) / 10 @@ -490,7 +490,7 @@ Device (EC0) ^PATT = Local1 - ^TOFS /* Set commit value with SELECT=0 and ENABLE=1 */ - Store (0x02, ^PATC) + ^PATC = 0x02 Release (^PATM) Return (1) @@ -508,7 +508,7 @@ Device (EC0) } /* Set sensor ID */ - Store (ToInteger (Arg0), ^PATI) + ^PATI = ToInteger (Arg0) /* Temperature is passed in 1/10 Kelvin */ Local1 = ToInteger (Arg1) / 10 @@ -517,7 +517,7 @@ Device (EC0) ^PATT = Local1 - ^TOFS /* Set commit value with SELECT=1 and ENABLE=1 */ - Store (0x03, ^PATC) + ^PATC = 0x03 Release (^PATM) Return (1) @@ -532,14 +532,14 @@ Device (EC0) Return (0) } - Store (ToInteger (Arg0), ^PATI) - Store (0x00, ^PATT) + ^PATI = ToInteger (Arg0) + ^PATT = 0x00 /* Disable PAT0 */ - Store (0x00, ^PATC) + ^PATC = 0x00 /* Disable PAT1 */ - Store (0x01, ^PATC) + ^PATC = 0x01 Release (^PATM) Return (1) @@ -558,7 +558,7 @@ Device (EC0) #endif If (!Acquire (^PATM, 1000)) { /* Read sensor ID for event */ - Store (^PATI, Local0) + Local0 = ^PATI /* When sensor ID returns 0xFF then no more events */ While (Local0 != EC_TEMP_SENSOR_NOT_PRESENT) @@ -568,7 +568,7 @@ Device (EC0) #endif /* Keep reaading sensor ID for event */ - Store (^PATI, Local0) + Local0 = ^PATI } Release (^PATM) @@ -581,7 +581,7 @@ Device (EC0) */ Method (CHGS, 1, Serialized) { - Store (ToInteger (Arg0), ^CHGL) + ^CHGL = ToInteger (Arg0) } /* @@ -589,7 +589,7 @@ Device (EC0) */ Method (CHGD, 0, Serialized) { - Store (0xFF, ^CHGL) + ^CHGL = 0xFF } /* Read current Tablet mode */ diff --git a/src/ec/google/chromeec/acpi/keyboard_backlight.asl b/src/ec/google/chromeec/acpi/keyboard_backlight.asl index 4c306d50c3..87be075db0 100644 --- a/src/ec/google/chromeec/acpi/keyboard_backlight.asl +++ b/src/ec/google/chromeec/acpi/keyboard_backlight.asl @@ -43,7 +43,7 @@ Scope (\_SB) /* Write new backlight value */ Method (KBCM, 1, NotSerialized) { - Store (Arg0, \_SB.PCI0.LPCB.EC0.KBLV) + \_SB.PCI0.LPCB.EC0.KBLV = Arg0 } } } |