File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 31
31
#include <linux/of_irq.h>
32
32
#include <linux/pci-ecam.h>
33
33
34
+ static int link_up_timeout = 500 ;
35
+ module_param (link_up_timeout , int , 0644 );
36
+ MODULE_PARM_DESC (link_up_timeout , "PCIe link training timeout in milliseconds" );
37
+
34
38
#define CORE_RC_PHYIF_CTL 0x00024
35
39
#define CORE_RC_PHYIF_CTL_RUN BIT(0)
36
40
#define CORE_RC_PHYIF_STAT 0x00028
@@ -738,7 +742,7 @@ static int apple_pcie_setup_port(struct apple_pcie *pcie,
738
742
/* start link training */
739
743
writel_relaxed (PORT_LTSSMCTL_START , port -> base + PORT_LTSSMCTL );
740
744
741
- if (!wait_for_completion_timeout (& pcie -> event , HZ / 10 ))
745
+ if (!wait_for_completion_timeout (& pcie -> event , link_up_timeout * HZ / 1000 ))
742
746
dev_warn (pcie -> dev , "%pOF link didn't come up\n" , np );
743
747
744
748
if (pcie -> hw -> port_refclk )
You can’t perform that action at this time.
0 commit comments