diff options
| author | Marek Vasut <[email protected]> | 2025-09-24 03:47:13 +0200 |
|---|---|---|
| committer | Marek Vasut <[email protected]> | 2025-09-25 23:19:17 +0200 |
| commit | 38541b5db5b1de67f5fbab3d9971ac7ba818cb46 (patch) | |
| tree | 337eb87bccc036370f09cad58ee3ca3338096862 | |
| parent | eb69747cd231767098d4ad7957fbedad6a42af99 (diff) | |
pci: pcie-rcar-gen4: Assure reset occurs before DBI access
Assure the reset is latched and the core is ready for DBI access.
On R-Car V4H, the PCIe reset is asynchronized and does not take
effect immediately, but needs a short time to complete. In case
DBI access happens in that short time, that access generates an
SError. Make sure that condition can never happen, read back the
state of the reset which should turn the asynchronized reset into
synchronized one, and wait a little over 1ms to add additional
safety margin.
Signed-off-by: Marek Vasut <[email protected]>
| -rw-r--r-- | drivers/pci/pci-rcar-gen4.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/pci/pci-rcar-gen4.c b/drivers/pci/pci-rcar-gen4.c index 70a000861ef..6e093829861 100644 --- a/drivers/pci/pci-rcar-gen4.c +++ b/drivers/pci/pci-rcar-gen4.c @@ -314,6 +314,9 @@ static int rcar_gen4_pcie_common_init(struct rcar_gen4_pcie *rcar) if (ret) goto err_unprepare; + reset_status(&rcar->pwr_rst); + mdelay(1); + rcar_gen4_pcie_additional_common_init(rcar); return 0; |
