tree: Replace ShiftLeft(a,b,c) with ASL 2.0 syntax

Replace `ShiftLeft (a, b, c)` with `c = a << b`.

Change-Id: Ibd25a05f49f79e80592482a1b0532334f727af58
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70841
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Felix Singer 2022-12-16 02:43:56 +01:00
parent 034920c1d4
commit 3c9291b335
12 changed files with 40 additions and 40 deletions

View File

@ -51,7 +51,7 @@ Device (HKEY)
/* Report event */ /* Report event */
Method (RHK, 1, NotSerialized) { Method (RHK, 1, NotSerialized) {
ShiftLeft (One, Arg0 - 1, Local0) Local0 = One << (Arg0 - 1)
If (EMSK & Local0) { If (EMSK & Local0) {
BTN = Arg0 BTN = Arg0
Notify (HKEY, 0x80) Notify (HKEY, 0x80)
@ -60,7 +60,7 @@ Device (HKEY)
/* Report tablet */ /* Report tablet */
Method (RTAB, 1, NotSerialized) { Method (RTAB, 1, NotSerialized) {
ShiftLeft (One, Arg0 - 1, Local0) Local0 = One << (Arg0 - 1)
If (ETAB & Local0) { If (ETAB & Local0) {
BTAB = Arg0 BTAB = Arg0
Notify (HKEY, 0x80) Notify (HKEY, 0x80)
@ -84,7 +84,7 @@ Device (HKEY)
/* Enable/disable event. */ /* Enable/disable event. */
Method (MHKM, 2, NotSerialized) { Method (MHKM, 2, NotSerialized) {
If (Arg0 <= 0x20) { If (Arg0 <= 0x20) {
ShiftLeft (One, Arg0 - 1, Local0) Local0 = One << (Arg0 - 1)
If (Arg1) If (Arg1)
{ {
Or (DHKN, Local0, DHKN) Or (DHKN, Local0, DHKN)

View File

@ -60,7 +60,7 @@ Device (BAT0)
Method (SWAB, 1, NotSerialized) Method (SWAB, 1, NotSerialized)
{ {
Local0 = Arg0 >> 8 Local0 = Arg0 >> 8
ShiftLeft (Arg0, 8, Local1) Local1 = Arg0 << 8
And (Local1, 0xFF00, Local1) And (Local1, 0xFF00, Local1)
Or (Local0, Local1, Local0) Or (Local0, Local1, Local0)
If (Local0 == 0xFFFF) { If (Local0 == 0xFFFF) {

View File

@ -40,7 +40,7 @@ Device (MBRS)
Local1++ Local1++
If (Local1 > 0x40) If (Local1 > 0x40)
{ {
ShiftLeft (Local1, 0x1A, LELM) LELM = Local1 << 0x1A
} }

View File

@ -43,7 +43,7 @@ Method (_CRS, 0, NotSerialized)
CreateDWordField (PBRS, \_SB.PCI0._Y08._LEN, LENM) CreateDWordField (PBRS, \_SB.PCI0._Y08._LEN, LENM)
And (\_SB.PCI0.TOLM, 0xF800, Local1) And (\_SB.PCI0.TOLM, 0xF800, Local1)
Local1 >>= 4 Local1 >>= 4
ShiftLeft (Local1, 0x14, MEML) MEML = Local1 << 0x14
MEMH = IO_APIC_ADDR - 1 MEMH = IO_APIC_ADDR - 1
LENM = IO_APIC_ADDR - MEML LENM = IO_APIC_ADDR - MEML

View File

@ -76,7 +76,7 @@ Method (_CRS, 0, NotSerialized)
IOM1 = 0x00 IOM1 = 0x00
IOM2 = 0x00 IOM2 = 0x00
Or (\_SB.PCI0.ICH0.SMSC.IOAH, IOM1, IOM1) Or (\_SB.PCI0.ICH0.SMSC.IOAH, IOM1, IOM1)
ShiftLeft (IOM1, 0x08, IOM1) IOM1 <<= 8
Or (\_SB.PCI0.ICH0.SMSC.IOAL, IOM1, IOM1) Or (\_SB.PCI0.ICH0.SMSC.IOAL, IOM1, IOM1)
IOM2 = IOM1 IOM2 = IOM1
If (IOM1 != 0) If (IOM1 != 0)

View File

@ -4,7 +4,7 @@ Scope (_GPE)
{ {
Name (PDET, Zero) Name (PDET, Zero)
Method (PNOT, 2, Serialized) { Method (PNOT, 2, Serialized) {
ShiftLeft (Arg0, Arg1, Local0) Local0 = Arg0 << Arg1
Not( ShiftLeft (One, Arg1), Local1) Not( ShiftLeft (One, Arg1), Local1)
Or (Local0, And (Local1, PDET), PDET) Or (Local0, And (Local1, PDET), PDET)
If (PDET == Zero) { If (PDET == Zero) {
@ -17,7 +17,7 @@ Scope (_GPE)
} }
Method (TINV, 2, Serialized) { Method (TINV, 2, Serialized) {
ShiftLeft (One, Arg1, Local0) Local0 = One << Arg1
If (Arg0 == Zero) { If (Arg0 == Zero) {
Not (Local0, Local0) Not (Local0, Local0)
And (GIV0, Local0, GIV0) And (GIV0, Local0, GIV0)

View File

@ -31,7 +31,7 @@ Device (LNKA)
IRQ0 = Zero IRQ0 = Zero
/* Set the bit from PRTA */ /* Set the bit from PRTA */
ShiftLeft(1, And(PRTA, 0x0f), IRQ0) IRQ0 = 1 << And(PRTA, 0x0f)
Return (RTLA) Return (RTLA)
} }
@ -90,7 +90,7 @@ Device (LNKB)
IRQ0 = Zero IRQ0 = Zero
/* Set the bit from PRTB */ /* Set the bit from PRTB */
ShiftLeft(1, And(PRTB, 0x0f), IRQ0) IRQ0 = 1 << And(PRTB, 0x0f)
Return (RTLB) Return (RTLB)
} }
@ -149,7 +149,7 @@ Device (LNKC)
IRQ0 = Zero IRQ0 = Zero
/* Set the bit from PRTC */ /* Set the bit from PRTC */
ShiftLeft(1, And(PRTC, 0x0f), IRQ0) IRQ0 = 1 << And(PRTC, 0x0f)
Return (RTLC) Return (RTLC)
} }
@ -208,7 +208,7 @@ Device (LNKD)
IRQ0 = Zero IRQ0 = Zero
/* Set the bit from PRTD */ /* Set the bit from PRTD */
ShiftLeft(1, And(PRTD, 0x0f), IRQ0) IRQ0 = 1 << And(PRTD, 0x0f)
Return (RTLD) Return (RTLD)
} }
@ -267,7 +267,7 @@ Device (LNKE)
IRQ0 = Zero IRQ0 = Zero
/* Set the bit from PRTE */ /* Set the bit from PRTE */
ShiftLeft(1, And(PRTE, 0x0f), IRQ0) IRQ0 = 1 << And(PRTE, 0x0f)
Return (RTLE) Return (RTLE)
} }
@ -326,7 +326,7 @@ Device (LNKF)
IRQ0 = Zero IRQ0 = Zero
/* Set the bit from PRTF */ /* Set the bit from PRTF */
ShiftLeft(1, And(PRTF, 0x0f), IRQ0) IRQ0 = 1 << And(PRTF, 0x0f)
Return (RTLF) Return (RTLF)
} }
@ -385,7 +385,7 @@ Device (LNKG)
IRQ0 = Zero IRQ0 = Zero
/* Set the bit from PRTG */ /* Set the bit from PRTG */
ShiftLeft(1, And(PRTG, 0x0f), IRQ0) IRQ0 = 1 << And(PRTG, 0x0f)
Return (RTLG) Return (RTLG)
} }
@ -444,7 +444,7 @@ Device (LNKH)
IRQ0 = Zero IRQ0 = Zero
/* Set the bit from PRTH */ /* Set the bit from PRTH */
ShiftLeft(1, And(PRTH, 0x0f), IRQ0) IRQ0 = 1 << And(PRTH, 0x0f)
Return (RTLH) Return (RTLH)
} }

View File

@ -31,7 +31,7 @@ Device (LNKA)
IRQ0 = Zero IRQ0 = Zero
/* Set the bit from PRTA */ /* Set the bit from PRTA */
ShiftLeft(1, And(PRTA, 0x0f), IRQ0) IRQ0 = 1 << And(PRTA, 0x0f)
Return (RTLA) Return (RTLA)
} }
@ -90,7 +90,7 @@ Device (LNKB)
IRQ0 = Zero IRQ0 = Zero
/* Set the bit from PRTB */ /* Set the bit from PRTB */
ShiftLeft(1, And(PRTB, 0x0f), IRQ0) IRQ0 = 1 << And(PRTB, 0x0f)
Return (RTLB) Return (RTLB)
} }
@ -149,7 +149,7 @@ Device (LNKC)
IRQ0 = Zero IRQ0 = Zero
/* Set the bit from PRTC */ /* Set the bit from PRTC */
ShiftLeft(1, And(PRTC, 0x0f), IRQ0) IRQ0 = 1 << And(PRTC, 0x0f)
Return (RTLC) Return (RTLC)
} }
@ -208,7 +208,7 @@ Device (LNKD)
IRQ0 = Zero IRQ0 = Zero
/* Set the bit from PRTD */ /* Set the bit from PRTD */
ShiftLeft(1, And(PRTD, 0x0f), IRQ0) IRQ0 = 1 << And(PRTD, 0x0f)
Return (RTLD) Return (RTLD)
} }
@ -267,7 +267,7 @@ Device (LNKE)
IRQ0 = Zero IRQ0 = Zero
/* Set the bit from PRTE */ /* Set the bit from PRTE */
ShiftLeft(1, And(PRTE, 0x0f), IRQ0) IRQ0 = 1 << And(PRTE, 0x0f)
Return (RTLE) Return (RTLE)
} }
@ -326,7 +326,7 @@ Device (LNKF)
IRQ0 = Zero IRQ0 = Zero
/* Set the bit from PRTF */ /* Set the bit from PRTF */
ShiftLeft(1, And(PRTF, 0x0f), IRQ0) IRQ0 = 1 << And(PRTF, 0x0f)
Return (RTLF) Return (RTLF)
} }
@ -385,7 +385,7 @@ Device (LNKG)
IRQ0 = Zero IRQ0 = Zero
/* Set the bit from PRTG */ /* Set the bit from PRTG */
ShiftLeft(1, And(PRTG, 0x0f), IRQ0) IRQ0 = 1 << And(PRTG, 0x0f)
Return (RTLG) Return (RTLG)
} }
@ -444,7 +444,7 @@ Device (LNKH)
IRQ0 = Zero IRQ0 = Zero
/* Set the bit from PRTH */ /* Set the bit from PRTH */
ShiftLeft(1, And(PRTH, 0x0f), IRQ0) IRQ0 = 1 << And(PRTH, 0x0f)
Return (RTLH) Return (RTLH)
} }

