diff options
| author | Marek Vasut <[email protected]> | 2026-08-09 03:32:39 +0200 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2026-08-20 12:15:23 -0600 |
| commit | 0a7534a3133155457dab6d34242fa37b3599e67c (patch) | |
| tree | 750f8c259f7f50daf5de864667e030b41708a05f | |
| parent | b452e82883162eac1fcd89d18e4e7adaf9149fbb (diff) | |
pci: pcie-rcar-gen4: Avoid repeated link attempts
Avoid repeated link attempts for these controllers. In case the
controller link is up, this is a noop since the probe() already
finished. In case the controller link is down, a repeated link
up attempt seems to require reset of both PCIe controllers, which
is not desired. It is also unlikely that a repeated link attempt
would bring the link up, as U-Boot does not support hotplug anyway.
Therefore, prevent repeated link attempts.
Signed-off-by: Marek Vasut <[email protected]>
| -rw-r--r-- | drivers/pci/pci-rcar-gen4.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/pci/pci-rcar-gen4.c b/drivers/pci/pci-rcar-gen4.c index 34561406641..044bceee6c7 100644 --- a/drivers/pci/pci-rcar-gen4.c +++ b/drivers/pci/pci-rcar-gen4.c @@ -112,6 +112,15 @@ struct rcar_gen4_pcie { size_t firmware_size; }; +/** + * struct rcar_gen4_pcie_plat - Renesas R-Car Gen4 DW PCIe controller platform data + * + * @probed: Controller was started + */ +struct rcar_gen4_pcie_plat { + bool probed; +}; + /* Common */ static bool rcar_gen4_pcie_link_up(struct rcar_gen4_pcie *rcar) { @@ -404,10 +413,14 @@ static int rcar_gen4_pcie_load_firmware(struct rcar_gen4_pcie *rcar) static int rcar_gen4_pcie_probe(struct udevice *dev) { struct rcar_gen4_pcie *rcar = dev_get_priv(dev); + struct rcar_gen4_pcie_plat *plat = dev_get_plat(dev); struct udevice *ctlr = pci_get_controller(dev); struct pci_controller *hose = dev_get_uclass_priv(ctlr); int ret; + if (plat->probed) + return -ENODEV; + ret = rcar_gen4_pcie_load_firmware(rcar); if (ret) return ret; @@ -447,6 +460,7 @@ static int rcar_gen4_pcie_probe(struct udevice *dev) dw_pcie_link_set_max_link_width(&rcar->dw, rcar->num_lanes); ret = rcar_gen4_pcie_start_link(rcar); + plat->probed = true; if (ret) return ret; @@ -569,5 +583,6 @@ U_BOOT_DRIVER(rcar_gen4_pcie) = { .probe = rcar_gen4_pcie_probe, .remove = rcar_gen4_pcie_remove, .priv_auto = sizeof(struct rcar_gen4_pcie), + .plat_auto = sizeof(struct rcar_gen4_pcie_plat), .flags = DM_FLAG_ACTIVE_DMA, }; |
