From e3816794737f2eef53843669973018de972afb98 Mon Sep 17 00:00:00 2001 From: Varshit B Pandya Date: Fri, 25 Feb 2022 16:09:37 +0530 Subject: soc/intel/common/acpi: Fix warning in ASL Warnings are treated as errors in build. UBAR is declared inside APRT method which throws warning as follows "Static OperationRegion should be declared outside control method" Move UBAR outside APRT method to fix warning. TEST=build brya with following changes without any warnings 1. Select ACPI_CONSOLE 2. Include 3. Add APRT function in any asl file. Signed-off-by: Varshit B Pandya Change-Id: I40c676fd0bbd529bcbded18dd248b918f47324d9 Reviewed-on: https://review.coreboot.org/c/coreboot/+/62367 Tested-by: build bot (Jenkins) Reviewed-by: Subrata Banik Reviewed-by: Maulik V Vaghela --- src/soc/intel/common/acpi/acpi_debug.asl | 62 ++++++++++++++++---------------- 1 file changed, 31 insertions(+), 31 deletions(-) (limited to 'src/soc/intel/common') diff --git a/src/soc/intel/common/acpi/acpi_debug.asl b/src/soc/intel/common/acpi/acpi_debug.asl index 86d207620a..ecee32c82e 100644 --- a/src/soc/intel/common/acpi/acpi_debug.asl +++ b/src/soc/intel/common/acpi/acpi_debug.asl @@ -20,6 +20,37 @@ Method (LURT, 1, Serialized) Return (Local0) } +#if CONFIG(DRIVERS_UART_8250MEM_32) +OperationRegion (UBAR, SystemMemory, + CONFIG_CONSOLE_UART_BASE_ADDRESS, 24) +Field (UBAR, AnyAcc, NoLock, Preserve) +{ + TDR, 8, /* Transmit Data Register BAR + 0x000 */ + , 24, + IER, 8, /* Interrupt Enable Register BAR + 0x004 */ + , 24, + IIR, 8, /* Interrupt Identification Register BAR + 0x008 */ + , 24, + LCR, 8, /* Line Control Register BAR + 0x00C */ + , 24, + MCR, 8, /* Modem Control Register BAR + 0x010 */ + , 24, + LSR, 8, /* Line Status Register BAR + 0x014 */ + , 24 +} +#else +OperationRegion (UBAR, SystemIO, LURT (CONFIG_UART_FOR_CONSOLE), 6) +Field (UBAR, ByteAcc, NoLock, Preserve) +{ + TDR, 8, /* Transmit Data Register IO Port + 0x0 */ + IER, 8, /* Interrupt Enable Register IO Port + 0x1 */ + IIR, 8, /* Interrupt Identification Register IO Port + 0x2 */ + LCR, 8, /* Line Control Register IO Port + 0x3 */ + MCR, 8, /* Modem Control Register IO Port + 0x4 */ + LSR, 8 /* Line Status Register IO Port + 0x5 */ +} +#endif + Method (APRT, 1, Serialized) { Name(OPDT, 0) @@ -44,37 +75,6 @@ Method (APRT, 1, Serialized) } LENG = INDX /* Length of the String */ -#if CONFIG(DRIVERS_UART_8250MEM_32) - OperationRegion (UBAR, SystemMemory, - CONFIG_CONSOLE_UART_BASE_ADDRESS, 24) - Field (UBAR, AnyAcc, NoLock, Preserve) - { - TDR, 8, /* Transmit Data Register BAR + 0x000 */ - , 24, - IER, 8, /* Interrupt Enable Register BAR + 0x004 */ - , 24, - IIR, 8, /* Interrupt Identification Register BAR + 0x008 */ - , 24, - LCR, 8, /* Line Control Register BAR + 0x00C */ - , 24, - MCR, 8, /* Modem Control Register BAR + 0x010 */ - , 24, - LSR, 8, /* Line Status Register BAR + 0x014 */ - , 24 - } -#else - OperationRegion (UBAR, SystemIO, LURT (CONFIG_UART_FOR_CONSOLE), 6) - Field (UBAR, ByteAcc, NoLock, Preserve) - { - TDR, 8, /* Transmit Data Register IO Port + 0x0 */ - IER, 8, /* Interrupt Enable Register IO Port + 0x1 */ - IIR, 8, /* Interrupt Identification Register IO Port + 0x2 */ - LCR, 8, /* Line Control Register IO Port + 0x3 */ - MCR, 8, /* Modem Control Register IO Port + 0x4 */ - LSR, 8 /* Line Status Register IO Port + 0x5 */ - } -#endif - If (UFLG == 0) { /* Enable Baud Rate Divisor Latch, Set Word length to 8 bit*/ LCR = 0x83 -- cgit v1.2.3