summaryrefslogtreecommitdiff
path: root/src/soc
diff options
context:
space:
mode:
authorVarshit B Pandya <varshit.b.pandya@intel.com>2022-02-25 16:09:37 +0530
committerFelix Held <felix-coreboot@felixheld.de>2022-06-15 18:05:12 +0000
commite3816794737f2eef53843669973018de972afb98 (patch)
treef684141c387f43ffb4e740e84ced1f71862e67c4 /src/soc
parentef51b6d74285aa174e3898b4de7ce28048ebabdb (diff)
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 <soc/intel/common/acpi/acpi_debug.asl> 3. Add APRT function in any asl file. Signed-off-by: Varshit B Pandya <varshit.b.pandya@intel.com> Change-Id: I40c676fd0bbd529bcbded18dd248b918f47324d9 Reviewed-on: https://review.coreboot.org/c/coreboot/+/62367 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Subrata Banik <subratabanik@google.com> Reviewed-by: Maulik V Vaghela <maulik.v.vaghela@intel.com>
Diffstat (limited to 'src/soc')
-rw-r--r--src/soc/intel/common/acpi/acpi_debug.asl62
1 files changed, 31 insertions, 31 deletions
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