diff mbox series

[v2,05/13] PCI: dwc: endpoint: Read num-lanes property before ep_pre_init()

Message ID 20220627122417.809615-6-yoshihiro.shimoda.uh@renesas.com (mailing list archive)
State Superseded
Headers show
Series treewide: PCI: renesas: Add R-Car Gen4 PCIe support | expand

Commit Message

Yoshihiro Shimoda June 27, 2022, 12:24 p.m. UTC
Vendor-specific initialization needs this information so that
read it before ep_pre_init().

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---
 drivers/pci/controller/dwc/pcie-designware-ep.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/drivers/pci/controller/dwc/pcie-designware-ep.c b/drivers/pci/controller/dwc/pcie-designware-ep.c
index 439f92d7d284..3760857c1f81 100644
--- a/drivers/pci/controller/dwc/pcie-designware-ep.c
+++ b/drivers/pci/controller/dwc/pcie-designware-ep.c
@@ -717,6 +717,8 @@  int dw_pcie_ep_init(struct dw_pcie_ep *ep)
 		}
 	}
 
+	of_property_read_u32(np, "num-lanes", &pci->num_lanes);
+
 	if (ep->ops->ep_pre_init)
 		ep->ops->ep_pre_init(ep);