diff mbox series

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

Message ID 20210317131518.11040-1-kishon@ti.com (mailing list archive)
State New, archived
Headers show
Series PCI: keystone: Let AM65 use the pci_ops defined in pcie-designware-host.c | expand

Commit Message

Kishon Vijay Abraham I March 17, 2021, 1:15 p.m. UTC
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")
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Cc: <stable@vger.kernel.org> # v5.10
---
 drivers/pci/controller/dwc/pci-keystone.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Krzysztof Wilczyński March 19, 2021, 4:45 a.m. UTC | #1
Hi Kishon,

Thank you for the fix!

[...]
> @@ -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)
[...]

Reviewed-by: Krzysztof Wilczyński <kw@linux.com>

Krzysztof
Lorenzo Pieralisi March 22, 2021, 2:48 p.m. UTC | #2
On Wed, 17 Mar 2021 18:45:18 +0530, Kishon Vijay Abraham I wrote:
> 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
diff mbox series

Patch

diff --git a/drivers/pci/controller/dwc/pci-keystone.c b/drivers/pci/controller/dwc/pci-keystone.c
index 53aa35cb3a49..a59ecbec601f 100644
--- a/drivers/pci/controller/dwc/pci-keystone.c
+++ b/drivers/pci/controller/dwc/pci-keystone.c
@@ -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)