View File

@ -30,7 +30,7 @@ Device(intx) { \
\ \
Method(_CRS ,0) { \ Method(_CRS ,0) { \
CreateWordField(IRQB, 1, IRQN) \ CreateWordField(IRQB, 1, IRQN) \
ShiftLeft(1, And(pinx, 0x0f), IRQN) \ IRQN = 1 << And(pinx, 0x0f) \
Return(IRQB) \ Return(IRQB) \
} \ } \
\ \

View File

@ -40,7 +40,7 @@ Device(intx) { \
\ \
Method(_CRS ,0) { \ Method(_CRS ,0) { \
CreateWordField(IRQB, 1, IRQN) \ CreateWordField(IRQB, 1, IRQN) \
ShiftLeft(1, And(pinx, 0x0f), IRQN) \ IRQN = 1 << And(pinx, 0x0f) \
Return(IRQB) \ Return(IRQB) \
} \ } \
\ \

View File

@ -108,11 +108,11 @@
#define PNP_READ_IRQ(IRQ_FROM, RESOURCE_TEMPLATE, IRQ_TAG) \ #define PNP_READ_IRQ(IRQ_FROM, RESOURCE_TEMPLATE, IRQ_TAG) \
CreateWordField (RESOURCE_TEMPLATE, IRQ_TAG._INT, IRQ_TAG##W)\ CreateWordField (RESOURCE_TEMPLATE, IRQ_TAG._INT, IRQ_TAG##W)\
ShiftLeft (One, IRQ_FROM, IRQ_TAG##W) IRQ_TAG##W = One << IRQ_FROM
#define PNP_READ_DMA(DMA_FROM, RESOURCE_TEMPLATE, DMA_TAG) \ #define PNP_READ_DMA(DMA_FROM, RESOURCE_TEMPLATE, DMA_TAG) \
CreateByteField (RESOURCE_TEMPLATE, DMA_TAG._DMA, DMA_TAG##W)\ CreateByteField (RESOURCE_TEMPLATE, DMA_TAG._DMA, DMA_TAG##W)\
ShiftLeft (One, DMA_FROM, DMA_TAG##W) DMA_TAG##W = One << DMA_FROM
#define PNP_WRITE_IO(IO_TO, RESOURCE, IO_TAG) \ #define PNP_WRITE_IO(IO_TO, RESOURCE, IO_TAG) \
CreateWordField (RESOURCE, IO_TAG._MIN, IO_TAG##I)\ CreateWordField (RESOURCE, IO_TAG._MIN, IO_TAG##I)\

View File

@ -304,7 +304,7 @@ Device(SIO) {
Local1 = IO1H Local1 = IO1H
Local2 = IO1L Local2 = IO1L
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
ShiftLeft(Local1, 8, Local1) Local1 <<= 8
Or(Local1, Local2, Local1) Or(Local1, Local2, Local1)
If (!Local0) { If (!Local0) {
Return (FDE) Return (FDE)
@ -503,7 +503,7 @@ Device(SIO) {
} }
/* Calculate IRQ bitmap */ /* Calculate IRQ bitmap */
Local0 = One Local0 = One
ShiftLeft (Local0, Local5, IRQW) IRQW = Local0 << Local5
/* Return resource template */ /* Return resource template */
Return (CRS) Return (CRS)
} }
@ -660,7 +660,7 @@ Device(SIO) {
CreateWordField (CRS, IRQX._INT, IRQW) CreateWordField (CRS, IRQX._INT, IRQW)
Local3 = One Local3 = One
ShiftLeft (Local3, Local2, IRQW) IRQW = Local3 << Local2
Return (CRS) Return (CRS)
} }
@ -785,7 +785,7 @@ Device(SIO) {
CreateWordField (CRS, IRQX._INT, IRQW) CreateWordField (CRS, IRQX._INT, IRQW)
Local3 = One Local3 = One
ShiftLeft (Local3, Local2, IRQW) IRQW = Local3 << Local2
Return (CRS) Return (CRS)
} }
@ -910,7 +910,7 @@ Device(SIO) {
CreateWordField (CRS, IRQX._INT, IRQW) CreateWordField (CRS, IRQX._INT, IRQW)
Local3 = One Local3 = One
ShiftLeft (Local3, Local2, IRQW) IRQW = Local3 << Local2
Return (CRS) Return (CRS)
} }
@ -1013,7 +1013,7 @@ Device(SIO) {
CreateWordField (CRS, IRQX._INT, IRQW) CreateWordField (CRS, IRQX._INT, IRQW)
Local3 = One Local3 = One
ShiftLeft (Local3, Local2, IRQW) IRQW = Local3 << Local2
Return (CRS) Return (CRS)
} }
@ -1114,7 +1114,7 @@ Device(SIO) {
CreateWordField (CRS, IRQX._INT, IRQW) CreateWordField (CRS, IRQX._INT, IRQW)
Local5 = One Local5 = One
ShiftLeft (Local5, Local4, IRQW) IRQW = Local5 << Local4
Return (CRS) Return (CRS)
} }
@ -1199,7 +1199,7 @@ Device(SIO) {
CreateWordField (CRS, IRQX._INT, IRQW) CreateWordField (CRS, IRQX._INT, IRQW)
Local5 = One Local5 = One
ShiftLeft (Local5, Local4, IRQW) IRQW = Local5 << Local4
Return (CRS) Return (CRS)
} }
@ -1278,7 +1278,7 @@ Device(SIO) {
If (Local2) { If (Local2) {
CreateWordField (CRS, IRQX._INT, IRQW) CreateWordField (CRS, IRQX._INT, IRQW)
Local3 = One Local3 = One
ShiftLeft (Local3, Local2, IRQW) IRQW = Local3 << Local2
} }
Return (CRS) Return (CRS)
@ -1333,7 +1333,7 @@ Device(SIO) {
If (Local2) { If (Local2) {
CreateWordField (CRS, IRQX._INT, IRQW) CreateWordField (CRS, IRQX._INT, IRQW)
Local3 = One Local3 = One
ShiftLeft (Local3, Local2, IRQW) IRQW = Local3 << Local2
} }
Return (CRS) Return (CRS)
@ -1432,7 +1432,7 @@ Device(SIO) {
If (Local2) { If (Local2) {
CreateWordField (CRS, IRQX._INT, IRQW) CreateWordField (CRS, IRQX._INT, IRQW)
Local3 = One Local3 = One
ShiftLeft (Local3, Local2, IRQW) IRQW = Local3 << Local2
} }
Return (CRS) Return (CRS)
} }