Skip to contentSkip to conversation

PCI: keystone: Let AM65 use the pci_ops defined in pcie-designware-host.c

PATCH Applied Kishon Vijay Abraham I 3 participants 3 messages Mar 17, 2021 – Mar 22, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PCI: keystone: Let AM65 use the pci_ops defined in pcie-designware-host.c

Both TI's AM65x (K3) and TI's K2 PCIe driver are implemented in pci-keystone. However Only K2 PCIe driver should use it's own pci_ops for configuration space accesses. But commit 10a797c6e54a ("PCI: dwc: keystone: Use pci_ops for config space accessors") used custom pci_ops for both AM65x and K2. This breaks configuration space access for AM65x platform. Fix it here.

Fixes 10a797c6e54a ("PCI: dwc: keystone: Use pci_ops for config space accessors")
Cc <[email protected]> # v5.10
---
 drivers/pci/controller/dwc/pci-keystone.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/pci/controller/dwc/pci-keystone.c +2 -1
index 53aa35cb3a49..a59ecbec601f 100644
@@ -798,7 +798,8 @@ static int __init ks_pcie_host_init(struct pcie_port *pp)
 	int ret;
 
 	pp->bridge->ops = &ks_pcie_ops;
-	pp->bridge->child_ops = &ks_child_pcie_ops;
+	if (!ks_pcie->is_am6)
+		pp->bridge->child_ops = &ks_child_pcie_ops;
 
 	ret = ks_pcie_config_legacy_irq(ks_pcie);
 	if (ret)
Signature · 1 line
2.17.1
Reviewed-by on v1 1/1
#1 lore raw

Hi Kishon,

Thank you for the fix!

[...]

Quoted 10 lines
drivers/pci/controller/dwc/pci-keystone.c +2 -1
@@ -798,7 +798,8 @@ static int __init ks_pcie_host_init(struct pcie_port *pp)
 	int ret;
 
 	pp->bridge->ops = &ks_pcie_ops;
-	pp->bridge->child_ops = &ks_child_pcie_ops;
+	if (!ks_pcie->is_am6)
+		pp->bridge->child_ops = &ks_child_pcie_ops;
 
 	ret = ks_pcie_config_legacy_irq(ks_pcie);
 	if (ret)

[...]

Krzysztof

#2 lore raw
In reply to Kishon Vijay Abraham I
Quoted 6 lines · Kishon Vijay Abraham I

Both TI's AM65x (K3) and TI's K2 PCIe driver are implemented in pci-keystone. However Only K2 PCIe driver should use it's own pci_ops for configuration space accesses. But commit 10a797c6e54a ("PCI: dwc: keystone: Use pci_ops for config space accessors") used custom pci_ops for both AM65x and K2. This breaks configuration space access for AM65x platform. Fix it here.

Applied to pci/dwc, thanks!

[1/1] PCI: keystone: Let AM65 use the pci_ops defined in pcie-designware-host.c

      https://git.kernel.org/lpieralisi/pci/c/3d0b2a3a87

Thanks,
Lorenzo