device: Clear lane error status

Refer to PCI Express Base rev6.0 v1.0, 4.2.7 Link Training and Status
State Rules, Lane Error Status is normal to record the error when link
training. To make sure Lane Error Status is correct in OS runtime,
add a Kconfig PCIEXP_LANE_ERR_STAT_CLEAR that clears the PCIe lane error
status register at the end of PCIe link training.

Test=On Crater Lake, lspci -vvv shows
bb:01.0 PCI bridge: Intel Corporation Device 352a (rev 03)
(prog-if 00 [Normal decode])
Capabilities: [a30 v1] Secondary PCI Express
	LnkCtl3: LnkEquIntrruptEn- PerformEqu-
	LaneErrStat: LaneErr at lane: 0

Signed-off-by: Wilson Chou <Wilson.Chou@quantatw.com>
Change-Id: I6344223636409d8fc25e365a6375fc81e69f41a5
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67264
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jonathan Zhang <jonzhang@fb.com>
diff --git a/src/include/device/pci_def.h b/src/include/device/pci_def.h
index 0eedd51..64c1ac2 100644
--- a/src/include/device/pci_def.h
+++ b/src/include/device/pci_def.h
@@ -469,6 +469,11 @@
 #define  PCIE_EXT_CAP_LTR_ID		 0x0018
 #define  PCIE_EXT_CAP_RESIZABLE_BAR	 0x0015
 
+/* Secondary PCI Express Extended Capability Structure */
+#define PCI_EXP_SEC_CAP_ID	0x19
+#define PCI_EXP_SEC_LNK_CTL3	4	/* Link Control 3 */
+#define PCI_EXP_SEC_LANE_ERR_STATUS	8	/* Lane Error Status */
+
 /* Advanced Error Reporting */
 #define PCI_ERR_UNCOR_STATUS	4	/* Uncorrectable Error Status */
 #define  PCI_ERR_UNC_TRAIN	0x00000001	/* Training */