lynxpoint/broadwell: Correct L1 exit latency with ASPM

Lynx Point PCH reference code version 1.9.1 programs the larger L1 exit
latency when ASPM is enabled. Document 535127 (BDW PCH-LP BS) also does
the same. Correct the condition accordingly. On Lynx Point, also remove
a now-redundant write to the LCAP register (offset 0x4c).

Change-Id: I2166bd5b5504ed97adcd2db0a802da02da4c91f3
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57501
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Angel Pons 2021-09-08 14:30:07 +02:00 committed by Matt DeVillier
parent ebba6da073
commit fd46b497ea
2 changed files with 2 additions and 5 deletions

View File

@ -522,7 +522,7 @@ static void pch_pcie_early(struct device *dev)
pci_update_config32(dev, 0x318, ~(0xffff << 16), (0x1414 << 16));
/* Set L1 exit latency in LCAP register. */
if (!do_aspm && (pci_read_config8(dev, 0xf5) & 0x1))
if ((pci_read_config8(dev, 0xf5) & 0x1) || do_aspm)
pci_update_config32(dev, 0x4c, ~(0x7 << 15), (0x4 << 15));
else
pci_update_config32(dev, 0x4c, ~(0x7 << 15), (0x2 << 15));

View File

@ -570,9 +570,6 @@ static void pch_pcie_early(struct device *dev)
/* Set unique clock exit latency in MPC register. */
pci_update_config32(dev, 0xd8, ~(0x7 << 18), (0x7 << 18));
/* Set L1 exit latency in LCAP register. */
pci_update_config32(dev, 0x4c, ~(0x7 << 15), (0x4 << 15));
if (is_lp) {
switch (rp) {
case 1:
@ -650,7 +647,7 @@ static void pch_pcie_early(struct device *dev)
pci_update_config32(dev, 0x318, ~(0xffff << 16), (0x1414 << 16));
/* Set L1 exit latency in LCAP register. */
if (!do_aspm && (pci_read_config8(dev, 0xf5) & 0x1))
if ((pci_read_config8(dev, 0xf5) & 0x1) || do_aspm)
pci_update_config32(dev, 0x4c, ~(0x7 << 15), (0x4 << 15));
else
pci_update_config32(dev, 0x4c, ~(0x7 << 15), (0x2 << 15));