ec/acpi: Convert 'ec.asl' to ASL 2.0 syntax
Change-Id: Ifd85d2eabbda4e25406f20391489c0e7ad314348 Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/46095 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
This commit is contained in:
parent
b06dea9e90
commit
fafd512842
|
@ -45,8 +45,8 @@ Field(ERDT, ByteAcc, NoLock, Preserve) { EC_DATA, 8 }
|
||||||
*/
|
*/
|
||||||
Method (WAIT_EC_SC, 2)
|
Method (WAIT_EC_SC, 2)
|
||||||
{
|
{
|
||||||
Store (0x7ff, Local0) /* Timeout */
|
Local0 = 0x7ff /* Timeout */
|
||||||
While (LAnd (LNotEqual (And (EC_SC, Arg0), Arg1), Decrement (Local0))) {
|
While (((EC_SC & Arg0) != Arg1) && Local0--) {
|
||||||
Stall (10)
|
Stall (10)
|
||||||
}
|
}
|
||||||
If (Local0) {
|
If (Local0) {
|
||||||
|
@ -66,8 +66,8 @@ Method (WAIT_EC_SC, 2)
|
||||||
*/
|
*/
|
||||||
Method (SEND_EC_COMMAND, 1)
|
Method (SEND_EC_COMMAND, 1)
|
||||||
{
|
{
|
||||||
Store (WAIT_EC_SC (EC_IBF, 0), Local0)
|
Local0 = WAIT_EC_SC (EC_IBF, 0)
|
||||||
If (LNot (Local0)) {
|
If (!Local0) {
|
||||||
Store (Arg0, EC_SC)
|
Store (Arg0, EC_SC)
|
||||||
}
|
}
|
||||||
Return (Local0)
|
Return (Local0)
|
||||||
|
@ -83,9 +83,9 @@ Method (SEND_EC_COMMAND, 1)
|
||||||
*/
|
*/
|
||||||
Method (SEND_EC_DATA, 1)
|
Method (SEND_EC_DATA, 1)
|
||||||
{
|
{
|
||||||
Store (WAIT_EC_SC (EC_IBF, 0), Local0)
|
Local0 = WAIT_EC_SC (EC_IBF, 0)
|
||||||
If (LNot (Local0)) {
|
If (!Local0) {
|
||||||
Store (Arg0, EC_DATA)
|
EC_DATA = Arg0
|
||||||
}
|
}
|
||||||
Return (Local0)
|
Return (Local0)
|
||||||
}
|
}
|
||||||
|
@ -100,8 +100,8 @@ Method (SEND_EC_DATA, 1)
|
||||||
*/
|
*/
|
||||||
Method (RECV_EC_DATA)
|
Method (RECV_EC_DATA)
|
||||||
{
|
{
|
||||||
Store (WAIT_EC_SC (EC_OBF, EC_OBF), Local0)
|
Local0 = WAIT_EC_SC (EC_OBF, EC_OBF)
|
||||||
If (LNot (Local0)) {
|
If (!Local0) {
|
||||||
Return (EC_DATA)
|
Return (EC_DATA)
|
||||||
} Else {
|
} Else {
|
||||||
Return (Local0)
|
Return (Local0)
|
||||||
|
@ -117,12 +117,12 @@ Method (RECV_EC_DATA)
|
||||||
Method (EC_READ, 1)
|
Method (EC_READ, 1)
|
||||||
{
|
{
|
||||||
Acquire (EC_MUTEX, 0xffff)
|
Acquire (EC_MUTEX, 0xffff)
|
||||||
Store (SEND_EC_COMMAND (EC_READ_CMD), Local0)
|
Local0 = SEND_EC_COMMAND (EC_READ_CMD)
|
||||||
If (LNot (Local0)) {
|
If (!Local0) {
|
||||||
Store (SEND_EC_DATA (Arg0), Local0)
|
Local0 = SEND_EC_DATA (Arg0)
|
||||||
}
|
}
|
||||||
If (LNot (Local0)) {
|
If (!Local0) {
|
||||||
Store (RECV_EC_DATA (), Local0)
|
Local0 = RECV_EC_DATA ()
|
||||||
}
|
}
|
||||||
Release (EC_MUTEX)
|
Release (EC_MUTEX)
|
||||||
|
|
||||||
|
@ -139,12 +139,12 @@ Method (EC_READ, 1)
|
||||||
Method (EC_WRITE, 2)
|
Method (EC_WRITE, 2)
|
||||||
{
|
{
|
||||||
Acquire (EC_MUTEX, 0xffff)
|
Acquire (EC_MUTEX, 0xffff)
|
||||||
Store (SEND_EC_COMMAND (EC_WRITE_CMD), Local0)
|
Local0 = SEND_EC_COMMAND (EC_WRITE_CMD)
|
||||||
If (LNot (Local0)) {
|
If (!Local0) {
|
||||||
Store (SEND_EC_DATA (Arg0), Local0)
|
Local0 = SEND_EC_DATA (Arg0)
|
||||||
}
|
}
|
||||||
If (LNot (Local0)) {
|
If (!Local0) {
|
||||||
Store (SEND_EC_DATA (Arg1), Local0)
|
Local0 = SEND_EC_DATA (Arg1)
|
||||||
}
|
}
|
||||||
Release (EC_MUTEX)
|
Release (EC_MUTEX)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue