提交 319e6046 编写于 作者: P Pali Rohár 提交者: Lorenzo Pieralisi

PCI: mvebu: Disallow mapping interrupts on emulated bridges

Interrupt support on mvebu emulated bridges is not implemented yet.

So properly indicate return value to callers that they cannot request
interrupts from emulated bridge.

Link: https://lore.kernel.org/r/20211125124605.25915-6-pali@kernel.orgSigned-off-by: NPali Rohár <pali@kernel.org>
Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
上级 11c2bf4a
...@@ -686,6 +686,15 @@ static struct pci_ops mvebu_pcie_ops = { ...@@ -686,6 +686,15 @@ static struct pci_ops mvebu_pcie_ops = {
.write = mvebu_pcie_wr_conf, .write = mvebu_pcie_wr_conf,
}; };
static int mvebu_pcie_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
{
/* Interrupt support on mvebu emulated bridges is not implemented yet */
if (dev->bus->number == 0)
return 0; /* Proper return code 0 == NO_IRQ */
return of_irq_parse_and_map_pci(dev, slot, pin);
}
static resource_size_t mvebu_pcie_align_resource(struct pci_dev *dev, static resource_size_t mvebu_pcie_align_resource(struct pci_dev *dev,
const struct resource *res, const struct resource *res,
resource_size_t start, resource_size_t start,
...@@ -1102,6 +1111,7 @@ static int mvebu_pcie_probe(struct platform_device *pdev) ...@@ -1102,6 +1111,7 @@ static int mvebu_pcie_probe(struct platform_device *pdev)
bridge->sysdata = pcie; bridge->sysdata = pcie;
bridge->ops = &mvebu_pcie_ops; bridge->ops = &mvebu_pcie_ops;
bridge->align_resource = mvebu_pcie_align_resource; bridge->align_resource = mvebu_pcie_align_resource;
bridge->map_irq = mvebu_pcie_map_irq;
return pci_host_probe(bridge); return pci_host_probe(bridge);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册