Skip to content

Commit b981217

Browse files
nxpfranklibjorn-helgaas
authored andcommitted
PCI: imx6: Remove imx_pcie_cpu_addr_fixup()
Remove imx_pcie_cpu_addr_fixup, the .cpu_addr_fixup() method, because the dwc core driver already handles address translation based on the devicetree description. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Frank Li <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Reviewed-by: Manivannan Sadhasivam <[email protected]> Acked-by: Richard Zhu <[email protected]>
1 parent befc86a commit b981217

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

drivers/pci/controller/dwc/pci-imx6.c

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1217,22 +1217,6 @@ static void imx_pcie_host_exit(struct dw_pcie_rp *pp)
12171217
regulator_disable(imx_pcie->vpcie);
12181218
}
12191219

1220-
static u64 imx_pcie_cpu_addr_fixup(struct dw_pcie *pcie, u64 cpu_addr)
1221-
{
1222-
struct imx_pcie *imx_pcie = to_imx_pcie(pcie);
1223-
struct dw_pcie_rp *pp = &pcie->pp;
1224-
struct resource_entry *entry;
1225-
1226-
if (!(imx_pcie->drvdata->flags & IMX_PCIE_FLAG_CPU_ADDR_FIXUP))
1227-
return cpu_addr;
1228-
1229-
entry = resource_list_first_type(&pp->bridge->windows, IORESOURCE_MEM);
1230-
if (!entry)
1231-
return cpu_addr;
1232-
1233-
return cpu_addr - entry->offset;
1234-
}
1235-
12361220
/*
12371221
* In old DWC implementations, PCIE_ATU_INHIBIT_PAYLOAD in iATU Ctrl2
12381222
* register is reserved, so the generic DWC implementation of sending the
@@ -1263,7 +1247,6 @@ static const struct dw_pcie_host_ops imx_pcie_host_dw_pme_ops = {
12631247
static const struct dw_pcie_ops dw_pcie_ops = {
12641248
.start_link = imx_pcie_start_link,
12651249
.stop_link = imx_pcie_stop_link,
1266-
.cpu_addr_fixup = imx_pcie_cpu_addr_fixup,
12671250
};
12681251

12691252
static void imx_pcie_ep_init(struct dw_pcie_ep *ep)
@@ -1645,6 +1628,7 @@ static int imx_pcie_probe(struct platform_device *pdev)
16451628
if (ret)
16461629
return ret;
16471630

1631+
pci->use_parent_dt_ranges = true;
16481632
if (imx_pcie->drvdata->mode == DW_PCIE_EP_TYPE) {
16491633
ret = imx_add_pcie_ep(imx_pcie, pdev);
16501634
if (ret < 0)

0 commit comments

Comments
 (0)