on NanoPi R4S the training of the pcie often fails at first try
so this try again some times.
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
}
err = rockchip_pcie_host_init_port(rockchip);
- if (err)
- goto err_vpcie;
+ if (err) {
+ dev_err(dev, "failed to init port, try again...\n");
+ err = rockchip_pcie_host_init_port(rockchip);
+ if (err) {
+ dev_err(dev, "failed to init port, last try in 500ms.\n");
+ mdelay(500);
+ err = rockchip_pcie_host_init_port(rockchip);
+ if (err) goto err_vpcie;
+ }
+ }
err = rockchip_pcie_init_irq_domain(rockchip);
if (err < 0)