PCI: imx6: Add helper function imx_pcie_add_lut_by_rid()
Add helper function imx_pcie_add_lut_by_rid(), which will be used by the upcoming LUT configuration for MSI/IOMMU in the Endpoint mode. No functional change. Signed-off-by: Frank Li <Frank.Li@nxp.com> [mani: reworded commit message and dropped tested-by tag] Signed-off-by: Manivannan Sadhasivam <mani@kernel.org> Link: https://patch.msgid.link/20250710-ep-msi-v21-1-57683fc7fb25@nxp.com
This commit is contained in:
committed by
Manivannan Sadhasivam
parent
399444a87a
commit
9d0ca8df24
@@ -1096,18 +1096,14 @@ static void imx_pcie_remove_lut(struct imx_pcie *imx_pcie, u16 rid)
|
||||
}
|
||||
}
|
||||
|
||||
static int imx_pcie_enable_device(struct pci_host_bridge *bridge,
|
||||
struct pci_dev *pdev)
|
||||
static int imx_pcie_add_lut_by_rid(struct imx_pcie *imx_pcie, u32 rid)
|
||||
{
|
||||
struct imx_pcie *imx_pcie = to_imx_pcie(to_dw_pcie_from_pp(bridge->sysdata));
|
||||
u32 sid_i, sid_m, rid = pci_dev_id(pdev);
|
||||
struct device *dev = imx_pcie->pci->dev;
|
||||
struct device_node *target;
|
||||
struct device *dev;
|
||||
u32 sid_i, sid_m;
|
||||
int err_i, err_m;
|
||||
u32 sid = 0;
|
||||
|
||||
dev = imx_pcie->pci->dev;
|
||||
|
||||
target = NULL;
|
||||
err_i = of_map_id(dev->of_node, rid, "iommu-map", "iommu-map-mask",
|
||||
&target, &sid_i);
|
||||
@@ -1182,6 +1178,13 @@ static int imx_pcie_enable_device(struct pci_host_bridge *bridge,
|
||||
return imx_pcie_add_lut(imx_pcie, rid, sid);
|
||||
}
|
||||
|
||||
static int imx_pcie_enable_device(struct pci_host_bridge *bridge, struct pci_dev *pdev)
|
||||
{
|
||||
struct imx_pcie *imx_pcie = to_imx_pcie(to_dw_pcie_from_pp(bridge->sysdata));
|
||||
|
||||
return imx_pcie_add_lut_by_rid(imx_pcie, pci_dev_id(pdev));
|
||||
}
|
||||
|
||||
static void imx_pcie_disable_device(struct pci_host_bridge *bridge,
|
||||
struct pci_dev *pdev)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user