Skip to content

Commit 7ab93e6

Browse files
Richard Zhubjorn-helgaas
authored andcommitted
PCI: imx6: Fetch dbi2 and iATU base addesses from DT
Since dw_pcie_get_resources() gets the dbi2 and iATU base addresses from DT, remove the code from the imx6 driver that does the same. Upstream DTSes have not enabled Endpoint function. So nothing is broken for old upstream DTBs. Link: https://lore.kernel.org/r/20241126075702.4099164-4-hongxing.zhu@nxp.com Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com> Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
1 parent de22e20 commit 7ab93e6

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

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

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1132,7 +1132,6 @@ static int imx_add_pcie_ep(struct imx_pcie *imx_pcie,
11321132
struct platform_device *pdev)
11331133
{
11341134
int ret;
1135-
unsigned int pcie_dbi2_offset;
11361135
struct dw_pcie_ep *ep;
11371136
struct dw_pcie *pci = imx_pcie->pci;
11381137
struct dw_pcie_rp *pp = &pci->pp;
@@ -1142,28 +1141,6 @@ static int imx_add_pcie_ep(struct imx_pcie *imx_pcie,
11421141
ep = &pci->ep;
11431142
ep->ops = &pcie_ep_ops;
11441143

1145-
switch (imx_pcie->drvdata->variant) {
1146-
case IMX8MQ_EP:
1147-
case IMX8MM_EP:
1148-
case IMX8MP_EP:
1149-
pcie_dbi2_offset = SZ_1M;
1150-
break;
1151-
default:
1152-
pcie_dbi2_offset = SZ_4K;
1153-
break;
1154-
}
1155-
1156-
pci->dbi_base2 = pci->dbi_base + pcie_dbi2_offset;
1157-
1158-
/*
1159-
* FIXME: Ideally, dbi2 base address should come from DT. But since only IMX95 is defining
1160-
* "dbi2" in DT, "dbi_base2" is set to NULL here for that platform alone so that the DWC
1161-
* core code can fetch that from DT. But once all platform DTs were fixed, this and the
1162-
* above "dbi_base2" setting should be removed.
1163-
*/
1164-
if (device_property_match_string(dev, "reg-names", "dbi2") >= 0)
1165-
pci->dbi_base2 = NULL;
1166-
11671144
if (imx_check_flag(imx_pcie, IMX_PCIE_FLAG_SUPPORT_64BIT))
11681145
dma_set_mask_and_coherent(dev, DMA_BIT_MASK(64));
11691146

0 commit comments

Comments
 (0)