]> www.infradead.org Git - nvme.git/commitdiff
PCI: intel-gw: Remove intel_pcie_cpu_addr()
authorFrank Li <Frank.Li@nxp.com>
Wed, 5 Mar 2025 17:07:54 +0000 (12:07 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Mon, 24 Mar 2025 19:58:35 +0000 (14:58 -0500)
Remove intel_pcie_cpu_addr(), the .cpu_addr_fixup() method, because the dwc
core driver already handles address translation based on the devicetree
description.

[bhelgaas: this does require a minor dts change, but maintainer
Lei Chuan Hua <lchuanhua@maxlinear.com> confirms that the driver is only
used internally to Maxlinear and internal users will update dts:
https://lore.kernel.org/r/BY3PR19MB507667CE7531D863E1E5F8AEBDD82@BY3PR19MB5076.namprd19.prod.outlook.com]

Link: https://lore.kernel.org/r/20250305-intel-v1-1-40db3a685490@nxp.com
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/controller/dwc/pcie-intel-gw.c

index 9b53b8f6f268e2a91eedeeb7d08db07c32fcf840..c21906eced61896c8a8307dbd6b72d229f9a5c5f 100644 (file)
@@ -57,7 +57,6 @@
        PCIE_APP_IRN_INTA | PCIE_APP_IRN_INTB | \
        PCIE_APP_IRN_INTC | PCIE_APP_IRN_INTD)
 
-#define BUS_IATU_OFFSET                        SZ_256M
 #define RESET_INTERVAL_MS              100
 
 struct intel_pcie {
@@ -381,13 +380,7 @@ static int intel_pcie_rc_init(struct dw_pcie_rp *pp)
        return intel_pcie_host_setup(pcie);
 }
 
-static u64 intel_pcie_cpu_addr(struct dw_pcie *pcie, u64 cpu_addr)
-{
-       return cpu_addr + BUS_IATU_OFFSET;
-}
-
 static const struct dw_pcie_ops intel_pcie_ops = {
-       .cpu_addr_fixup = intel_pcie_cpu_addr,
 };
 
 static const struct dw_pcie_host_ops intel_pcie_dw_ops = {
@@ -409,6 +402,7 @@ static int intel_pcie_probe(struct platform_device *pdev)
        platform_set_drvdata(pdev, pcie);
        pci = &pcie->pci;
        pci->dev = dev;
+       pci->use_parent_dt_ranges = true;
        pp = &pci->pp;
 
        ret = intel_pcie_get_resources(pdev);