Author: wmb Date: 2009-07-17 19:10:19 +0200 (Fri, 17 Jul 2009) New Revision: 1243
Modified: cpu/x86/pc/olpc/via/dsdt.dsl Log: Via DSDT - pgf's fixes for LID detect.
Modified: cpu/x86/pc/olpc/via/dsdt.dsl =================================================================== --- cpu/x86/pc/olpc/via/dsdt.dsl 2009-07-16 23:38:57 UTC (rev 1242) +++ cpu/x86/pc/olpc/via/dsdt.dsl 2009-07-17 17:10:19 UTC (rev 1243) @@ -132,13 +132,14 @@ GS08,1, GS09,1, GS10,1, - GS11,1, + GS11,1, // lid GS12,1, GS13,1, GS14,1, GS15,1, }
+// PMIO_RX24/5 OperationRegion(\GPSE, SystemIO, 0x0424, 0x2) // Genernal Purpose SMI Enable Field(\GPSE, ByteAcc, NoLock, Preserve) { GPS0, 1, // GPI0 SMI Enable @@ -149,11 +150,14 @@ PME, 1, // PCI PME Enable , 2, RING, 1, // Ring Wakeup - , 5, + , 2, + LID, 1, // Lid Wakeup + , 2, USBE, 1, // USB Resume , 1, }
+// PMIO_RX28/9 OperationRegion(\Glos, SystemIO, 0x0428, 0x2) // Global Status Field(\Glos, ByteAcc, NoLock, Preserve) { , 6, // @@ -169,6 +173,19 @@ Field(\WIRQ, ByteAcc, NoLock, Preserve) { IRQR, 8, } + +// from BIOS porting guide, section 13.2.2 +OperationRegion(\EDGE, SystemIO, 0x042c, 0x1) // SMI enable, lid edge polarity +Field(\EDGE, ByteAcc, NoLock, Preserve) { + , 1, // SMI enable (1 == enable) + , 1, // + , 1, // power button polarity (1 == falling) + , 1, // + , 1, // + , 1, // battery low enable (0 == enable) + , 1, // therm polarity (1 == falling) + LPOL, 1, // lid polarity (1 == falling) +}
OperationRegion(\Stus, SystemIO, 0x0430, 0x1) // Global Status Field(\Stus, ByteAcc, NoLock, Preserve) { @@ -199,15 +216,15 @@ Notify(_SB.PCI0,0x2) }
-// Method(_L08) { -// Notify(_SB.PCI0.VT86.EUR1, 0x2) -// Notify(_SB.PCI0.VT86.EUR2, 0x2) -// } - Method(_L09) { Notify(_SB.PCI0.VT86.PS2M, 0x02) //Internal Mouse Controller PME Status }
+ Method(_L0B) { // LID event + Not(LPOL, LPOL) // Flip the lid polarity bit + Notify(_SB.PCI0.LID, 0x80) + } + Method(_L0D) { Notify(_SB.PCI0.HDAC, 0x02) } @@ -2239,6 +2256,22 @@ } } // Device(P2PB)
+ Device (LID) { + Name (_HID, EisaId ("PNP0C0D")) + Name (_PRW, Package (0x02) { 0x0B, 0x04 }) // Event 0B, wakes from S4 + + Method(_LID) { + If (LPOL) { // Lid is open + UPUT (0x6c) // l + } Else { + UPUT (0x4c) // L + } + Store (Zero, GS11) // Clear lid + Return(LPOL) + } + + } // Device(LID) + Device(HDAC) { Name(_ADR, 0x00140000)
openfirmware@openfirmware.info