diff options
author | Furquan Shaikh <furquan@google.com> | 2021-06-18 23:18:42 +0000 |
---|---|---|
committer | Nico Huber <nico.h@gmx.de> | 2021-08-24 10:02:15 +0000 |
commit | 27c51a07236ab5133d1052251337e0465a33caf7 (patch) | |
tree | ef6ec6c5dcd565f15ea98b14a318eb2dab6d5406 /src/soc/intel/broadwell/pch/acpi/serialio.asl | |
parent | 93078ba1ae144304a19c83ae7d565cb2c39c1d15 (diff) |
Revert "soc/intel/broadwell/pch: Replace ACPI device NVS"
This reverts commit 68d8357dab55660058ad1ab8dca34fd03e0adbb5.
Reason for revert: Device NVS is expected by mainboard samus
in payload depthcharge:
https://chromium.googlesource.com/chromiumos/platform/depthcharge/+/932c6ba2704987c0db64dbdfe03c158482c7ab11/src/board/samus/board.c#60
Signed-off-by: Furquan Shaikh <furquan@google.com>
Change-Id: Icb5fa6da3412a51aae56c3658163e5b98d57bab3
Reviewed-on: https://review.coreboot.org/c/coreboot/+/54977
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'src/soc/intel/broadwell/pch/acpi/serialio.asl')
-rw-r--r-- | src/soc/intel/broadwell/pch/acpi/serialio.asl | 153 |
1 files changed, 121 insertions, 32 deletions
diff --git a/src/soc/intel/broadwell/pch/acpi/serialio.asl b/src/soc/intel/broadwell/pch/acpi/serialio.asl index 85c7cf544f..183bca6d55 100644 --- a/src/soc/intel/broadwell/pch/acpi/serialio.asl +++ b/src/soc/intel/broadwell/pch/acpi/serialio.asl @@ -5,34 +5,27 @@ // Serial IO Device BAR0 and BAR1 is 4KB #define SIO_BAR_LEN 0x1000 -// 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) +// 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 +} // Serial IO Resource Consumption for BAR1 Device (SIOR) @@ -203,7 +196,7 @@ Device (I2C0) } // Check if Serial IO DMA Controller is enabled - If (\S0EN != 0) { + If (\_SB.PCI0.SDMA._STA != 0) { Return (ConcatenateResTemplate (RBUF, DBUF)) } Else { Return (RBUF) @@ -218,6 +211,22 @@ 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) @@ -263,7 +272,7 @@ Device (I2C1) } // Check if Serial IO DMA Controller is enabled - If (\S0EN != 0) { + If (\_SB.PCI0.SDMA._STA != 0) { Return (ConcatenateResTemplate (RBUF, DBUF)) } Else { Return (RBUF) @@ -278,6 +287,22 @@ 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) @@ -323,6 +348,22 @@ 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) @@ -365,7 +406,7 @@ Device (SPI1) } // Check if Serial IO DMA Controller is enabled - If (\S0EN != 0) { + If (\_SB.PCI0.SDMA._STA != 0) { Return (ConcatenateResTemplate (RBUF, DBUF)) } Else { Return (RBUF) @@ -380,6 +421,22 @@ 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) @@ -422,7 +479,7 @@ Device (UAR0) } // Check if Serial IO DMA Controller is enabled - If (\S0EN != 0) { + If (\_SB.PCI0.SDMA._STA != 0) { Return (ConcatenateResTemplate (RBUF, DBUF)) } Else { Return (RBUF) @@ -437,6 +494,22 @@ 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) @@ -482,6 +555,22 @@ 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) |