summaryrefslogtreecommitdiff
path: root/src/soc/intel/broadwell/pch/acpi/serialio.asl
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/intel/broadwell/pch/acpi/serialio.asl')
-rw-r--r--src/soc/intel/broadwell/pch/acpi/serialio.asl153
1 files changed, 32 insertions, 121 deletions
diff --git a/src/soc/intel/broadwell/pch/acpi/serialio.asl b/src/soc/intel/broadwell/pch/acpi/serialio.asl
index 183bca6d55..85c7cf544f 100644
--- a/src/soc/intel/broadwell/pch/acpi/serialio.asl
+++ b/src/soc/intel/broadwell/pch/acpi/serialio.asl
@@ -5,27 +5,34 @@
// Serial IO Device BAR0 and BAR1 is 4KB
#define SIO_BAR_LEN 0x1000
-// Put SerialIO device in D0 state
-// Arg0 - Ref to offset 0x84 of device's PCI config space
-Method (LPD0, 1, Serialized)
-{
- Arg0 = DeRefOf (Arg0) & 0xFFFFFFFC
- Local0 = DeRefOf (Arg0) // Read back after writing
-
- // Use Local0 to avoid iasl warning: Method Local is set but never used
- Local0 &= Ones
-}
-
-// Put SerialIO device in D3 state
-// Arg0 - Ref to offset 0x84 of device's PCI config space
-Method (LPD3, 1, Serialized)
-{
- Arg0 = DeRefOf (Arg0) | 0x3
- Local0 = DeRefOf (Arg0) // Read back after writing
-
- // Use Local0 to avoid iasl warning: Method Local is set but never used
- Local0 &= Ones
-}
+// This is defined in SSDT2 which is generated at boot based
+// on whether or not the device is enabled in ACPI mode.
+External (\S0EN)
+External (\S1EN)
+External (\S2EN)
+External (\S3EN)
+External (\S4EN)
+External (\S5EN)
+External (\S6EN)
+External (\S7EN)
+
+External (\S0B0)
+External (\S1B0)
+External (\S2B0)
+External (\S3B0)
+External (\S4B0)
+External (\S5B0)
+External (\S6B0)
+External (\S7B0)
+
+External (\S0B1)
+External (\S1B1)
+External (\S2B1)
+External (\S3B1)
+External (\S4B1)
+External (\S5B1)
+External (\S6B1)
+External (\S7B1)
// Serial IO Resource Consumption for BAR1
Device (SIOR)
@@ -196,7 +203,7 @@ Device (I2C0)
}
// Check if Serial IO DMA Controller is enabled
- If (\_SB.PCI0.SDMA._STA != 0) {
+ If (\S0EN != 0) {
Return (ConcatenateResTemplate (RBUF, DBUF))
} Else {
Return (RBUF)
@@ -211,22 +218,6 @@ Device (I2C0)
Return (0xF)
}
}
-
- OperationRegion (SPRT, SystemMemory, \S1B1 + 0x84, 4)
- Field (SPRT, DWordAcc, NoLock, Preserve)
- {
- SPCS, 32
- }
-
- Method (_PS0, 0, Serialized)
- {
- ^^LPD0 (RefOf (SPCS))
- }
-
- Method (_PS3, 0, Serialized)
- {
- ^^LPD3 (RefOf (SPCS))
- }
}
Device (I2C1)
@@ -272,7 +263,7 @@ Device (I2C1)
}
// Check if Serial IO DMA Controller is enabled
- If (\_SB.PCI0.SDMA._STA != 0) {
+ If (\S0EN != 0) {
Return (ConcatenateResTemplate (RBUF, DBUF))
} Else {
Return (RBUF)
@@ -287,22 +278,6 @@ Device (I2C1)
Return (0xF)
}
}
-
- OperationRegion (SPRT, SystemMemory, \S2B1 + 0x84, 4)
- Field (SPRT, DWordAcc, NoLock, Preserve)
- {
- SPCS, 32
- }
-
- Method (_PS0, 0, Serialized)
- {
- ^^LPD0 (RefOf (SPCS))
- }
-
- Method (_PS3, 0, Serialized)
- {
- ^^LPD3 (RefOf (SPCS))
- }
}
Device (SPI0)
@@ -348,22 +323,6 @@ Device (SPI0)
Return (0xF)
}
}
-
- OperationRegion (SPRT, SystemMemory, \S3B1 + 0x84, 4)
- Field (SPRT, DWordAcc, NoLock, Preserve)
- {
- SPCS, 32
- }
-
- Method (_PS0, 0, Serialized)
- {
- ^^LPD0 (RefOf (SPCS))
- }
-
- Method (_PS3, 0, Serialized)
- {
- ^^LPD3 (RefOf (SPCS))
- }
}
Device (SPI1)
@@ -406,7 +365,7 @@ Device (SPI1)
}
// Check if Serial IO DMA Controller is enabled
- If (\_SB.PCI0.SDMA._STA != 0) {
+ If (\S0EN != 0) {
Return (ConcatenateResTemplate (RBUF, DBUF))
} Else {
Return (RBUF)
@@ -421,22 +380,6 @@ Device (SPI1)
Return (0xF)
}
}
-
- OperationRegion (SPRT, SystemMemory, \S4B1 + 0x84, 4)
- Field (SPRT, DWordAcc, NoLock, Preserve)
- {
- SPCS, 32
- }
-
- Method (_PS0, 0, Serialized)
- {
- ^^LPD0 (RefOf (SPCS))
- }
-
- Method (_PS3, 0, Serialized)
- {
- ^^LPD3 (RefOf (SPCS))
- }
}
Device (UAR0)
@@ -479,7 +422,7 @@ Device (UAR0)
}
// Check if Serial IO DMA Controller is enabled
- If (\_SB.PCI0.SDMA._STA != 0) {
+ If (\S0EN != 0) {
Return (ConcatenateResTemplate (RBUF, DBUF))
} Else {
Return (RBUF)
@@ -494,22 +437,6 @@ Device (UAR0)
Return (0xF)
}
}
-
- OperationRegion (SPRT, SystemMemory, \S5B1 + 0x84, 4)
- Field (SPRT, DWordAcc, NoLock, Preserve)
- {
- SPCS, 32
- }
-
- Method (_PS0, 0, Serialized)
- {
- ^^LPD0 (RefOf (SPCS))
- }
-
- Method (_PS3, 0, Serialized)
- {
- ^^LPD3 (RefOf (SPCS))
- }
}
Device (UAR1)
@@ -555,22 +482,6 @@ Device (UAR1)
Return (0xF)
}
}
-
- OperationRegion (SPRT, SystemMemory, \S6B1 + 0x84, 4)
- Field (SPRT, DWordAcc, NoLock, Preserve)
- {
- SPCS, 32
- }
-
- Method (_PS0, 0, Serialized)
- {
- ^^LPD0 (RefOf (SPCS))
- }
-
- Method (_PS3, 0, Serialized)
- {
- ^^LPD3 (RefOf (SPCS))
- }
}
Device (SDIO)