Skip to content

Commit 1bd0d43

Browse files
nxpfrankliLorenzo Pieralisi
authored andcommitted
PCI: imx6: Clean up addr_space retrieval code
Since the dw_pcie_ep_init() function is already fetching the 'addr_space' region, no need to do the same in this driver. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Frank Li <[email protected]> Signed-off-by: Lorenzo Pieralisi <[email protected]> Reviewed-by: Manivannan Sadhasivam <[email protected]>
1 parent f5c04da commit 1bd0d43

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

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

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1061,7 +1061,6 @@ static int imx6_add_pcie_ep(struct imx6_pcie *imx6_pcie,
10611061
int ret;
10621062
unsigned int pcie_dbi2_offset;
10631063
struct dw_pcie_ep *ep;
1064-
struct resource *res;
10651064
struct dw_pcie *pci = imx6_pcie->pci;
10661065
struct dw_pcie_rp *pp = &pci->pp;
10671066
struct device *dev = pci->dev;
@@ -1080,14 +1079,8 @@ static int imx6_add_pcie_ep(struct imx6_pcie *imx6_pcie,
10801079
pcie_dbi2_offset = SZ_4K;
10811080
break;
10821081
}
1083-
pci->dbi_base2 = pci->dbi_base + pcie_dbi2_offset;
1084-
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "addr_space");
1085-
if (!res)
1086-
return -EINVAL;
10871082

1088-
ep->phys_base = res->start;
1089-
ep->addr_size = resource_size(res);
1090-
ep->page_size = SZ_64K;
1083+
pci->dbi_base2 = pci->dbi_base + pcie_dbi2_offset;
10911084

10921085
ret = dw_pcie_ep_init(ep);
10931086
if (ret) {

0 commit comments

Comments
 (0)