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>
This commit is contained in:
parent
ef51b6d742
commit
e381679473
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue