mb/amd/inagua: Convert to ASL 2.0 syntax

Generated 'build/dsdt.dsl' files are identical.

Change-Id: I0ee0d2b83cbfd81fab43eec255bcc214b9543f82
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/46146
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Elyes HAOUAS 2020-10-08 09:03:41 +02:00 committed by Kyösti Mälkki
parent b9c5445638
commit e963532a96
5 changed files with 130 additions and 134 deletions

View File

@ -50,11 +50,11 @@ OperationRegion(ICRG, PCI_Config, 0x40, 0x20) /* ide control registers */
Method(GTTM, 1) /* get total time*/ Method(GTTM, 1) /* get total time*/
{ {
Store(And(Arg0, 0x0F), Local0) /* Recovery Width */ Local0 = Arg0 & 0x0F /* Recovery Width */
Increment(Local0) Local0++
Store(ShiftRight(Arg0, 4), Local1) /* Command Width */ Local1 = Arg0 >> 4 /* Command Width */
Increment(Local1) Local1++
Return(Multiply(30, Add(Local0, Local1))) Return(30 * (Local0 + Local1))
} }
Device(PRID) Device(PRID)
@ -76,30 +76,30 @@ Device(PRID)
CreateDwordField(OTBF, 16, BFFG) /* buffer flags */ CreateDwordField(OTBF, 16, BFFG) /* buffer flags */
/* Just return if the channel is disabled */ /* Just return if the channel is disabled */
If(And(PPCR, 0x01)) { /* primary PIO control */ If (PPCR & 0x01) { /* primary PIO control */
Return(OTBF) Return(OTBF)
} }
/* Always tell them independent timing available and IOChannelReady used on both drives */ /* Always tell them independent timing available and IOChannelReady used on both drives */
Or(BFFG, 0x1A, BFFG) BFFG |= 0x1A
Store(GTTM(PPTM), PSD0) /* save total time of primary PIO master timming to PIO spd0 */ PSD0 = GTTM (PPTM) /* save total time of primary PIO master timing to PIO spd0 */
Store(GTTM(PPTS), PSD1) /* save total time of primary PIO slave Timing to PIO spd1 */ PSD1 = GTTM (PPTS) /* save total time of primary PIO slave Timing to PIO spd1 */
If(And(PDCR, 0x01)) { /* It's under UDMA mode */ If (PDCR & 0x01) { /* It's under UDMA mode */
Or(BFFG, 0x01, BFFG) BFFG |= 0x01
Store(DerefOf(Index(UDTT, PDMM)), DSD0) DSD0 = DerefOf(UDTT [PDMM])
} }
Else { Else {
Store(GTTM(PMTM), DSD0) /* Primary MWDMA Master Timing, DmaSpd0 */ DSD0 = GTTM (PMTM) /* Primary MWDMA Master Timing, DmaSpd0 */
} }
If(And(PDCR, 0x02)) { /* It's under UDMA mode */ If (PDCR & 0x02) { /* It's under UDMA mode */
Or(BFFG, 0x04, BFFG) BFFG |= 0x04
Store(DerefOf(Index(UDTT, PDSM)), DSD1) DSD1 = DerefOf(UDTT [PDSM])
} }
Else { Else {
Store(GTTM(PMTS), DSD1) /* Primary MWDMA Slave Timing, DmaSpd0 */ DSD1 = GTTM (PMTS) /* Primary MWDMA Slave Timing, DmaSpd0 */
} }
Return(OTBF) /* out buffer */ Return(OTBF) /* out buffer */
@ -120,35 +120,35 @@ Device(PRID)
CreateDwordField(INBF, 12, DSD1) /* DMA spd1 */ CreateDwordField(INBF, 12, DSD1) /* DMA spd1 */
CreateDwordField(INBF, 16, BFFG) /*buffer flag */ CreateDwordField(INBF, 16, BFFG) /*buffer flag */
Store(Match(POTT, MLE, PSD0, MTR, 0, 0), Local0) Local0 = Match (POTT, MLE, PSD0, MTR, 0, 0)
Divide(Local0, 5, PPMM,) /* Primary PIO master Mode */ PPMM = Local0 % 5 /* Primary PIO master Mode */
Store(Match(POTT, MLE, PSD1, MTR, 0, 0), Local1) Local1 = Match (POTT, MLE, PSD1, MTR, 0, 0)
Divide(Local1, 5, PPSM,) /* Primary PIO slave Mode */ PPSM = Local1 % 5 /* Primary PIO slave Mode */
Store(DerefOf(Index(PORT, Local0)), PPTM) /* Primary PIO Master Timing */ PPTM = DerefOf(PORT [Local0]) /* Primary PIO Master Timing */
Store(DerefOf(Index(PORT, Local1)), PPTS) /* Primary PIO Slave Timing */ PPTS = DerefOf(PORT [Local1]) /* Primary PIO Slave Timing */
If(And(BFFG, 0x01)) { /* Drive 0 is under UDMA mode */ If (BFFG & 0x01) { /* Drive 0 is under UDMA mode */
Store(Match(UDTT, MLE, DSD0, MTR, 0, 0), Local0) Local0 = Match (UDTT, MLE, DSD0, MTR, 0, 0)
Divide(Local0, 7, PDMM,) PDMM = Local0 % 7
Or(PDCR, 0x01, PDCR) PDCR |= 0x01
} }
Else { Else {
If(LNotEqual(DSD0, 0xFFFFFFFF)) { If (DSD0 != 0xFFFFFFFF) {
Store(Match(MDTT, MLE, DSD0, MTR, 0, 0), Local0) Local0 = Match (MDTT, MLE, DSD0, MTR, 0, 0)
Store(DerefOf(Index(MDRT, Local0)), PMTM) PMTM = DerefOf(MDRT [Local0])
} }
} }
If(And(BFFG, 0x04)) { /* Drive 1 is under UDMA mode */ If (BFFG & 0x04) { /* Drive 1 is under UDMA mode */
Store(Match(UDTT, MLE, DSD1, MTR, 0, 0), Local0) Local0 = Match (UDTT, MLE, DSD1, MTR, 0, 0)
Divide(Local0, 7, PDSM,) PDSM = Local0 % 7
Or(PDCR, 0x02, PDCR) PDCR |= 0x02
} }
Else { Else {
If(LNotEqual(DSD1, 0xFFFFFFFF)) { If (DSD1 != 0xFFFFFFFF) {
Store(Match(MDTT, MLE, DSD1, MTR, 0, 0), Local0) Local0 = Match (MDTT, MLE, DSD1, MTR, 0, 0)
Store(DerefOf(Index(MDRT, Local0)), PMTS) PMTS = DerefOf(MDRT [Local0])
} }
} }
/* Return(INBF) */ /* Return(INBF) */
@ -168,21 +168,19 @@ Device(PRID)
CreateByteField(CMBF, 12, CMDB) CreateByteField(CMBF, 12, CMDB)
CreateByteField(CMBF, 19, CMDC) CreateByteField(CMBF, 19, CMDC)
Store(0xA0, CMDA) CMDA = 0xA0
Store(0xA0, CMDB) CMDB = 0xA0
Store(0xA0, CMDC) CMDC = 0xA0
Or(PPMM, 0x08, POMD) POMD = PPMM | 0x08
If(And(PDCR, 0x01)) { If (PDCR & 0x01) {
Or(PDMM, 0x40, DMMD) DMMD = PDMM | 0x40
} }
Else { Else {
Store(Match Local0 = Match (MDTT, MLE, GTTM(PMTM), MTR, 0, 0)
(MDTT, MLE, GTTM(PMTM), If (Local0 < 3) {
MTR, 0, 0), Local0) DMMD = Local0 | 0x20
If(LLess(Local0, 3)) {
Or(0x20, Local0, DMMD)
} }
} }
Return(CMBF) Return(CMBF)
@ -204,21 +202,19 @@ Device(PRID)
CreateByteField(CMBF, 12, CMDB) CreateByteField(CMBF, 12, CMDB)
CreateByteField(CMBF, 19, CMDC) CreateByteField(CMBF, 19, CMDC)
Store(0xB0, CMDA) CMDA = 0xB0
Store(0xB0, CMDB) CMDB = 0xB0
Store(0xB0, CMDC) CMDC = 0xB0
Or(PPSM, 0x08, POMD) POMD = PPSM | 0x08
If(And(PDCR, 0x02)) { If (PDCR & 0x02) {
Or(PDSM, 0x40, DMMD) DMMD = PDSM | 0x40
} }
Else { Else {
Store(Match Local0 = Match (MDTT, MLE, GTTM(PMTS), MTR, 0, 0)
(MDTT, MLE, GTTM(PMTS), If (Local0 < 3) {
MTR, 0, 0), Local0) DMMD = Local0 | 0x20
If(LLess(Local0, 3)) {
Or(0x20, Local0, DMMD)
} }
} }
Return(CMBF) Return(CMBF)

