[coreboot-gerrit] New patch to review for coreboot: 894c656 mainboard/jetway/nf81-t56n-lf: Implement Super I/O DSDT
Edward O'Callaghan (eocallaghan@alterapraxis.com)
gerrit at coreboot.org
Mon Jun 2 08:14:33 CEST 2014
Edward O'Callaghan (eocallaghan at alterapraxis.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5917
-gerrit
commit 894c65617eb3e8bf6fd2e9604c99dcecb1bfa837
Author: Edward O'Callaghan <eocallaghan at alterapraxis.com>
Date: Mon Jun 2 16:13:18 2014 +1000
mainboard/jetway/nf81-t56n-lf: Implement Super I/O DSDT
NOTFORMERGE
Change-Id: Ica356352774f2d095faa3a7a7b3679db760b2ca5
Signed-off-by: Edward O'Callaghan <eocallaghan at alterapraxis.com>
---
src/mainboard/jetway/nf81-t56n-lf/acpi/superio.asl | 938 ++++++++++++++++++++-
1 file changed, 937 insertions(+), 1 deletion(-)
diff --git a/src/mainboard/jetway/nf81-t56n-lf/acpi/superio.asl b/src/mainboard/jetway/nf81-t56n-lf/acpi/superio.asl
index 6dcb877..e6dd158 100644
--- a/src/mainboard/jetway/nf81-t56n-lf/acpi/superio.asl
+++ b/src/mainboard/jetway/nf81-t56n-lf/acpi/superio.asl
@@ -19,4 +19,940 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "../../../../drivers/pc80/ps2_controller.asl"
+Name (SP1O, 0x2E)
+Name (IO1B, 0x0A00)
+Name (IO1L, 0x20)
+Name (IO2B, 0x0225)
+Name (IO2L, 0x10)
+Name (IO3B, Zero)
+Name (IO3L, Zero)
+Name (IOES, Zero)
+
+Device (SIO1)
+{
+ Name (_HID, EisaId ("PNP0C02")) // _HID: Hardware ID
+ Name (_UID, 0x0111) // _UID: Unique ID
+ Name (CRS, ResourceTemplate ()
+ {
+ IO (Decode16,
+ 0x0000, // Range Minimum
+ 0x0000, // Range Maximum
+ 0x00, // Alignment
+ 0x00, // Length
+ _Y15)
+ IO (Decode16,
+ 0x0000, // Range Minimum
+ 0x0000, // Range Maximum
+ 0x00, // Alignment
+ 0x00, // Length
+ _Y16)
+ IO (Decode16,
+ 0x0000, // Range Minimum
+ 0x0000, // Range Maximum
+ 0x00, // Alignment
+ 0x00, // Length
+ _Y17)
+ IO (Decode16,
+ 0x0000, // Range Minimum
+ 0x0000, // Range Maximum
+ 0x00, // Alignment
+ 0x00, // Length
+ )
+ })
+ Method (_CRS, 0, NotSerialized) // _CRS: Current Resource Settings
+ {
+ If (LAnd (LLess (SP1O, 0x03F0), LGreater (SP1O, 0xF0)))
+ {
+ CreateWordField (CRS, \_SB.PCI0.SBRG.SIO1._Y15._MIN, GPI0) // _MIN: Minimum Base Address
+ CreateWordField (CRS, \_SB.PCI0.SBRG.SIO1._Y15._MAX, GPI1) // _MAX: Maximum Base Address
+ CreateByteField (CRS, \_SB.PCI0.SBRG.SIO1._Y15._LEN, GPIL) // _LEN: Length
+ Store (SP1O, GPI0)
+ Store (SP1O, GPI1)
+ Store (0x02, GPIL)
+ }
+
+ If (IO1B)
+ {
+ CreateWordField (CRS, \_SB.PCI0.SBRG.SIO1._Y16._MIN, GP10) // _MIN: Minimum Base Address
+ CreateWordField (CRS, \_SB.PCI0.SBRG.SIO1._Y16._MAX, GP11) // _MAX: Maximum Base Address
+ CreateByteField (CRS, \_SB.PCI0.SBRG.SIO1._Y16._LEN, GPL1) // _LEN: Length
+ Store (IO1B, GP10)
+ Store (IO1B, GP11)
+ Store (IO1L, GPL1)
+ }
+
+ If (IO2B)
+ {
+ CreateWordField (CRS, \_SB.PCI0.SBRG.SIO1._Y17._MIN, GP20) // _MIN: Minimum Base Address
+ CreateWordField (CRS, \_SB.PCI0.SBRG.SIO1._Y17._MAX, GP21) // _MAX: Maximum Base Address
+ CreateByteField (CRS, \_SB.PCI0.SBRG.SIO1._Y17._LEN, GPL2) // _LEN: Length
+ Store (IO2B, GP20)
+ Store (IO2B, GP21)
+ Store (IO2L, GPL2)
+ }
+
+ If (IO3B)
+ {
+ CreateWordField (CRS, \_SB.PCI0.SBRG.SIO1._Y17._MIN, GP30) // _MIN: Minimum Base Address
+ CreateWordField (CRS, \_SB.PCI0.SBRG.SIO1._Y17._MAX, GP31) // _MAX: Maximum Base Address
+ CreateByteField (CRS, \_SB.PCI0.SBRG.SIO1._Y17._LEN, GPL3) // _LEN: Length
+ Store (IO3B, GP30)
+ Store (IO2B, GP31)
+ Store (IO3L, GPL3)
+ }
+
+ Return (CRS)
+ }
+
+ Name (DCAT, Package (0x15)
+ {
+ One,
+ 0x02,
+ 0x03,
+ Zero,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0x05,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0x05,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF,
+ 0xFF
+ })
+ Mutex (MUT0, 0x00)
+ Method (ENFG, 1, NotSerialized)
+ {
+ Acquire (MUT0, 0x0FFF)
+ Store (0x87, INDX)
+ Store (0x87, INDX)
+ Store (Arg0, LDN)
+ }
+
+ Method (EXFG, 0, NotSerialized)
+ {
+ Store (0xAA, INDX)
+ Release (MUT0)
+ }
+
+ Method (LPTM, 0, NotSerialized)
+ {
+ ENFG (CGLD (0x02))
+ And (OPT0, 0x02, Local0)
+ EXFG ()
+ Return (Local0)
+ }
+
+ Method (UHID, 1, NotSerialized)
+ {
+ ENFG (CGLD (Arg0))
+ And (OPT1, 0x80, Local0)
+ EXFG ()
+ If (Local0)
+ {
+ Return (0x1005D041)
+ }
+ Else
+ {
+ Return (0x0105D041)
+ }
+ }
+
+ OperationRegion (IOID, SystemIO, SP1O, 0x02)
+ Field (IOID, ByteAcc, NoLock, Preserve)
+ {
+ INDX, 8,
+ DATA, 8
+ }
+
+ IndexField (INDX, DATA, ByteAcc, NoLock, Preserve)
+ {
+ Offset (0x07),
+ LDN, 8,
+ Offset (0x21),
+ SCF1, 8,
+ SCF2, 8,
+ SCF3, 8,
+ SCF4, 8,
+ SCF5, 8,
+ SCF6, 8,
+ Offset (0x29),
+ CKCF, 8,
+ Offset (0x30),
+ ACTR, 8,
+ Offset (0x60),
+ IOAH, 8,
+ IOAL, 8,
+ IOH2, 8,
+ IOL2, 8,
+ Offset (0x70),
+ INTR, 8,
+ Offset (0x74),
+ DMCH, 8,
+ Offset (0xE0),
+ RGE0, 8,
+ RGE1, 8,
+ RGE2, 8,
+ RGE3, 8,
+ RGE4, 8,
+ RGE5, 8,
+ RGE6, 8,
+ RGE7, 8,
+ RGE8, 8,
+ RGE9, 8,
+ Offset (0xF0),
+ OPT0, 8,
+ OPT1, 8,
+ OPT2, 8,
+ OPT3, 8,
+ OPT4, 8,
+ OPT5, 8,
+ OPT6, 8,
+ OPT7, 8,
+ OPT8, 8,
+ OPT9, 8
+ }
+
+ OperationRegion (RNTR, SystemIO, IO2B, IO2L)
+ Field (RNTR, ByteAcc, NoLock, Preserve)
+ {
+ PMES, 8,
+ Offset (0x04),
+ PMEE, 1,
+ Offset (0x05),
+ Offset (0x08),
+ PMS3, 8,
+ PMS2, 8,
+ PMS1, 8,
+ Offset (0x0C),
+ PME3, 8,
+ PME2, 8,
+ PME1, 8
+ }
+
+ Method (CGLD, 1, NotSerialized)
+ {
+ Return (DerefOf (Index (DCAT, Arg0)))
+ }
+
+ Method (DSTA, 1, NotSerialized)
+ {
+ ENFG (CGLD (Arg0))
+ Store (ACTR, Local0)
+ EXFG ()
+ If (LEqual (Local0, 0xFF))
+ {
+ Return (Zero)
+ }
+
+ And (Local0, One, Local0)
+ If (LGreaterEqual (Arg0, 0x10))
+ {
+ Or (IOES, ShiftLeft (Local0, And (Arg0, 0x0F)), IOES)
+ }
+ Else
+ {
+ Or (IOST, ShiftLeft (Local0, Arg0), IOST)
+ }
+
+ If (Local0)
+ {
+ Return (0x0F)
+ }
+ Else
+ {
+ If (LGreaterEqual (Arg0, 0x10))
+ {
+ Store (IOES, Local0)
+ }
+ Else
+ {
+ Store (IOST, Local0)
+ }
+
+ And (Arg0, 0x0F, Local1)
+ If (And (ShiftLeft (One, Local1), Local0))
+ {
+ Return (0x0D)
+ }
+ Else
+ {
+ Return (Zero)
+ }
+ }
+ }
+
+ Method (DCNT, 2, NotSerialized)
+ {
+ ENFG (CGLD (Arg0))
+ If (LAnd (LLess (DMCH, 0x04), LNotEqual (And (DMCH, 0x03,
+ Local1), Zero)))
+ {
+ RDMA (Arg0, Arg1, Increment (Local1))
+ }
+
+ Store (Arg1, ACTR)
+ ShiftLeft (IOAH, 0x08, Local1)
+ Or (IOAL, Local1, Local1)
+ RRIO (Arg0, Arg1, Local1, 0x08)
+ EXFG ()
+ }
+
+ Name (CRS1, ResourceTemplate ()
+ {
+ IO (Decode16,
+ 0x0000, // Range Minimum
+ 0x0000, // Range Maximum
+ 0x01, // Alignment
+ 0x00, // Length
+ _Y1A)
+ IRQNoFlags (_Y18)
+ {}
+ DMA (Compatibility, NotBusMaster, Transfer8, _Y19)
+ {}
+ })
+ CreateWordField (CRS1, \_SB.PCI0.SBRG.SIO1._Y18._INT, IRQM) // _INT: Interrupts
+ CreateByteField (CRS1, \_SB.PCI0.SBRG.SIO1._Y19._DMA, DMAM) // _DMA: Direct Memory Access
+ CreateWordField (CRS1, \_SB.PCI0.SBRG.SIO1._Y1A._MIN, IO11) // _MIN: Minimum Base Address
+ CreateWordField (CRS1, \_SB.PCI0.SBRG.SIO1._Y1A._MAX, IO12) // _MAX: Maximum Base Address
+ CreateByteField (CRS1, \_SB.PCI0.SBRG.SIO1._Y1A._LEN, LEN1) // _LEN: Length
+ Name (CRS2, ResourceTemplate ()
+ {
+ IO (Decode16,
+ 0x0000, // Range Minimum
+ 0x0000, // Range Maximum
+ 0x01, // Alignment
+ 0x00, // Length
+ _Y1D)
+ IO (Decode16,
+ 0x0000, // Range Minimum
+ 0x0000, // Range Maximum
+ 0x01, // Alignment
+ 0x00, // Length
+ _Y1E)
+ IRQNoFlags (_Y1B)
+ {}
+ DMA (Compatibility, NotBusMaster, Transfer8, _Y1C)
+ {2}
+ })
+ CreateWordField (CRS2, \_SB.PCI0.SBRG.SIO1._Y1B._INT, IRQE) // _INT: Interrupts
+ CreateByteField (CRS2, \_SB.PCI0.SBRG.SIO1._Y1C._DMA, DMAE) // _DMA: Direct Memory Access
+ CreateWordField (CRS2, \_SB.PCI0.SBRG.SIO1._Y1D._MIN, IO21) // _MIN: Minimum Base Address
+ CreateWordField (CRS2, \_SB.PCI0.SBRG.SIO1._Y1D._MAX, IO22) // _MAX: Maximum Base Address
+ CreateByteField (CRS2, \_SB.PCI0.SBRG.SIO1._Y1D._LEN, LEN2) // _LEN: Length
+ CreateWordField (CRS2, \_SB.PCI0.SBRG.SIO1._Y1E._MIN, IO31) // _MIN: Minimum Base Address
+ CreateWordField (CRS2, \_SB.PCI0.SBRG.SIO1._Y1E._MAX, IO32) // _MAX: Maximum Base Address
+ CreateByteField (CRS2, \_SB.PCI0.SBRG.SIO1._Y1E._LEN, LEN3) // _LEN: Length
+ Name (CRS4, ResourceTemplate ()
+ {
+ IO (Decode16,
+ 0x0000, // Range Minimum
+ 0x0000, // Range Maximum
+ 0x01, // Alignment
+ 0x00, // Length
+ _Y20)
+ IRQ (Edge, ActiveLow, Shared, _Y1F)
+ {}
+ })
+ CreateWordField (CRS4, \_SB.PCI0.SBRG.SIO1._Y1F._INT, IRQL) // _INT: Interrupts
+ CreateWordField (CRS4, \_SB.PCI0.SBRG.SIO1._Y20._MIN, IOHL) // _MIN: Minimum Base Address
+ CreateWordField (CRS4, \_SB.PCI0.SBRG.SIO1._Y20._MAX, IORL) // _MAX: Maximum Base Address
+ CreateByteField (CRS4, \_SB.PCI0.SBRG.SIO1._Y20._ALN, ALMN) // _ALN: Alignment
+ CreateByteField (CRS4, \_SB.PCI0.SBRG.SIO1._Y20._LEN, LENG) // _LEN: Length
+ Method (DCRS, 2, NotSerialized)
+ {
+ ENFG (CGLD (Arg0))
+ ShiftLeft (IOAH, 0x08, IO11)
+ Or (IOAL, IO11, IO11)
+ Store (IO11, IO12)
+ Store (0x08, LEN1)
+ If (INTR)
+ {
+ ShiftLeft (One, INTR, IRQM)
+ }
+ Else
+ {
+ Store (Zero, IRQM)
+ }
+
+ If (LOr (LGreater (DMCH, 0x03), LEqual (Arg1, Zero)))
+ {
+ Store (Zero, DMAM)
+ }
+ Else
+ {
+ And (DMCH, 0x03, Local1)
+ ShiftLeft (One, Local1, DMAM)
+ }
+
+ EXFG ()
+ Return (CRS1)
+ }
+
+ Method (DCR2, 2, NotSerialized)
+ {
+ ENFG (CGLD (Arg0))
+ ShiftLeft (IOAH, 0x08, IO21)
+ Or (IOAL, IO21, IO21)
+ Store (IO21, IO22)
+ Store (0x08, LEN2)
+ ShiftLeft (IOH2, 0x08, IO31)
+ Or (IOL2, IO31, IO31)
+ Store (IO21, IO32)
+ Store (0x08, LEN3)
+ If (INTR)
+ {
+ ShiftLeft (One, INTR, IRQE)
+ }
+ Else
+ {
+ Store (Zero, IRQE)
+ }
+
+ If (LOr (LGreater (DMCH, 0x03), LEqual (Arg1, Zero)))
+ {
+ Store (Zero, DMAE)
+ }
+ Else
+ {
+ And (DMCH, 0x03, Local1)
+ ShiftLeft (One, Local1, DMAE)
+ }
+
+ EXFG ()
+ Return (CRS2)
+ }
+
+ Method (DCR4, 2, NotSerialized)
+ {
+ ENFG (CGLD (Arg0))
+ ShiftLeft (IOAH, 0x08, IOHL)
+ Or (IOAL, IOHL, IOHL)
+ Store (IOHL, IORL)
+ Store (0x08, LENG)
+ If (INTR)
+ {
+ And (INTR, 0x0F, INTR)
+ ShiftLeft (One, INTR, IRQL)
+ }
+ Else
+ {
+ Store (Zero, IRQL)
+ }
+
+ EXFG ()
+ Return (CRS4)
+ }
+
+ Method (DSRS, 2, NotSerialized)
+ {
+ If (LEqual (Arg1, 0x02))
+ {
+ If (LPTM ())
+ {
+ DSR2 (Arg0, Arg1)
+ }
+ }
+ Else
+ {
+ CreateWordField (Arg0, 0x09, IRQM)
+ CreateByteField (Arg0, 0x0C, DMAM)
+ CreateWordField (Arg0, 0x02, IO11)
+ ENFG (CGLD (Arg1))
+ And (IO11, 0xFF, IOAL)
+ ShiftRight (IO11, 0x08, IOAH)
+ If (IRQM)
+ {
+ FindSetRightBit (IRQM, Local0)
+ Subtract (Local0, One, INTR)
+ }
+ Else
+ {
+ Store (Zero, INTR)
+ }
+
+ If (DMAM)
+ {
+ FindSetRightBit (DMAM, Local0)
+ Subtract (Local0, One, DMCH)
+ }
+ Else
+ {
+ Store (0x04, DMCH)
+ }
+
+ EXFG ()
+ DCNT (Arg1, One)
+ Store (Arg1, Local2)
+ If (LGreater (Local2, Zero))
+ {
+ Subtract (Local2, One, Local2)
+ }
+ }
+ }
+
+ Method (DSR2, 2, NotSerialized)
+ {
+ CreateWordField (Arg0, 0x11, IRQT)
+ CreateByteField (Arg0, 0x14, DMAT)
+ CreateWordField (Arg0, 0x02, IOT1)
+ CreateWordField (Arg0, 0x0A, IOT2)
+ ENFG (CGLD (Arg1))
+ And (IOT1, 0xFF, IOAL)
+ ShiftRight (IOT1, 0x08, IOAH)
+ And (IOT2, 0xFF, IOL2)
+ ShiftRight (IOT2, 0x08, IOH2)
+ If (IRQT)
+ {
+ FindSetRightBit (IRQT, Local0)
+ Subtract (Local0, One, INTR)
+ }
+ Else
+ {
+ Store (Zero, INTR)
+ }
+
+ If (DMAT)
+ {
+ FindSetRightBit (DMAT, Local0)
+ Subtract (Local0, One, DMCH)
+ }
+ Else
+ {
+ Store (0x04, DMCH)
+ }
+
+ EXFG ()
+ DCNT (Arg1, One)
+ Store (Arg1, Local2)
+ If (LGreater (Local2, Zero))
+ {
+ Subtract (Local2, One, Local2)
+ }
+ }
+
+ Method (DSR4, 2, NotSerialized)
+ {
+ CreateWordField (Arg0, 0x02, IOHL)
+ CreateWordField (Arg0, 0x09, IRQL)
+ ENFG (CGLD (Arg1))
+ And (IOHL, 0xFF, IOAL)
+ ShiftRight (IOHL, 0x08, IOAH)
+ If (IRQL)
+ {
+ FindSetRightBit (IRQL, Local0)
+ Subtract (Local0, One, INTR)
+ }
+ Else
+ {
+ Store (Zero, INTR)
+ }
+
+ EXFG ()
+ DCNT (Arg1, One)
+ Store (Arg1, Local2)
+ If (LGreater (Local2, Zero))
+ {
+ Subtract (Local2, One, Local2)
+ }
+ }
+}
+
+Name (PMFG, Zero)
+Method (SIOS, 1, NotSerialized)
+{
+ Store ("SIOS", Debug)
+ ^SIO1.ENFG (0x06)
+ Or (^SIO1.RGE1, 0x20, ^SIO1.RGE1)
+}
+
+Method (SIOW, 1, NotSerialized)
+{
+ Store ("SIOW", Debug)
+}
+
+Device (PS2K)
+{
+ Name (_HID, EisaId ("PNP0303")) // _HID: Hardware ID
+ Name (_CID, EisaId ("PNP030B")) // _CID: Compatible ID
+ Method (_STA, 0, NotSerialized) // _STA: Status
+ {
+ If (And (IOST, 0x0400))
+ {
+ Return (0x0F)
+ }
+ Else
+ {
+ Return (Zero)
+ }
+ }
+
+ Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings
+ {
+ IO (Decode16,
+ 0x0060, // Range Minimum
+ 0x0060, // Range Maximum
+ 0x00, // Alignment
+ 0x01, // Length
+ )
+ IO (Decode16,
+ 0x0064, // Range Minimum
+ 0x0064, // Range Maximum
+ 0x00, // Alignment
+ 0x01, // Length
+ )
+ IRQNoFlags ()
+ {1}
+ })
+ Name (_PRS, ResourceTemplate () // _PRS: Possible Resource Settings
+ {
+ StartDependentFn (0x00, 0x00)
+ {
+ FixedIO (
+ 0x0060, // Address
+ 0x01, // Length
+ )
+ FixedIO (
+ 0x0064, // Address
+ 0x01, // Length
+ )
+ IRQNoFlags ()
+ {1}
+ }
+ EndDependentFn ()
+ })
+ Method (_PSW, 1, NotSerialized) // _PSW: Power State Wake
+ {
+ Store (Arg0, KBFG)
+ }
+}
+
+Scope (\)
+{
+ Name (KBFG, One)
+}
+
+Method (PS2K._PRW, 0, NotSerialized) // _PRW: Power Resources for Wake
+{
+ Return (GPRW (0x1D, 0x03))
+}
+
+Device (PS2M)
+{
+ Name (_HID, EisaId ("PNP0F03")) // _HID: Hardware ID
+ Name (_CID, EisaId ("PNP0F13")) // _CID: Compatible ID
+ Method (_STA, 0, NotSerialized) // _STA: Status
+ {
+ If (And (IOST, 0x4000))
+ {
+ Return (0x0F)
+ }
+ Else
+ {
+ Return (Zero)
+ }
+ }
+
+ Name (CRS1, ResourceTemplate ()
+ {
+ IRQNoFlags ()
+ {12}
+ })
+ Name (CRS2, ResourceTemplate ()
+ {
+ IO (Decode16,
+ 0x0060, // Range Minimum
+ 0x0060, // Range Maximum
+ 0x00, // Alignment
+ 0x01, // Length
+ )
+ IO (Decode16,
+ 0x0064, // Range Minimum
+ 0x0064, // Range Maximum
+ 0x00, // Alignment
+ 0x01, // Length
+ )
+ IRQNoFlags ()
+ {12}
+ })
+ Method (_CRS, 0, NotSerialized) // _CRS: Current Resource Settings
+ {
+ If (And (IOST, 0x0400))
+ {
+ Return (CRS1)
+ }
+ Else
+ {
+ Return (CRS2)
+ }
+ }
+
+ Name (_PRS, ResourceTemplate () // _PRS: Possible Resource Settings
+ {
+ StartDependentFn (0x00, 0x00)
+ {
+ IRQNoFlags ()
+ {12}
+ }
+ EndDependentFn ()
+ })
+ Method (_PSW, 1, NotSerialized) // _PSW: Power State Wake
+ {
+ Store (Arg0, MSFG)
+ }
+}
+
+Scope (\)
+{
+ Name (MSFG, One)
+}
+
+Method (PS2M._PRW, 0, NotSerialized) // _PRW: Power Resources for Wake
+{
+ Return (GPRW (0x1D, 0x03))
+}
+
+Device (UAR1)
+{
+ Name (_HID, EisaId ("PNP0501")) // _HID: Hardware ID
+ Name (_UID, One) // _UID: Unique ID
+ Method (_STA, 0, NotSerialized) // _STA: Status
+ {
+ Return (^^SIO1.DSTA (Zero))
+ }
+
+ Method (_DIS, 0, NotSerialized) // _DIS: Disable Device
+ {
+ ^^SIO1.DCNT (Zero, Zero)
+ }
+
+ Method (_CRS, 0, NotSerialized) // _CRS: Current Resource Settings
+ {
+ Return (^^SIO1.DCRS (Zero, Zero))
+ }
+
+ Method (_SRS, 1, NotSerialized) // _SRS: Set Resource Settings
+ {
+ ^^SIO1.DSRS (Arg0, Zero)
+ }
+
+ Name (_PRS, ResourceTemplate () // _PRS: Possible Resource Settings
+ {
+ StartDependentFn (0x00, 0x00)
+ {
+ IO (Decode16,
+ 0x03F8, // Range Minimum
+ 0x03F8, // Range Maximum
+ 0x01, // Alignment
+ 0x08, // Length
+ )
+ IRQNoFlags ()
+ {4}
+ DMA (Compatibility, NotBusMaster, Transfer8, )
+ {}
+ }
+ StartDependentFnNoPri ()
+ {
+ IO (Decode16,
+ 0x03F8, // Range Minimum
+ 0x03F8, // Range Maximum
+ 0x01, // Alignment
+ 0x08, // Length
+ )
+ IRQNoFlags ()
+ {3,4,5,6,7,9,10,11,12}
+ DMA (Compatibility, NotBusMaster, Transfer8, )
+ {}
+ }
+ StartDependentFnNoPri ()
+ {
+ IO (Decode16,
+ 0x02F8, // Range Minimum
+ 0x02F8, // Range Maximum
+ 0x01, // Alignment
+ 0x08, // Length
+ )
+ IRQNoFlags ()
+ {3,4,5,6,7,9,10,11,12}
+ DMA (Compatibility, NotBusMaster, Transfer8, )
+ {}
+ }
+ StartDependentFnNoPri ()
+ {
+ IO (Decode16,
+ 0x03E8, // Range Minimum
+ 0x03E8, // Range Maximum
+ 0x01, // Alignment
+ 0x08, // Length
+ )
+ IRQNoFlags ()
+ {3,4,5,6,7,9,10,11,12}
+ DMA (Compatibility, NotBusMaster, Transfer8, )
+ {}
+ }
+ StartDependentFnNoPri ()
+ {
+ IO (Decode16,
+ 0x02E8, // Range Minimum
+ 0x02E8, // Range Maximum
+ 0x01, // Alignment
+ 0x08, // Length
+ )
+ IRQNoFlags ()
+ {3,4,5,6,7,9,10,11,12}
+ DMA (Compatibility, NotBusMaster, Transfer8, )
+ {}
+ }
+ EndDependentFn ()
+ })
+}
+
+Device (CIR)
+{
+ Name (_UID, Zero) // _UID: Unique ID
+ Name (_HID, EisaId ("FIT0002")) // _HID: Hardware ID
+ Method (_STA, 0, NotSerialized) // _STA: Status
+ {
+ Return (IRST (0x08))
+ }
+
+ Method (_DIS, 0, NotSerialized) // _DIS: Disable Device
+ {
+ ^^SIO1.DCNT (0x08, Zero)
+ }
+
+ Method (_CRS, 0, NotSerialized) // _CRS: Current Resource Settings
+ {
+ Return (IRCR (0x08))
+ }
+
+ Method (_SRS, 1, NotSerialized) // _SRS: Set Resource Settings
+ {
+ IRSR (Arg0, 0x08)
+ }
+
+ Method (IRST, 1, NotSerialized)
+ {
+ ^^SIO1.ENFG (^^SIO1.CGLD (Arg0))
+ If (^^SIO1.ACTR)
+ {
+ Store (0x0F, Local0)
+ }
+ Else
+ {
+ If (^^SIO1.IOAH)
+ {
+ Store (0x0D, Local0)
+ }
+ Else
+ {
+ Store (Zero, Local0)
+ }
+ }
+
+ ^^SIO1.EXFG ()
+ Return (Local0)
+ }
+
+ Name (_PRS, ResourceTemplate () // _PRS: Possible Resource Settings
+ {
+ StartDependentFn (0x00, 0x00)
+ {
+ IO (Decode16,
+ 0x4700, // Range Minimum
+ 0x4700, // Range Maximum
+ 0x08, // Alignment
+ 0x08, // Length
+ )
+ IRQNoFlags ()
+ {5}
+ }
+ StartDependentFnNoPri ()
+ {
+ IO (Decode16,
+ 0x4700, // Range Minimum
+ 0x4700, // Range Maximum
+ 0x08, // Alignment
+ 0x08, // Length
+ )
+ IRQNoFlags ()
+ {3,4,5,6,7,9,10,11,12}
+ }
+ StartDependentFnNoPri ()
+ {
+ IO (Decode16,
+ 0x02E0, // Range Minimum
+ 0x02E0, // Range Maximum
+ 0x08, // Alignment
+ 0x08, // Length
+ )
+ IRQNoFlags ()
+ {3,4,5,6,7,9,10,11,12}
+ }
+ StartDependentFnNoPri ()
+ {
+ IO (Decode16,
+ 0x0298, // Range Minimum
+ 0x0298, // Range Maximum
+ 0x08, // Alignment
+ 0x08, // Length
+ )
+ IRQNoFlags ()
+ {3,4,5,6,7,9,10,11,12}
+ }
+ EndDependentFn ()
+ })
+ Name (PBUF, ResourceTemplate ()
+ {
+ IO (Decode16,
+ 0x0000, // Range Minimum
+ 0x0000, // Range Maximum
+ 0x01, // Alignment
+ 0x08, // Length
+ _Y21)
+ IRQNoFlags ()
+ {0}
+ })
+ Method (IRCR, 1, NotSerialized)
+ {
+ CreateByteField (PBUF, \_SB.PCI0.SBRG.CIR._Y21._MIN, IOLO) // _MIN: Minimum Base Address
+ CreateByteField (PBUF, 0x03, IOHI)
+ CreateWordField (PBUF, \_SB.PCI0.SBRG.CIR._Y21._MIN, IOHL) // _MIN: Minimum Base Address
+ CreateWordField (PBUF, \_SB.PCI0.SBRG.CIR._Y21._MAX, IORL) // _MAX: Maximum Base Address
+ CreateByteField (PBUF, \_SB.PCI0.SBRG.CIR._Y21._ALN, ALMN) // _ALN: Alignment
+ CreateByteField (PBUF, \_SB.PCI0.SBRG.CIR._Y21._LEN, LENG) // _LEN: Length
+ CreateWordField (PBUF, 0x05, IRQL)
+ ^^SIO1.ENFG (^^SIO1.CGLD (Arg0))
+ Store (^^SIO1.IOAH, IOHI)
+ Store (^^SIO1.IOAL, IOLO)
+ Store (IOHL, IORL)
+ Store (One, ALMN)
+ Store (0x08, LENG)
+ Store (One, Local0)
+ ShiftLeft (Local0, ^^SIO1.INTR, IRQL)
+ ^^SIO1.EXFG ()
+ Return (PBUF)
+ }
+
+ Method (IRSR, 2, NotSerialized)
+ {
+ CreateByteField (Arg0, 0x02, POLB)
+ CreateByteField (Arg0, 0x03, POHB)
+ CreateWordField (Arg0, 0x05, PIRQ)
+ ^^SIO1.ENFG (^^SIO1.CGLD (Arg1))
+ Store (POLB, ^^SIO1.IOAL)
+ Store (POHB, ^^SIO1.IOAH)
+ FindSetRightBit (PIRQ, Local0)
+ Subtract (Local0, One, ^^SIO1.INTR)
+ Store (One, ^^SIO1.ACTR)
+ ^^SIO1.EXFG ()
+ }
+}
More information about the coreboot-gerrit
mailing list