drivers/genesyslogic/gl9763e: Mask replay timer timeout of AER

Due to a flaw in the hardware design, the GL9763e replay timer
frequently times out when ASPM is enabled. As a result, the warning
messages will often appear in the system log when the system accesses
the GL9763e PCI config. Therefore, the replay timer timeout must be
masked.

BUG=b:428025481

Sample output on screen:
PCIe Bus Error: severity=Corrected, type=Data Link Layer
device [17a0:e763] error status/mask=00001000/00002000
 [12] Timeout

Change-Id: I6f921f40f169d7811b7bd51145023b549e8aee1c
Signed-off-by: Victor Shih <victorshihgli@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88291
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: David Hendricks <david.hendricks@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Victor Shih 2025-07-03 12:27:46 +00:00 committed by Matt DeVillier
commit 79bd154b49

View file

@ -5,13 +5,15 @@
#include <console/console.h>
#include <device/device.h>
#include <device/pci.h>
#include <device/pciexp.h>
#include <device/pci_ops.h>
#include <device/pci_ids.h>
#include "gl9763e.h"
static void gl9763e_init(struct device *dev)
{
uint32_t ver;
uint32_t ver, value;
int aer;
printk(BIOS_INFO, "GL9763E: init\n");
pci_dev_init(dev);
@ -41,6 +43,13 @@ static void gl9763e_init(struct device *dev)
pci_update_config32(dev, SD_CLKRX_DLY, ~HS400_RX_DELAY_MASK, HS400_RX_DELAY);
/* Disable Slow mode */
pci_and_config32(dev, EMMC_CTL, ~SLOW_MODE);
/* mask the replay timer timeout of AER */
aer = pciexp_find_extended_cap(dev, PCI_EXT_CAP_ID_ERR, 0);
if (aer) {
value = pci_read_config32(dev, aer + PCI_ERR_COR_MASK);
value |= PCI_ERR_COR_REP_TIMER;
pci_write_config32(dev, aer + PCI_ERR_COR_MASK, value);
}
/* Set VHS to read-only */
pci_update_config32(dev, VHS, ~VHS_REV_MASK, VHS_REV_R);
}