View File

@ -18,20 +18,20 @@ Name(PICM, One) /* Assume APIC */
Scope(\_SB) { Scope(\_SB) {
Method(OSFL, 0){ Method(OSFL, 0){
if(LNotEqual(OSVR, Ones)) {Return(OSVR)} /* OS version was already detected */ if (OSVR != Ones) {Return (OSVR)} /* OS version was already detected */
if(CondRefOf(\_OSI)) if(CondRefOf(\_OSI))
{ {
Store(1, OSVR) /* Assume some form of XP */ OSVR = 1 /* Assume some form of XP */
if (\_OSI("Windows 2006")) /* Vista */ if (\_OSI("Windows 2006")) /* Vista */
{ {
Store(2, OSVR) OSVR = 2
} }
} else { } else {
If(WCMP(\_OS,"Linux")) { If (WCMP(\_OS,"Linux")) {
Store(3, OSVR) /* Linux */ OSVR = 3 /* Linux */
} Else { } Else {
Store(4, OSVR) /* Gotta be WinCE */ OSVR = 4 /* Gotta be WinCE */
} }
} }
Return(OSVR) Return(OSVR)

View File

@ -35,7 +35,7 @@ Device(PMRY)
Device(PMST) { Device(PMST) {
Name(_ADR, 0) Name(_ADR, 0)
Method(_STA,0) { Method(_STA,0) {
if (LGreater(P0IS,0)) { if (P0IS > 0) {
return (0x0F) /* sata is visible */ return (0x0F) /* sata is visible */
} }
else { else {
@ -48,7 +48,7 @@ Device(PMRY)
{ {
Name(_ADR, 1) Name(_ADR, 1)
Method(_STA,0) { Method(_STA,0) {
if (LGreater(P1IS,0)) { if (P1IS > 0) {
return (0x0F) /* sata is visible */ return (0x0F) /* sata is visible */
} }
else { else {
@ -70,7 +70,7 @@ Device(SEDY)
{ {
Name(_ADR, 0) Name(_ADR, 0)
Method(_STA,0) { Method(_STA,0) {
if (LGreater(P2IS,0)) { if (P2IS > 0) {
return (0x0F) /* sata is visible */ return (0x0F) /* sata is visible */
} }
else { else {
@ -83,7 +83,7 @@ Device(SEDY)
{ {
Name(_ADR, 1) Name(_ADR, 1)
Method(_STA,0) { Method(_STA,0) {
if (LGreater(P3IS,0)) { if (P3IS > 0) {
return (0x0F) /* sata is visible */ return (0x0F) /* sata is visible */
} }
else { else {
@ -97,35 +97,35 @@ Device(SEDY)
Scope(\_GPE) { Scope(\_GPE) {
Method(_L1F,0x0,NotSerialized) { Method(_L1F,0x0,NotSerialized) {
if (\_SB.P0PR) { if (\_SB.P0PR) {
if (LGreater(\_SB.P0IS,0)) { if (\_SB.P0IS > 0) {
sleep(32) sleep(32)
} }
Notify(\_SB.PCI0.STCR.PMRY.PMST, 0x01) /* NOTIFY_DEVICE_CHECK */ Notify(\_SB.PCI0.STCR.PMRY.PMST, 0x01) /* NOTIFY_DEVICE_CHECK */
store(one, \_SB.P0PR) \_SB.P0PR = 1
} }
if (\_SB.P1PR) { if (\_SB.P1PR) {
if (LGreater(\_SB.P1IS,0)) { if (\_SB.P1IS > 0) {
sleep(32) sleep(32)
} }
Notify(\_SB.PCI0.STCR.PMRY.PSLA, 0x01) /* NOTIFY_DEVICE_CHECK */ Notify(\_SB.PCI0.STCR.PMRY.PSLA, 0x01) /* NOTIFY_DEVICE_CHECK */
store(one, \_SB.P1PR) \_SB.P1PR = 1
} }
if (\_SB.P2PR) { if (\_SB.P2PR) {
if (LGreater(\_SB.P2IS,0)) { if (\_SB.P2IS > 0) {
sleep(32) sleep(32)
} }
Notify(\_SB.PCI0.STCR.SEDY.SMST, 0x01) /* NOTIFY_DEVICE_CHECK */ Notify(\_SB.PCI0.STCR.SEDY.SMST, 0x01) /* NOTIFY_DEVICE_CHECK */
store(one, \_SB.P2PR) \_SB.P2PR = 1
} }
if (\_SB.P3PR) { if (\_SB.P3PR) {
if (LGreater(\_SB.P3IS,0)) { if (\_SB.P3IS > 0) {
sleep(32) sleep(32)
} }
Notify(\_SB.PCI0.STCR.SEDY.SSLA, 0x01) /* NOTIFY_DEVICE_CHECK */ Notify(\_SB.PCI0.STCR.SEDY.SSLA, 0x01) /* NOTIFY_DEVICE_CHECK */
store(one, \_SB.P3PR) \_SB.P3PR = 1
} }
} }
} }

View File

@ -26,23 +26,23 @@ Method(\_PTS, 1) {
/* DBGO("\n") */ /* DBGO("\n") */
/* Don't allow PCIRST# to reset USB */ /* Don't allow PCIRST# to reset USB */
if (LEqual(Arg0,3)){ if (Arg0 == 3){
Store(0,URRE) URRE = 0
} }
/* Clear sleep SMI status flag and enable sleep SMI trap. */ /* Clear sleep SMI status flag and enable sleep SMI trap. */
/*Store(One, CSSM) /*CSSM = 1
Store(One, SSEN)*/ SSEN = 1*/
/* On older chips, clear PciExpWakeDisEn */ /* On older chips, clear PciExpWakeDisEn */
/*if (LLessEqual(\_SB.SBRI, 0x13)) { /*if (\_SB.SBRI <= 0x13) {
* Store(0,\_SB.PWDE) * \_SB.PWDE = 0
*} *}
*/ */
/* Clear wake status structure. */ /* Clear wake status structure. */
Store(0, Index(WKST,0)) WKST [0] = 0
Store(0, Index(WKST,1)) WKST [1] = 0
} /* End Method(\_PTS) */ } /* End Method(\_PTS) */
/* /*
@ -67,21 +67,21 @@ Method(\_WAK, 1) {
/* DBGO(" to S0\n") */ /* DBGO(" to S0\n") */
/* Re-enable HPET */ /* Re-enable HPET */
Store(1,HPDE) HPDE = 1
/* Restore PCIRST# so it resets USB */ /* Restore PCIRST# so it resets USB */
if (LEqual(Arg0,3)){ if (Arg0 == 3){
Store(1,URRE) URRE = 1
} }
/* Arbitrarily clear PciExpWakeStatus */ /* Arbitrarily clear PciExpWakeStatus */
Store(PWST, Local1) Local1 = PWST
Store(Local1, PWST) PWST = Local1
/* if (DeRefOf(Index(WKST,0))) { /* if (DeRefOf(WKST [0])) {
* Store(0, Index(WKST,1)) * WKST [1] = 0
* } else { * } else {
* Store(Arg0, Index(WKST,1)) * WKST [1] = Arg0
* } * }
*/ */
Return(WKST) Return(WKST)

View File

@ -14,134 +14,134 @@ Name(UOM9, 6)
Method(UCOC, 0) { Method(UCOC, 0) {
Sleep(20) Sleep(20)
Store(0x13,CMTI) CMTI = 0x13
Store(0,GPSL) GPSL = 0
} }
/* USB Port 0 overcurrent uses Gpm 0 */ /* USB Port 0 overcurrent uses Gpm 0 */
If(LLessEqual(UOM0,9)) { If (UOM0 <= 9) {
Scope (\_GPE) { Scope (\_GPE) {
Method (_L13) { Method (_L13) {
UCOC() UCOC()
if(LEqual(GPB0,PLC0)) { if (GPB0 == PLC0) {
Not(PLC0,PLC0) PLC0 = ~PLC0
Store(PLC0, \_SB.PT0D) \_SB.PT0D = PLC0
} }
} }
} }
} }
/* USB Port 1 overcurrent uses Gpm 1 */ /* USB Port 1 overcurrent uses Gpm 1 */
If (LLessEqual(UOM1,9)) { If (UOM1 <= 9) {
Scope (\_GPE) { Scope (\_GPE) {
Method (_L14) { Method (_L14) {
UCOC() UCOC()
if (LEqual(GPB1,PLC1)) { if (GPB1 == PLC1) {
Not(PLC1,PLC1) PLC1 = ~PLC1
Store(PLC1, \_SB.PT1D) \_SB.PT1D = PLC1
} }
} }
} }
} }
/* USB Port 2 overcurrent uses Gpm 2 */ /* USB Port 2 overcurrent uses Gpm 2 */
If (LLessEqual(UOM2,9)) { If (UOM2 <= 9) {
Scope (\_GPE) { Scope (\_GPE) {
Method (_L15) { Method (_L15) {
UCOC() UCOC()
if (LEqual(GPB2,PLC2)) { if (GPB2 == PLC2) {
Not(PLC2,PLC2) PLC2 = ~PLC2
Store(PLC2, \_SB.PT2D) \_SB.PT2D = PLC2
} }
} }
} }
} }
/* USB Port 3 overcurrent uses Gpm 3 */ /* USB Port 3 overcurrent uses Gpm 3 */
If (LLessEqual(UOM3,9)) { If (UOM3 <= 9) {
Scope (\_GPE) { Scope (\_GPE) {
Method (_L16) { Method (_L16) {
UCOC() UCOC()
if (LEqual(GPB3,PLC3)) { if (GPB3 == PLC3) {
Not(PLC3,PLC3) PLC3 = ~PLC3
Store(PLC3, \_SB.PT3D) \_SB.PT3D = PLC3
} }
} }
} }
} }
/* USB Port 4 overcurrent uses Gpm 4 */ /* USB Port 4 overcurrent uses Gpm 4 */
If (LLessEqual(UOM4,9)) { If (UOM4 <= 9) {
Scope (\_GPE) { Scope (\_GPE) {
Method (_L19) { Method (_L19) {
UCOC() UCOC()
if (LEqual(GPB4,PLC4)) { if (GPB4 == PLC4) {
Not(PLC4,PLC4) PLC4 = ~PLC4
Store(PLC4, \_SB.PT4D) \_SB.PT4D = PLC4
} }
} }
} }
} }
/* USB Port 5 overcurrent uses Gpm 5 */ /* USB Port 5 overcurrent uses Gpm 5 */
If (LLessEqual(UOM5,9)) { If (UOM5 <= 9) {
Scope (\_GPE) { Scope (\_GPE) {
Method (_L1A) { Method (_L1A) {
UCOC() UCOC()
if (LEqual(GPB5,PLC5)) { if (GPB5 == PLC5) {
Not(PLC5,PLC5) PLC5 = ~PLC5
Store(PLC5, \_SB.PT5D) \_SB.PT5D = PLC5
} }
} }
} }
} }
/* USB Port 6 overcurrent uses Gpm 6 */ /* USB Port 6 overcurrent uses Gpm 6 */
If (LLessEqual(UOM6,9)) { If (UOM6 <= 9) {
Scope (\_GPE) { Scope (\_GPE) {
/* Method (_L1C) { */ /* Method (_L1C) { */
Method (_L06) { Method (_L06) {
UCOC() UCOC()
if (LEqual(GPB6,PLC6)) { if (GPB6 == PLC6) {
Not(PLC6,PLC6) PLC6 = ~PLC6
Store(PLC6, \_SB.PT6D) \_SB.PT6D = PLC6
} }
} }
} }
} }
/* USB Port 7 overcurrent uses Gpm 7 */ /* USB Port 7 overcurrent uses Gpm 7 */
If (LLessEqual(UOM7,9)) { If (UOM7 <= 9) {
Scope (\_GPE) { Scope (\_GPE) {
/* Method (_L1D) { */ /* Method (_L1D) { */
Method (_L07) { Method (_L07) {
UCOC() UCOC()
if (LEqual(GPB7,PLC7)) { if (GPB7 == PLC7) {
Not(PLC7,PLC7) PLC7 = ~PLC7
Store(PLC7, \_SB.PT7D) \_SB.PT7D = PLC7
} }
} }
} }
} }
/* USB Port 8 overcurrent uses Gpm 8 */ /* USB Port 8 overcurrent uses Gpm 8 */
If (LLessEqual(UOM8,9)) { If (UOM8 <= 9) {
Scope (\_GPE) { Scope (\_GPE) {
Method (_L17) { Method (_L17) {
if (LEqual(G8IS,PLC8)) { if (G8IS == PLC8) {
Not(PLC8,PLC8) PLC8 = ~PLC8
Store(PLC8, \_SB.PT8D) \_SB.PT8D = PLC8
} }
} }
} }
} }
/* USB Port 9 overcurrent uses Gpm 9 */ /* USB Port 9 overcurrent uses Gpm 9 */
If (LLessEqual(UOM9,9)) { If (UOM9 <= 9) {
Scope (\_GPE) { Scope (\_GPE) {
Method (_L0E) { Method (_L0E) {
if (LEqual(G9IS,0)) { if (G9IS == 0) {
Store(1,\_SB.PT9D) \_SB.PT9D = 1
} }
} }
} }