Model the device enable bits as fields so they can be accessed
directly by name.

Signed-off-by: Gerd Hoffmann <[email protected]>
---
 src/acpi-dsdt.dsl |   41 +++++++++++++++++++++++------------------
 1 files changed, 23 insertions(+), 18 deletions(-)

diff --git a/src/acpi-dsdt.dsl b/src/acpi-dsdt.dsl
index 6912fac..abc3d41 100644
--- a/src/acpi-dsdt.dsl
+++ b/src/acpi-dsdt.dsl
@@ -232,7 +232,15 @@ DefinitionBlock (
                Name (_HID, EisaId ("PNP0700"))
                Method (_STA, 0, NotSerialized)
                {
-                   Return (0x0F)
+                    Store (\_SB.PCI0.PX13.FDEN, Local0)
+                    If (LEqual (Local0, 0))
+                    {
+                         Return (0x00)
+                    }
+                    Else
+                    {
+                         Return (0x0F)
+                    }
                }
                Method (_CRS, 0, NotSerialized)
                {
@@ -253,8 +261,7 @@ DefinitionBlock (
                Name (_HID, EisaId ("PNP0400"))
                Method (_STA, 0, NotSerialized)
                {
-                   Store (\_SB.PCI0.PX13.DRSA, Local0)
-                   And (Local0, 0x80000000, Local0)
+                   Store (\_SB.PCI0.PX13.LPEN, Local0)
                    If (LEqual (Local0, 0))
                    {
                        Return (0x00)
@@ -282,8 +289,7 @@ DefinitionBlock (
                Name (_UID, 0x01)
                Method (_STA, 0, NotSerialized)
                {
-                   Store (\_SB.PCI0.PX13.DRSC, Local0)
-                   And (Local0, 0x08000000, Local0)
+                   Store (\_SB.PCI0.PX13.CAEN, Local0)
                    If (LEqual (Local0, 0))
                    {
                        Return (0x00)
@@ -310,8 +316,7 @@ DefinitionBlock (
                Name (_UID, 0x02)
                Method (_STA, 0, NotSerialized)
                {
-                   Store (\_SB.PCI0.PX13.DRSC, Local0)
-                   And (Local0, 0x80000000, Local0)
+                   Store (\_SB.PCI0.LPC.CBEN, Local0)
                    If (LEqual (Local0, 0))
                    {
                        Return (0x00)
@@ -342,19 +347,19 @@ DefinitionBlock (
         Device (PX13) {
            Name (_ADR, 0x00010003)
 
-           OperationRegion (P13C, PCI_Config, 0x5c, 0x24)
-           Field (P13C, DWordAcc, NoLock, Preserve)
+           OperationRegion (P13C, PCI_Config, 0x00, 0xff)
+           Field (P13C, AnyAcc, NoLock, Preserve)
            {
-               DRSA, 32,
-               DRSB, 32,
-               DRSC, 32,
-               DRSE, 32,
-               DRSF, 32,
-               DRSG, 32,
-               DRSH, 32,
-               DRSI, 32,
-               DRSJ, 32
+                Offset(0x5f),
+               , 7,
+               LPEN, 1,         // LPT
+                Offset(0x67),
+               , 3,
+               CAEN, 1,         // COM1
+               , 3,
+               CBEN, 1,         // COM2
            }
+           Name (FDEN, 1)
        }
     }
 
-- 
1.7.1


_______________________________________________
SeaBIOS mailing list
[email protected]
http://www.seabios.org/mailman/listinfo/seabios

Reply via email to