Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9df1ccae authored by Yan He's avatar Yan He
Browse files

msm: pcie: implement arch_teardown_msi_irqs



Add the implementation of arch_teardown_msi_irqs hook in PCI
framework, which allows to tear down multiple MSI IRQs.

Change-Id: Ic80e28e4a33580d7d9a3a466500b4f91347b498d
Signed-off-by: default avatarYan He <yanhe@codeaurora.org>
parent 9f49fb6f
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -162,6 +162,24 @@ void arch_teardown_msi_irq(unsigned int irq)
	msm_pcie_destroy_irq(irq, NULL);
}

void arch_teardown_msi_irqs(struct pci_dev *dev)
{
	struct msi_desc *entry;
	struct msm_pcie_dev_t *pcie_dev = PCIE_BUS_PRIV_DATA(dev);

	PCIE_DBG("RC:%d EP: vendor_id:0x%x device_id:0x%x\n",
		pcie_dev->rc_idx, dev->vendor, dev->device);

	list_for_each_entry(entry, &dev->msi_list, list) {
		int i, nvec;
		if (entry->irq == 0)
			continue;
		nvec = 1 << entry->msi_attrib.multiple;
		for (i = 0; i < nvec; i++)
			msm_pcie_destroy_irq(entry->irq + i, pcie_dev);
	}
}

static void msm_pcie_msi_nop(struct irq_data *d)
{
	PCIE_DBG("\n");