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,30 +20,6 @@ Method (LURT, 1, Serialized)
|
|||||||
Return (Local0)
|
Return (Local0)
|
||||||
}
|
}
|
||||||
|
|
||||||
Method (APRT, 1, Serialized)
|
|
||||||
{
|
|
||||||
Name(OPDT, 0)
|
|
||||||
Name(INDX, 0)
|
|
||||||
Name(LENG, 0)
|
|
||||||
Name(ADBG, Buffer(256) {0})
|
|
||||||
|
|
||||||
If (ObjectType(Arg0) == 1) { /* Integer */
|
|
||||||
ToHexString(Arg0, Local0)
|
|
||||||
ADBG = Local0
|
|
||||||
} ElseIf (ObjectType(Arg0) == 2) { /* String */
|
|
||||||
ADBG = Arg0
|
|
||||||
} ElseIf (ObjectType(Arg0) == 3) { /* Buffer */
|
|
||||||
ToHexString(Arg0, ADBG)
|
|
||||||
} Else {
|
|
||||||
ADBG = "This type of object is not supported"
|
|
||||||
}
|
|
||||||
|
|
||||||
While (DeRefOf(ADBG[INDX]) != 0)
|
|
||||||
{
|
|
||||||
INDX++
|
|
||||||
}
|
|
||||||
LENG = INDX /* Length of the String */
|
|
||||||
|
|
||||||
#if CONFIG(DRIVERS_UART_8250MEM_32)
|
#if CONFIG(DRIVERS_UART_8250MEM_32)
|
||||||
OperationRegion (UBAR, SystemMemory,
|
OperationRegion (UBAR, SystemMemory,
|
||||||
CONFIG_CONSOLE_UART_BASE_ADDRESS, 24)
|
CONFIG_CONSOLE_UART_BASE_ADDRESS, 24)
|
||||||
@ -75,6 +51,30 @@ Method (APRT, 1, Serialized)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Method (APRT, 1, Serialized)
|
||||||
|
{
|
||||||
|
Name(OPDT, 0)
|
||||||
|
Name(INDX, 0)
|
||||||
|
Name(LENG, 0)
|
||||||
|
Name(ADBG, Buffer(256) {0})
|
||||||
|
|
||||||
|
If (ObjectType(Arg0) == 1) { /* Integer */
|
||||||
|
ToHexString(Arg0, Local0)
|
||||||
|
ADBG = Local0
|
||||||
|
} ElseIf (ObjectType(Arg0) == 2) { /* String */
|
||||||
|
ADBG = Arg0
|
||||||
|
} ElseIf (ObjectType(Arg0) == 3) { /* Buffer */
|
||||||
|
ToHexString(Arg0, ADBG)
|
||||||
|
} Else {
|
||||||
|
ADBG = "This type of object is not supported"
|
||||||
|
}
|
||||||
|
|
||||||
|
While (DeRefOf(ADBG[INDX]) != 0)
|
||||||
|
{
|
||||||
|
INDX++
|
||||||
|
}
|
||||||
|
LENG = INDX /* Length of the String */
|
||||||
|
|
||||||
If (UFLG == 0) {
|
If (UFLG == 0) {
|
||||||
/* Enable Baud Rate Divisor Latch, Set Word length to 8 bit*/
|
/* Enable Baud Rate Divisor Latch, Set Word length to 8 bit*/
|
||||||
LCR = 0x83
|
LCR = 0x83
|
||||||
|
Loading…
x
Reference in New Issue
Block a user