From 03248033e7be6f81ad5b60ed21a60071aee32c67 Mon Sep 17 00:00:00 2001 From: Alexey Buyanov Date: Mon, 1 Jun 2020 21:41:14 -0700 Subject: soc/intel/common: Introduce ASL2.0 syntax Modify soc/intel/common .asl files to comply with ASL2.0 syntax for better code readability and clarity BUG=none BRANCH=none TEST= Deltan coreboot binary remains the same after the changes are applied Signed-off-by: Alexey Buyanov Change-Id: I8f95cf88f499d9f9bdd8c80c95af52f8fd886cdf Reviewed-on: https://review.coreboot.org/c/coreboot/+/42083 Tested-by: build bot (Jenkins) Reviewed-by: Subrata Banik Reviewed-by: V Sowmya Reviewed-by: Angel Pons --- src/soc/intel/common/acpi/acpi_debug.asl | 62 ++++++++++++++++---------------- 1 file changed, 31 insertions(+), 31 deletions(-) (limited to 'src/soc/intel/common/acpi/acpi_debug.asl') diff --git a/src/soc/intel/common/acpi/acpi_debug.asl b/src/soc/intel/common/acpi/acpi_debug.asl index b85bed9b7d..86d207620a 100644 --- a/src/soc/intel/common/acpi/acpi_debug.asl +++ b/src/soc/intel/common/acpi/acpi_debug.asl @@ -8,14 +8,14 @@ Name (UFLG, CONFIG(CONSOLE_SERIAL)) Method (LURT, 1, Serialized) { - If (LEqual(Arg0, 0)) { /* 0 = 0x3f8 */ - Store (0x3f8, Local0) - } ElseIf (LEqual(Arg0, 1)) { /* 1 = 0x2f8 */ - Store (0x2f8, Local0) - } ElseIf (LEqual(Arg0, 2)) { /* 2 = 0x3e8 */ - Store (0x3e8, Local0) - } ElseIf (LEqual(Arg0, 3)) { /* 3 = 0x2e8 */ - Store (0x2e8, Local0) + If (Arg0 == 0) { /* 0 = 0x3f8 */ + Local0 = 0x3f8 + } ElseIf (Arg0 == 1) { /* 1 = 0x2f8 */ + Local0 = 0x2f8 + } ElseIf (Arg0 == 2) { /* 2 = 0x3e8 */ + Local0 = 0x3e8 + } ElseIf (Arg0 == 3) { /* 3 = 0x2e8 */ + Local0 = 0x2e8 } Return (Local0) } @@ -27,22 +27,22 @@ Method (APRT, 1, Serialized) Name(LENG, 0) Name(ADBG, Buffer(256) {0}) - If (LEqual(ObjectType(Arg0), 1)) { /* Integer */ + If (ObjectType(Arg0) == 1) { /* Integer */ ToHexString(Arg0, Local0) - Store(Local0, ADBG) - } ElseIf (LEqual(ObjectType(Arg0), 2)) { /* String */ - Store(Arg0, ADBG) - } ElseIf (LEqual(ObjectType(Arg0), 3)) { /* Buffer */ + ADBG = Local0 + } ElseIf (ObjectType(Arg0) == 2) { /* String */ + ADBG = Arg0 + } ElseIf (ObjectType(Arg0) == 3) { /* Buffer */ ToHexString(Arg0, ADBG) } Else { - Store("This type of object is not supported", ADBG) + ADBG = "This type of object is not supported" } - While (LNotEqual(DeRefOf(Index(ADBG, INDX)), 0)) + While (DeRefOf(ADBG[INDX]) != 0) { - Increment (INDX) + INDX++ } - Store (INDX, LENG) /* Length of the String */ + LENG = INDX /* Length of the String */ #if CONFIG(DRIVERS_UART_8250MEM_32) OperationRegion (UBAR, SystemMemory, @@ -75,33 +75,33 @@ Method (APRT, 1, Serialized) } #endif - If (LEqual(UFLG, 0)) { + If (UFLG == 0) { /* Enable Baud Rate Divisor Latch, Set Word length to 8 bit*/ - Store (0x83, LCR) - Store (0x01, IIR) - Store (0x03, MCR) + LCR = 0x83 + IIR = 0x01 + MCR = 0x03 /* Configure baud rate to 115200 */ - Store (0x01, TDR) - Store (0x00, IER) - Store (0x03, LCR) /* Disable Baud Rate Divisor Latch */ + TDR = 0x01 + IER = 0x00 + LCR = 0x03 /* Disable Baud Rate Divisor Latch */ - Increment (UFLG) + UFLG++ } - Store (0x00, INDX) - While (LLess (INDX, LENG)) + INDX = 0x00 + While (INDX < LENG) { /* Wait for the transmitter t to be ready */ While (1) { - And (LSR, 0x20, OPDT) - If (LNotEqual(OPDT, 0)) + OPDT = LSR & 0x20 + If (OPDT != 0) { Break } } - Store (DeRefOf (Index (ADBG, INDX)), TDR) - Increment(INDX) + TDR = DeRefOf (ADBG[INDX]) + INDX++ } } /* End of APRT */ -- cgit v1.2.3