diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/soc/amd/stoneyridge/acpi/cpu.asl | 4 | ||||
-rw-r--r-- | src/soc/amd/stoneyridge/acpi/pci_int.asl | 112 | ||||
-rw-r--r-- | src/soc/amd/stoneyridge/acpi/sb_pci0_fch.asl | 262 | ||||
-rw-r--r-- | src/soc/amd/stoneyridge/acpi/sleepstates.asl | 12 | ||||
-rw-r--r-- | src/soc/amd/stoneyridge/acpi/usb.asl | 358 |
5 files changed, 403 insertions, 345 deletions
diff --git a/src/soc/amd/stoneyridge/acpi/cpu.asl b/src/soc/amd/stoneyridge/acpi/cpu.asl index b2322eac6f..ca5f2496c8 100644 --- a/src/soc/amd/stoneyridge/acpi/cpu.asl +++ b/src/soc/amd/stoneyridge/acpi/cpu.asl @@ -21,7 +21,7 @@ External (\_SB.P007, DeviceObj) /* Return a package containing enabled processor entries */ Method (PPKG) { - If (LGreaterEqual (\PCNT, 4)) { + If (\PCNT >= 4) { Return (Package () { \_SB.P000, @@ -29,7 +29,7 @@ Method (PPKG) \_SB.P002, \_SB.P003 }) - } ElseIf (LGreaterEqual (\PCNT, 2)) { + } ElseIf (\PCNT>= 2) { Return (Package () { \_SB.P000, diff --git a/src/soc/amd/stoneyridge/acpi/pci_int.asl b/src/soc/amd/stoneyridge/acpi/pci_int.asl index bd29ebb71f..0074cf51b6 100644 --- a/src/soc/amd/stoneyridge/acpi/pci_int.asl +++ b/src/soc/amd/stoneyridge/acpi/pci_int.asl @@ -133,9 +133,9 @@ Method(_STA, 0) { if (PIRA) { - Return(0x0b) /* sata is invisible */ + Return (0x0b) /* sata is invisible */ } else { - Return(0x09) /* sata is disabled */ + Return (0x09) /* sata is disabled */ } } /* End Method(_SB.INTA._STA) */ @@ -145,14 +145,14 @@ Method(_PRS ,0) { /* DBGO("\\_SB\\LNKA\\_PRS\n") */ - Return(IRQP) + Return (IRQP) } /* Method(_SB.INTA._PRS) */ Method(_CRS ,0) { /* DBGO("\\_SB\\LNKA\\_CRS\n") */ CreateWordField(IRQB, 0x1, IRQN) - ShiftLeft(1, PIRA, IRQN) - Return(IRQB) + IRQN = 1 << PIRA + Return (IRQB) } /* Method(_SB.INTA._CRS) */ Method(_SRS, 1) { @@ -162,9 +162,9 @@ /* Use lowest available IRQ */ FindSetRightBit(IRQM, Local0) if (Local0) { - Decrement(Local0) + Local0-- } - Store(Local0, PIRA) + PIRA = Local0 } /* End Method(_SB.INTA._SRS) */ } /* End Device(INTA) */ @@ -174,9 +174,9 @@ Method(_STA, 0) { if (PIRB) { - Return(0x0b) /* sata is invisible */ + Return (0x0b) /* sata is invisible */ } else { - Return(0x09) /* sata is disabled */ + Return (0x09) /* sata is disabled */ } } /* End Method(_SB.INTB._STA) */ @@ -186,14 +186,14 @@ Method(_PRS ,0) { /* DBGO("\\_SB\\LNKB\\_PRS\n") */ - Return(IRQP) + Return (IRQP) } /* Method(_SB.INTB._PRS) */ Method(_CRS ,0) { /* DBGO("\\_SB\\LNKB\\_CRS\n") */ CreateWordField(IRQB, 0x1, IRQN) - ShiftLeft(1, PIRB, IRQN) - Return(IRQB) + IRQN = 1 << PIRB + Return (IRQB) } /* Method(_SB.INTB._CRS) */ Method(_SRS, 1) { @@ -203,9 +203,9 @@ /* Use lowest available IRQ */ FindSetRightBit(IRQM, Local0) if (Local0) { - Decrement(Local0) + Local0-- } - Store(Local0, PIRB) + PIRB = Local0 } /* End Method(_SB.INTB._SRS) */ } /* End Device(INTB) */ @@ -215,9 +215,9 @@ Method(_STA, 0) { if (PIRC) { - Return(0x0b) /* sata is invisible */ + Return (0x0b) /* sata is invisible */ } else { - Return(0x09) /* sata is disabled */ + Return (0x09) /* sata is disabled */ } } /* End Method(_SB.INTC._STA) */ @@ -227,14 +227,14 @@ Method(_PRS ,0) { /* DBGO("\\_SB\\LNKC\\_PRS\n") */ - Return(IRQP) + Return (IRQP) } /* Method(_SB.INTC._PRS) */ Method(_CRS ,0) { /* DBGO("\\_SB\\LNKC\\_CRS\n") */ CreateWordField(IRQB, 0x1, IRQN) - ShiftLeft(1, PIRC, IRQN) - Return(IRQB) + IRQN = 1 << PIRC + Return (IRQB) } /* Method(_SB.INTC._CRS) */ Method(_SRS, 1) { @@ -244,9 +244,9 @@ /* Use lowest available IRQ */ FindSetRightBit(IRQM, Local0) if (Local0) { - Decrement(Local0) + Local0-- } - Store(Local0, PIRC) + PIRC = Local0 } /* End Method(_SB.INTC._SRS) */ } /* End Device(INTC) */ @@ -256,9 +256,9 @@ Method(_STA, 0) { if (PIRD) { - Return(0x0b) /* sata is invisible */ + Return (0x0b) /* sata is invisible */ } else { - Return(0x09) /* sata is disabled */ + Return (0x09) /* sata is disabled */ } } /* End Method(_SB.INTD._STA) */ @@ -268,14 +268,14 @@ Method(_PRS ,0) { /* DBGO("\\_SB\\LNKD\\_PRS\n") */ - Return(IRQP) + Return (IRQP) } /* Method(_SB.INTD._PRS) */ Method(_CRS ,0) { /* DBGO("\\_SB\\LNKD\\_CRS\n") */ CreateWordField(IRQB, 0x1, IRQN) - ShiftLeft(1, PIRD, IRQN) - Return(IRQB) + IRQN = 1 << PIRD + Return (IRQB) } /* Method(_SB.INTD._CRS) */ Method(_SRS, 1) { @@ -285,9 +285,9 @@ /* Use lowest available IRQ */ FindSetRightBit(IRQM, Local0) if (Local0) { - Decrement(Local0) + Local0-- } - Store(Local0, PIRD) + PIRD = Local0 } /* End Method(_SB.INTD._SRS) */ } /* End Device(INTD) */ @@ -297,9 +297,9 @@ Method(_STA, 0) { if (PIRE) { - Return(0x0b) /* sata is invisible */ + Return (0x0b) /* sata is invisible */ } else { - Return(0x09) /* sata is disabled */ + Return (0x09) /* sata is disabled */ } } /* End Method(_SB.INTE._STA) */ @@ -309,14 +309,14 @@ Method(_PRS ,0) { /* DBGO("\\_SB\\LNKE\\_PRS\n") */ - Return(IRQP) + Return (IRQP) } /* Method(_SB.INTE._PRS) */ Method(_CRS ,0) { /* DBGO("\\_SB\\LNKE\\_CRS\n") */ CreateWordField(IRQB, 0x1, IRQN) - ShiftLeft(1, PIRE, IRQN) - Return(IRQB) + IRQN = 1 << PIRE + Return (IRQB) } /* Method(_SB.INTE._CRS) */ Method(_SRS, 1) { @@ -326,9 +326,9 @@ /* Use lowest available IRQ */ FindSetRightBit(IRQM, Local0) if (Local0) { - Decrement(Local0) + Local0-- } - Store(Local0, PIRE) + PIRE = Local0 } /* End Method(_SB.INTE._SRS) */ } /* End Device(INTE) */ @@ -338,9 +338,9 @@ Method(_STA, 0) { if (PIRF) { - Return(0x0b) /* sata is invisible */ + Return (0x0b) /* sata is invisible */ } else { - Return(0x09) /* sata is disabled */ + Return (0x09) /* sata is disabled */ } } /* End Method(_SB.INTF._STA) */ @@ -350,14 +350,14 @@ Method(_PRS ,0) { /* DBGO("\\_SB\\LNKF\\_PRS\n") */ - Return(PITF) + Return (PITF) } /* Method(_SB.INTF._PRS) */ Method(_CRS ,0) { /* DBGO("\\_SB\\LNKF\\_CRS\n") */ CreateWordField(IRQB, 0x1, IRQN) - ShiftLeft(1, PIRF, IRQN) - Return(IRQB) + IRQN = 1 << PIRF + Return (IRQB) } /* Method(_SB.INTF._CRS) */ Method(_SRS, 1) { @@ -367,9 +367,9 @@ /* Use lowest available IRQ */ FindSetRightBit(IRQM, Local0) if (Local0) { - Decrement(Local0) + Local0-- } - Store(Local0, PIRF) + PIRF = Local0 } /* End Method(_SB.INTF._SRS) */ } /* End Device(INTF) */ @@ -379,9 +379,9 @@ Method(_STA, 0) { if (PIRG) { - Return(0x0b) /* sata is invisible */ + Return (0x0b) /* sata is invisible */ } else { - Return(0x09) /* sata is disabled */ + Return (0x09) /* sata is disabled */ } } /* End Method(_SB.INTG._STA) */ @@ -391,14 +391,14 @@ Method(_PRS ,0) { /* DBGO("\\_SB\\LNKG\\_PRS\n") */ - Return(IRQP) + Return (IRQP) } /* Method(_SB.INTG._CRS) */ Method(_CRS ,0) { /* DBGO("\\_SB\\LNKG\\_CRS\n") */ CreateWordField(IRQB, 0x1, IRQN) - ShiftLeft(1, PIRG, IRQN) - Return(IRQB) + IRQN = 1 << PIRG + Return (IRQB) } /* Method(_SB.INTG._CRS) */ Method(_SRS, 1) { @@ -408,9 +408,9 @@ /* Use lowest available IRQ */ FindSetRightBit(IRQM, Local0) if (Local0) { - Decrement(Local0) + Local0-- } - Store(Local0, PIRG) + PIRG= Local0 } /* End Method(_SB.INTG._SRS) */ } /* End Device(INTG) */ @@ -420,9 +420,9 @@ Method(_STA, 0) { if (PIRH) { - Return(0x0b) /* sata is invisible */ + Return (0x0b) /* sata is invisible */ } else { - Return(0x09) /* sata is disabled */ + Return (0x09) /* sata is disabled */ } } /* End Method(_SB.INTH._STA) */ @@ -432,14 +432,14 @@ Method(_PRS ,0) { /* DBGO("\\_SB\\LNKH\\_PRS\n") */ - Return(IRQP) + Return (IRQP) } /* Method(_SB.INTH._CRS) */ Method(_CRS ,0) { /* DBGO("\\_SB\\LNKH\\_CRS\n") */ CreateWordField(IRQB, 0x1, IRQN) - ShiftLeft(1, PIRH, IRQN) - Return(IRQB) + IRQN = 1 << PIRH + Return (IRQB) } /* Method(_SB.INTH._CRS) */ Method(_SRS, 1) { @@ -449,8 +449,8 @@ /* Use lowest available IRQ */ FindSetRightBit(IRQM, Local0) if (Local0) { - Decrement(Local0) + Local0-- } - Store(Local0, PIRH) + PIRH = Local0 } /* End Method(_SB.INTH._SRS) */ } /* End Device(INTH) */ diff --git a/src/soc/amd/stoneyridge/acpi/sb_pci0_fch.asl b/src/soc/amd/stoneyridge/acpi/sb_pci0_fch.asl index 1820f7a3bf..f302b0499c 100644 --- a/src/soc/amd/stoneyridge/acpi/sb_pci0_fch.asl +++ b/src/soc/amd/stoneyridge/acpi/sb_pci0_fch.asl @@ -9,14 +9,14 @@ External(\_SB.ALIB, MethodObj) Method(_OSC,4) { /* Check for proper PCI/PCIe UUID */ - If(LEqual(Arg0,ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766"))) + If (Arg0 == ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766")) { /* Let OS control everything */ Return (Arg3) } Else { CreateDWordField(Arg3,0,CDW1) - Or(CDW1,4,CDW1) // Unrecognized UUID - Return(Arg3) + CDW1 |= 4 // Unrecognized UUID + Return (Arg3) } } @@ -104,12 +104,12 @@ Method(_CRS, 0) { * 32bit (0x00000000 - TOM1) will wrap and give the same * result as 64bit (0x100000000 - TOM1). */ - Store(TOM1, MM1B) - ShiftLeft(0x10000000, 4, Local0) - Subtract(Local0, TOM1, Local0) - Store(Local0, MM1L) + MM1B = TOM1 + Local0 = 0x10000000 << 4 + Local0 -= TOM1 + MM1L = Local0 - Return(CRES) /* note to change the Name buffer */ + Return (CRES) /* note to change the Name buffer */ } /* end of Method(_SB.PCI0._CRS) */ /* @@ -142,8 +142,8 @@ Method(_INI, 0, Serialized) { CreateWordField(F1BF, 0, F1SZ) CreateByteField(F1BF, 2, F1DA) - Store(3, F1SZ) - Store(\PWRS, F1DA) + F1SZ = 3 + F1DA= \PWRS \_SB.ALIB(1, F1BF) @@ -151,23 +151,23 @@ Method(_INI, 0, Serialized) { 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)) { - Store(1, OSVR) /* Assume some form of XP */ + OSVR = 1 /* Assume some form of XP */ if (\_OSI("Windows 2006")) /* Vista */ { - Store(2, OSVR) + OSVR = 2 } } else { - If(WCMP(\_OS,"Linux")) { - Store(3, OSVR) /* Linux */ + If (WCMP(\_OS,"Linux")) { + OSVR = 3 /* Linux */ } Else { - Store(4, OSVR) /* Gotta be WinCE */ + OSVR = 4 /* Gotta be WinCE */ } } - Return(OSVR) + Return (OSVR) } OperationRegion(SMIC, SystemMemory, 0xfed80000, 0x80000) @@ -356,74 +356,75 @@ Method(FDDC, 2, Serialized) { Acquire(FDAS, 0xffff) - if(LEqual(Arg1, 0)) { + if (Arg1 == 0) { Switch(ToInteger(Arg0)) { Case(Package() {5, 15, 24}) { - Store(One, PG1A) + PG1A = One } Case(Package() {6, 7, 8, 11, 12, 18}) { - Store(One, PG2_) + PG2_ = One } } /* put device into D0 */ Switch(ToInteger(Arg0)) { Case(5) { - Store(0x00, I0TD) - Store(One, I0PD) - Store(I0DS, Local0) - while(LNotEqual(Local0,0x7)) { - Store(I0DS, Local0) + I0TD = 0x00 + I0PD = One + Local0 = I0DS + while(Local0 != 0x7) { + Local0 = I0DS } } Case(6) { - Store(0x00, I1TD) - Store(One, I1PD) - Store(I1DS, Local0) - while(LNotEqual(Local0,0x7)) { - Store(I1DS, Local0) + I1TD = 0x00 + I1PD = One + Local0 = I1DS + while(Local0 != 0x7) { + Local0 = I1DS } } Case(7) { - Store(0x00, I2TD) - Store(One, I2PD) - Store(I2DS, Local0) - while(LNotEqual(Local0,0x7)) { - Store(I2DS, Local0) + I2TD = 0x00 + I2PD = One + Local0 = I2DS + while(Local0 != 0x7) { + Local0 = I2DS } } - Case(8) {Store(0x00, I3TD) - Store(One, I3PD) - Store(I3DS, Local0) - while(LNotEqual(Local0,0x7)) { - Store(I3DS, Local0) + Case(8) { + I3TD = 0x00 + I3PD = One + Local0 = I3DS + while(Local0 != 0x7) { + Local0 = I3DS } } Case(11) { - Store(0x00, U0TD) - Store(One, U0PD) - Store(U0DS, Local0) - while(LNotEqual(Local0,0x7)) { - Store(U0DS, Local0) + U0TD = 0x00 + U0PD = One + Local0 = U0DS + while(Local0 != 0x7) { + Local0 = U0DS } } Case(12) { - Store(0x00, U1TD) - Store(One, U1PD) - Store(U1DS, Local0) - while(LNotEqual(Local0,0x7)) { - Store(U1DS, Local0) + U1TD = 0x00 + U1PD = One + Local0 = U1DS + while(Local0 != 0x7) { + Local0 = U1DS } } /* todo Case(15) { STD0()} */ /* SATA */ Case(18) { U2D0()} /* EHCI */ Case(23) { U3D0()} /* XHCI */ Case(24) { /* SD */ - Store(0x00, SDTD) - Store(One, SDPD) - Store(SDDS, Local0) - while(LNotEqual(Local0,0x7)) { - Store(SDDS, Local0) + SDTD = 0x00 + SDPD = One + Local0 = SDDS + while(Local0 != 0x7) { + Local0 = SDDS } } } @@ -432,77 +433,78 @@ Method(FDDC, 2, Serialized) Switch(ToInteger(Arg0)) { Case(5) { - Store(Zero, I0PD) - Store(I0DS, Local0) - while(LNotEqual(Local0,0x0)) { - Store(I0DS, Local0) + I0PD = Zero + Local0 = I0DS + while(Local0 != 0x0) { + Local0 = I0DS } - Store(0x03, I0TD) + I0TD = 0x03 } Case(6) { - Store(Zero, I1PD) - Store(I1DS, Local0) - while(LNotEqual(Local0,0x0)) { - Store(I1DS, Local0) + I1PD = Zero + Local0 = I1DS + while(Local0 != 0x0) { + Local0 = I1DS } - Store(0x03, I1TD) + I1TD = 0x03 } - Case(7) { - Store(Zero, I2PD) - Store(I2DS, Local0) - while(LNotEqual(Local0,0x0)) { - Store(I2DS, Local0) + Case(7) { + I2PD = Zero + Local0 = I2DS + while(Local0 != 0x0) { + Local0 = I2DS } - Store(0x03, I2TD)} + I2TD = 0x03 + } Case(8) { - Store(Zero, I3PD) - Store(I3DS, Local0) - while(LNotEqual(Local0,0x0)) { - Store(I3DS, Local0) + I3PD = Zero + Local0 = I3DS + while(Local0 != 0x0) { + Local0 = I3DS } - Store(0x03, I3TD) + I3TD = 0x03 } Case(11) { - Store(Zero, U0PD) - Store(U0DS, Local0) - while(LNotEqual(Local0,0x0)) { - Store(U0DS, Local0) + U0PD = Zero + Local0 = U0DS + while(Local0 != 0x0) { + Local0 = U0DS } - Store(0x03, U0TD) + U0TD = 0x03 } Case(12) { - Store(Zero, U1PD) - Store(U1DS, Local0) - while(LNotEqual(Local0,0x0)) { - Store(U1DS, Local0) + U1PD = Zero + Local0 = U1DS + while(Local0 != 0x0) { + Local0 = U1DS } - Store(0x03, U1TD) + U1TD = 0x03 } /* todo Case(15) { STD3()} */ /* SATA */ Case(18) { U2D3()} /* EHCI */ Case(23) { U3D3()} /* XHCI */ Case(24) { /* SD */ - Store(Zero, SDPD) - Store(SDDS, Local0) - while(LNotEqual(Local0,0x0)) { - Store(SDDS, Local0) + SDPD = Zero + Local0 = SDDS + while(Local0 != 0x0) { + Local0 = SDDS } - Store(0x03, SDTD) + SDTD = 0x03 } } /* Turn off Power */ - if(LEqual(I0TD, 3)) { - if(LEqual(SATD, 3)) { - if(LEqual(SDTD, 3)) { Store(Zero, PG1A) } + if (I0TD == 3) { + if (SATD == 3) { + if (SDTD == 3) { PG1A = Zero } } } - if(LEqual(I1TD, 3)) { - if(LEqual(I2TD, 3)) { - if(LEqual(I3TD, 3)) { - if(LEqual(U0TD, 3)) { - if(LEqual(U1TD, 3)) { - if(LEqual(U2TD, 3)) { - Store(Zero, PG2_) + if (I1TD == 3) { + if (I2TD == 3) { + if (I3TD == 3) { + if (U0TD == 3) { + if (U1TD == 3) { + if (U2TD == 3) { + PG2_ = Zero } } } @@ -515,53 +517,53 @@ Method(FDDC, 2, Serialized) Method(FPTS,0, Serialized) /* FCH _PTS */ { - if(LEqual(\XHCE, one)) { - if(LNotEqual(U3TD, 0x03)) { + if (\XHCE == one) { + if (U3TD != 0x03) { FDDC(23, 3) } } - if(LNotEqual(U2TD, 0x03)) { + if (U2TD != 0x03) { FDDC(18, 3) } } Method(FWAK,0, Serialized) /* FCH _WAK */ { - if(LEqual(\XHCE, one)) { - if(LEqual(U3TD, 0x03)) { + if (\XHCE == one) { + if (U3TD == 0x03) { FDDC(23, 0) } } - if(LEqual(U2TD, 0x03)) { + if (U2TD == 0x03) { FDDC(18, 0) } - if(LEqual(\UT0E, zero)) { - if(LNotEqual(U0TD, 0x03)) { + if (\UT0E == zero) { + if (U0TD != 0x03) { FDDC(11, 3) } } - if(LEqual(\UT1E, zero)) { - if(LNotEqual(U1TD, 0x03)) { + if (\UT1E == zero) { + if (U1TD != 0x03) { FDDC(12, 3) } } - if(LEqual(\IC0E, zero)) { - if(LNotEqual(I0TD, 0x03)) { + if (\IC0E == zero) { + if (I0TD != 0x03) { FDDC(5, 3) } } - if(LEqual(\IC1E, zero)) { - if(LNotEqual(I1TD, 0x03)) { + if (\IC1E == zero) { + if (I1TD != 0x03) { FDDC(6, 3) } } - if(LEqual(\IC2E, zero)) { - if(LNotEqual(I2TD, 0x03)) { + if (\IC2E == zero) { + if (I2TD != 0x03) { FDDC(7, 3) } } - if(LEqual(\IC3E, zero)) { - if(LNotEqual(I3TD, 0x03)) { + if (\IC3E == zero) { + if (I3TD != 0x03) { FDDC(8, 3) } } @@ -574,20 +576,20 @@ Method(FWAK,0, Serialized) /* FCH _WAK */ */ Method(PWGC,2, Serialized) { - And (PGA3, 0xdf, Local0) /* do SwUsb3SlpShutdown below */ - if(Arg1) { - Or(Arg0, Local0, Local0) + Local0 = PGA3 & 0xdf /* do SwUsb3SlpShutdown below */ + if (Arg1) { + Local0 |= Arg0 } else { - Not(Arg0, Local1) - And(Local1, Local0, Local0) + Local1 = ~Arg0 + Local0 &= Local1 } Store(Local0, PGA3) - if(LEqual(Arg0, 0x20)) { /* if SwUsb3SlpShutdown */ - Store(PGA3, Local0) - And(Arg0, Local0, Local0) - while(LNot(Local0)) { /* wait SwUsb3SlpShutdown to complete */ - Store(PGA3, Local0) - And(Arg0, Local0, Local0) + if (Arg0 == 0x20) { /* if SwUsb3SlpShutdown */ + Local0 = PGA3 + Local0 &= Arg0 + while(!Local0) { /* wait SwUsb3SlpShutdown to complete */ + Local0 = PGA3 + Local0 &= Arg0 } } } diff --git a/src/soc/amd/stoneyridge/acpi/sleepstates.asl b/src/soc/amd/stoneyridge/acpi/sleepstates.asl index 88c6efc960..9d85062fde 100644 --- a/src/soc/amd/stoneyridge/acpi/sleepstates.asl +++ b/src/soc/amd/stoneyridge/acpi/sleepstates.asl @@ -3,25 +3,25 @@ /* S1 support: bit 0, S2 Support: bit 1, etc. S0 & S5 assumed */ Name(SSFG, 0x09) If (CONFIG(HAVE_ACPI_RESUME)) { - Store(0x0D, SSFG) + SSFG = 0x0d } If (CONFIG(DISABLE_ACPI_HIBERNATE)) { - Store(And(SSFG, 0xF7), SSFG) + SSFG &= 0xf7 } /* Supported sleep states: */ Name(\_S0, Package () {0x00, 0x00, 0x00, 0x00} ) /* (S0) - working state */ -If (And(SSFG, 0x01)) { +If (SSFG & 0x01) { Name(\_S1, Package () {0x01, 0x01, 0x00, 0x00} ) /* (S1) - sleeping w/CPU context */ } -If (And(SSFG, 0x02)) { +If (SSFG & 0x02) { Name(\_S2, Package () {0x02, 0x02, 0x00, 0x00} ) /* (S2) - "light" Suspend to RAM */ } -If (And(SSFG, 0x04)) { +If (SSFG & 0x04) { Name(\_S3, Package () {0x03, 0x03, 0x00, 0x00} ) /* (S3) - Suspend to RAM */ } -If (And(SSFG, 0x08)) { +If (SSFG & 0x08) { Name(\_S4, Package () {0x04, 0x04, 0x00, 0x00} ) /* (S4) - Suspend to Disk */ } diff --git a/src/soc/amd/stoneyridge/acpi/usb.asl b/src/soc/amd/stoneyridge/acpi/usb.asl index 3c62b331d2..bf39c94457 100644 --- a/src/soc/amd/stoneyridge/acpi/usb.asl +++ b/src/soc/amd/stoneyridge/acpi/usb.asl @@ -67,10 +67,10 @@ Scope(\_SB) Return(XHD0) } Method(_ON) { - Store(0x01, XHD0) + XHD0 = 0x01 } Method(_OFF) { - Store(0x00, XHD0) + XHD0 = 0x00 } } PowerResource(P3U3, 0, 0) { @@ -78,10 +78,10 @@ Scope(\_SB) Return(XHD3) } Method(_ON) { - Store(0x01, XHD3) + XHD3 = 0x01 } Method(_OFF) { - Store(0x00, XHD3) + XHD3 = 0x00 } } @@ -92,10 +92,10 @@ Scope(\_SB) Return(EHD0) } Method(_ON) { - Store(0x01, EHD0) + EHD0 = 0x01 } Method(_OFF) { - Store(0x00, EHD0) + EHD0 = 0x00 } } PowerResource(P3U2, 0, 0) { @@ -103,10 +103,10 @@ Scope(\_SB) Return(EHD3) } Method(_ON) { - Store(0x01, EHD3) + EHD3 = 0x01 } Method(_OFF) { - Store(0x00, EHD3) + EHD3 = 0x00 } } } @@ -121,33 +121,33 @@ Field(EHMC, DwordAcc, NoLock, Preserve) Method(U2D3,0, Serialized) { - if (LNotEqual(EH10, Zero)) { - Store (EH10, EHBA) - Store (One, EHME) - Store (ESIM, SSIM) + if (EH10 != Zero) { + EHBA = EH10 + EHME = One + SSIM = ESIM } - if (LEqual(E_PS, 3)) { - Store (Zero, RQTY) - Store (One, RQ18) + if (E_PS == 3) { + RQTY = Zero + RQ18 = One - Store (U2SR, Local0) + Local0 = U2SR while (Local0) { - Store (U2SR, Local0) + Local0 = U2SR } - Store (Zero, U2PD) + U2PD = Zero - Store (U2DS, Local0) - while (LNotEqual(Local0, Zero)) { - Store (U2DS, Local0) + Local0 = U2DS + while (Local0 != Zero) { + Local0 = U2DS } - Store (0x03,U2TD) + U2TD = 0x03 - if (LEqual(U3TD, 0x03)) { /* Shutdown USB2 PLL */ + if (U3TD == 0x03) { /* Shutdown USB2 PLL */ PWGC (0x40, 0) - Store (One, U2RP) + U2RP = One } } } @@ -155,115 +155,115 @@ Method(U2D3,0, Serialized) Method(U2D0,0, Serialized) { PWGC (0x40, 1) - Store (Zero, U2RP) - Store (0x00,U2TD) + U2RP = Zero + U2TD = 0x00 - Store (Zero, U2TD) - Store (One, U2PD) + U2TD = Zero + U2PD = One - Store (U2DS, Local0) - while (LNotEqual(Local0,0x7)) { - Store (U2DS, Local0) + Local0 = U2DS + while (Local0 != 0x7) { + Local0 = U2DS } - Store (One, RQTY) - Store (One, RQ18) - Store (U2SR, Local0) - while (LNot(Local0)) { - Store (U2SR, Local0) + RQTY = One + RQ18 = One + Local0 = U2SR + while (!Local0) { + Local0 = U2SR } - Store (EHID, EH2C) + EH2C = EHID - if (LNotEqual(EH10, Zero)) { - Store (EH10, EHBA) - Store (One, EHME) - Store (SSIM, ESIM) + if (EH10 != Zero) { + EHBA = EH10 + EHME = One + ESIM = SSIM } - Store (ES54, EH54) - Store (ES64, EH64) + EH54 = ES54 + EH64 = ES64 } Method(LXFW,3, Serialized) //Load Xhci FirmWare { - Store (One, FWLM) /* Firmware Load Mode */ - Store (Arg0, ROAM) /* ROM/RAM */ - Store (Arg1, UA04) - Store (Arg2, UA08) - Store (One, FPLS) /* Firmware Preload Start */ - Store (FPLC, Local0) /* Firmware Preload Complete */ - while (LNot(Local0)) { - Store (FPLC, Local0) + FWLM = One /* Firmware Load Mode */ + ROAM = Arg0 /* ROM/RAM */ + UA04 = Arg1 + UA08 = Arg2 + FPLS = One /* Firmware Preload Start */ + Local0 = FPLC /* Firmware Preload Complete */ + while (!Local0) { + Local0 = FPLC } - Store (Zero, FPLS) + FPLS = Zero } Method(U3D3,0, Serialized) { - if (LEqual(U_PS, 3)) { + if (U_PS == 3) { X0_S () - Or (PGA3, 0x20, PGA3) /* SwUsb3SlpShutdown */ - And (PGA3, 0x20, Local0) - while (LNot(Local0)) { /* wait for it to complete */ - And (PGA3, 0x20, Local0) + PGA3 |= 0x20 /* SwUsb3SlpShutdown */ + Local0 = PGA3 & 0x20 + while (!Local0) { /* wait for it to complete */ + Local0 = PGA3 & 0x20 } - Store (One, UD3P) /* U3P_D3Cold_PWRDN */ + UD3P = One /* U3P_D3Cold_PWRDN */ - Store (Zero, U3PD) /* PwrOnDev */ - Store (U3DS, Local0) + U3PD = Zero /* PwrOnDev */ + Local0 = U3DS while (Local0) { /* RstBState, RefClkOkState, PwrRstBState */ - Store (U3DS, Local0) + Local0 = U3DS } - Store (0x3, U3TD) /* TargetedDeviceState */ + U3TD = 0x3 /* TargetedDeviceState */ - Store (One, U3RP) /* USB3_RefClk_Pwdn */ + U3RP = One /* USB3_RefClk_Pwdn */ - if (Lequal(U2TD, 0x3)) { /* If EHCI targeted in D3cold */ - And (PGA3, 0x9f, PGA3) /* SwUsb2S5RstB */ - Store (One, U2RP) /* USB2_RefClk_Pwdn */ + if (U2TD == 0x3) { /* If EHCI targeted in D3cold */ + PGA3 &= 0x9f /* SwUsb2S5RstB */ + U2RP = One /* USB2_RefClk_Pwdn */ } - Store (Zero, U3PG) /* XhcPwrGood */ - Store (One, U3PS) /* Usb3PowerSel */ + U3PG = Zero /* XhcPwrGood */ + U3PS = One /* Usb3PowerSel */ } } Method(U3D0,0, Serialized) { - Store (Zero, U3PS) /* Usb3PowerSel */ - Store (One, U3PG) /* XhcPwrGood */ + U3PS = Zero /* Usb3PowerSel */ + U3PG = One /* XhcPwrGood */ - Store (Zero, U2RP) - Store (Zero, U3RP) + U2RP = Zero + U3RP = Zero - And (PGA3, 0xdf, Local0) - Or (Local0, 0x40, Local0) - Store (Local0, PGA3) /* SwUsb2S5RstB */ + Local0 = PGA3 & 0xdf + Local0 |= 0x40 + PGA3 = Local0 /* SwUsb2S5RstB */ - Store (Zero, U3TD) /* TargetedDeviceState */ - Store (One, U3PD) /* PwrOnDev */ + U3TD = Zero /* TargetedDeviceState */ + U3PD = One /* PwrOnDev */ - Store (U3DS, Local0) /* wait for RstBState, RefClkOkState, PwrRstBState */ - while (LNot(Lequal(Local0, 0x7))) { - Store (U3DS, Local0) + Local0 = U3DS /* wait for RstBState, RefClkOkState, PwrRstBState */ + while (Local0 != 0x7) { + Local0 = U3DS } - Store (U3PY, Local0) /* USB3 PHY Lock */ - while (LNot(Local0)) { - Store (U3PY, Local0) + Local0 = U3PY /* USB3 PHY Lock */ + while (!Local0) { + Local0 = U3PY } - Store (Zero, U3PR) /* U3P_RESTORE_RESET */ + U3PR = Zero /* U3P_RESTORE_RESET */ - Store (AUSS, Local0) /* AutoSizeStart */ - if (LNotEqual(Local0,1)) { - Store(One, AUSS) + Local0 = AUSS /* AutoSizeStart */ + if (Local0 != 1) { + AUSS = One } - Store (AUSS, Local0) - while (LNotEqual(Local0,1)) { - Store (AUSS, Local0) + Local0 = AUSS + while (Local0 != 1) { + Local0 = AUSS } LXFW (1, FW00, FW01) @@ -271,9 +271,9 @@ Method(U3D0,0, Serialized) X0_R () - Store (One, U3PR) /* U3P_RESTORE_RESET */ - Store (Zero, UD3P) /* U3P_D3Cold_PWRDN */ - Store (One, U3TD) /* TargetedDeviceState */ + U3PR = One /* U3P_RESTORE_RESET */ + UD3P = Zero /* U3P_D3Cold_PWRDN */ + U3TD = One /* TargetedDeviceState */ } Name (SVBF, Buffer (0x1000) {0}) /* length from FchCarrizo.asl, new fields */ @@ -313,66 +313,122 @@ CreateDWordField(SVBF, 0x7B0, SSIM) /* EHCI SIM BIT */ Method(X0_S,0) { - Store (XH2C, XHID) - Store (0x00000000, IDEX) Store (DATA, S000) - Store (0x00000004, IDEX) Store (DATA, S004) - Store (0x00000008, IDEX) Store (DATA, S008) - Store (0x0000000c, IDEX) Store (DATA, S00C) - Store (0x00000018, IDEX) Store (DATA, S018) - Store (0x0000001c, IDEX) Store (DATA, S01C) - Store (0x00000020, IDEX) Store (DATA, S020) - Store (0x00000030, IDEX) Store (DATA, S030) - Store (0x00000118, IDEX) Store (DATA, S118) - Store (0x00000158, IDEX) Store (DATA, S158) - Store (0x00000198, IDEX) Store (DATA, S198) - Store (0x000001d8, IDEX) Store (DATA, S1D8) - Store (0x00000300, IDEX) Store (DATA, S300) - Store (0x00000304, IDEX) Store (DATA, S304) - Store (0x00000308, IDEX) Store (DATA, S308) - Store (0x0000030c, IDEX) Store (DATA, S30C) - Store (0x00000310, IDEX) Store (DATA, S310) - Store (0x40000028, IDEX) Store (DATA, S428) - Store (0x40000038, IDEX) Store (DATA, S438) - Store (0x4000003c, IDEX) Store (DATA, S43C) - Store (0x40000058, IDEX) Store (DATA, S458) - Store (0x40000068, IDEX) Store (DATA, S468) - Store (0x4000006c, IDEX) Store (DATA, S46C) - Store (0x40000070, IDEX) Store (DATA, S470) - Store (0x40000080, IDEX) Store (DATA, S480) - Store (0x40000084, IDEX) Store (DATA, S484) - Store (0x40000088, IDEX) Store (DATA, S488) - Store (0x4000008c, IDEX) Store (DATA, S48C) + XHID = XH2C + IDEX = Zero + S000 = DATA + IDEX = 0x00000004 + S004 = DATA + IDEX = 0x00000008 + S008 = DATA + IDEX = 0x0000000C + S00C = DATA + IDEX = 0x00000018 + S018 = DATA + IDEX = 0x0000001C + S01C = DATA + IDEX = 0x00000020 + S020 = DATA + IDEX = 0x00000030 + S030 = DATA + IDEX = 0x00000118 + S118 = DATA + IDEX = 0x00000158 + S158 = DATA + IDEX = 0x00000198 + S198 = DATA + IDEX = 0x000001D8 + S1D8 = DATA + IDEX = 0x00000300 + S300 = DATA + IDEX = 0x00000304 + S304 = DATA + IDEX = 0x00000308 + S308 = DATA + IDEX = 0x0000030C + S30C = DATA + IDEX = 0x00000310 + S310 = DATA + IDEX = 0x40000028 + S428 = DATA + IDEX = 0x40000038 + S438 = DATA + IDEX = 0x4000003C + S43C = DATA + IDEX = 0x40000058 + S458 = DATA + IDEX = 0x40000068 + S468 = DATA + IDEX = 0x4000006C + S46C = DATA + IDEX = 0x40000070 + S470 = DATA + IDEX = 0x40000080 + S480 = DATA + IDEX = 0x40000084 + S484 = DATA + IDEX = 0x40000088 + S488 = DATA + IDEX = 0x4000008C + S48C = DATA } Method(X0_R,0) { - Store (XHID, XH2C) - Store (0x00000000, IDEX) Store (S000, DATA) - Store (0x00000004, IDEX) Store (S004, DATA) - Store (0x00000008, IDEX) Store (S008, DATA) - Store (0x0000000c, IDEX) Store (S00C, DATA) - Store (0x00000018, IDEX) Store (S018, DATA) - Store (0x0000001c, IDEX) Store (S01C, DATA) - Store (0x00000020, IDEX) Store (S020, DATA) - Store (0x00000030, IDEX) Store (S030, DATA) - Store (0x00000118, IDEX) Store (S118, DATA) - Store (0x00000158, IDEX) Store (S158, DATA) - Store (0x00000198, IDEX) Store (S198, DATA) - Store (0x000001d8, IDEX) Store (S1D8, DATA) - Store (0x00000300, IDEX) Store (S300, DATA) - Store (0x00000304, IDEX) Store (S304, DATA) - Store (0x00000308, IDEX) Store (S308, DATA) - Store (0x0000030c, IDEX) Store (S30C, DATA) - Store (0x00000310, IDEX) Store (S310, DATA) - Store (0x40000028, IDEX) Store (S428, DATA) - Store (0x40000038, IDEX) Store (S438, DATA) - Store (0x4000003c, IDEX) Store (S43C, DATA) - Store (0x40000058, IDEX) Store (S458, DATA) - Store (0x40000068, IDEX) Store (S468, DATA) - Store (0x4000006c, IDEX) Store (S46C, DATA) - Store (0x40000070, IDEX) Store (S470, DATA) - Store (0x40000080, IDEX) Store (S480, DATA) - Store (0x40000084, IDEX) Store (S484, DATA) - Store (0x40000088, IDEX) Store (S488, DATA) - Store (0x4000008c, IDEX) Store (S48C, DATA) + XH2C = XHID + IDEX = Zero + DATA = S000 + IDEX = 0x000000004 + DATA = S004 + IDEX = 0x000000008 + DATA = S008 + IDEX = 0x00000000C + DATA = S00C + IDEX = 0x000000018 + DATA = S018 + IDEX = 0x00000001C + DATA = S01C + IDEX = 0x000000020 + DATA = S020 + IDEX = 0x00000030 + DATA = S030 + IDEX = 0x00000118 + DATA = S118 + IDEX = 0x00000158 + DATA = S158 + IDEX = 0x00000198 + DATA = S198 + IDEX = 0x000001D8 + DATA = S1D8 + IDEX = 0x00000300 + DATA = S300 + IDEX = 0x00000304 + DATA = S304 + IDEX = 0x00000308 + DATA = S308 + IDEX = 0x0000030C + DATA = S30C + IDEX = 0x00000310 + DATA = S310 + IDEX = 0x40000028 + DATA = S428 + IDEX = 0x40000038 + DATA = S438 + IDEX = 0x4000003C + DATA = S43C + IDEX = 0x40000058 + DATA = S458 + IDEX = 0x40000068 + DATA = S468 + IDEX = 0x4000006C + DATA = S46C + IDEX = 0x40000070 + DATA = S470 + IDEX = 0x40000080 + DATA = S480 + IDEX = 0x40000084 + DATA = S484 + IDEX = 0x40000088 + DATA = S488 + IDEX = 0x4000008C + DATA = S48C } |