]>
Commit | Line | Data |
---|---|---|
95f9d935 AF |
1 | From 828dc7d5beca4c10db50330d1858cd70588bff5d Mon Sep 17 00:00:00 2001 |
2 | From: Arne Fitzenreiter <arne_f@ipfire.org> | |
3 | Date: Sat, 5 Feb 2022 15:35:57 +0000 | |
4 | Subject: [PATCH 6/8] pcie-rockchip-host: try again if training fail. | |
5 | ||
6 | on NanoPi R4S the training of the pcie often fails at first try | |
7 | so this try again some times. | |
8 | ||
9 | Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org> | |
10 | --- | |
11 | drivers/pci/controller/pcie-rockchip-host.c | 12 ++++++++++-- | |
12 | 1 file changed, 10 insertions(+), 2 deletions(-) | |
13 | ||
14 | diff --git a/drivers/pci/controller/pcie-rockchip-host.c b/drivers/pci/controller/pcie-rockchip-host.c | |
15 | index afbbdccd195d..5d75189e64e5 100644 | |
16 | --- a/drivers/pci/controller/pcie-rockchip-host.c | |
17 | +++ b/drivers/pci/controller/pcie-rockchip-host.c | |
18 | @@ -959,8 +959,16 @@ static int rockchip_pcie_probe(struct platform_device *pdev) | |
19 | } | |
20 | ||
21 | err = rockchip_pcie_host_init_port(rockchip); | |
22 | - if (err) | |
23 | - goto err_vpcie; | |
24 | + if (err) { | |
25 | + dev_err(dev, "failed to init port, try again...\n"); | |
26 | + err = rockchip_pcie_host_init_port(rockchip); | |
27 | + if (err) { | |
28 | + dev_err(dev, "failed to init port, last try in 500ms.\n"); | |
29 | + mdelay(500); | |
30 | + err = rockchip_pcie_host_init_port(rockchip); | |
31 | + if (err) goto err_vpcie; | |
32 | + } | |
33 | + } | |
34 | ||
35 | err = rockchip_pcie_init_irq_domain(rockchip); | |
36 | if (err < 0) | |
37 | -- | |
38 | 2.34.1 | |
39 |