Skip to content

Commit d24e3fa

Browse files
Hans Zhangbjorn-helgaas
authored andcommitted
PCI: mediatek-gen3: Add 100 ms delay after link up
The MediaTek Gen3 PCIe host driver lacks the required 100 ms delay after link training completes for speeds > 5.0 GT/s, as specified in PCIe r6.0 sec 6.6.1. The driver already stores max_link_speed (from the device tree). After mtk_pcie_startup_port() successfully brings up the link, call pci_host_common_link_train_delay() to comply with the specification. Signed-off-by: Hans Zhang <18255117159@163.com> Signed-off-by: Manivannan Sadhasivam <mani@kernel.org> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Link: https://patch.msgid.link/20260518004246.1384532-7-18255117159@163.com
1 parent 6bba1de commit d24e3fa

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

drivers/pci/controller/pcie-mediatek-gen3.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#include <linux/regmap.h>
3131
#include <linux/reset.h>
3232

33+
#include "pci-host-common.h"
3334
#include "../pci.h"
3435

3536
#define PCIE_BASE_CFG_REG 0x14
@@ -570,6 +571,8 @@ static int mtk_pcie_startup_port(struct mtk_gen3_pcie *pcie)
570571
goto err_power_down_device;
571572
}
572573

574+
pci_host_common_link_train_delay(pcie->max_link_speed);
575+
573576
return 0;
574577

575578
err_power_down_device:

0 commit comments

Comments
 (0)