intel_th: Communicate IRQ via resource

Currently, the IRQ is passed between the glue layers and the core as a
separate argument, while the MMIO resources are passed as resources.
This also limits the number of IRQs thus used to one, while the current
versions of Intel TH use a different MSI vector for each interrupt
triggering event, of which there are 7.

Change this to pass IRQ in the resources array.

Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Alexander Shishkin
2019-05-03 11:44:39 +03:00
committed by Greg Kroah-Hartman
parent fc027f4ce7
commit 62a593022c
4 changed files with 30 additions and 14 deletions

View File

@@ -72,7 +72,7 @@ static int intel_th_pci_probe(struct pci_dev *pdev,
const struct pci_device_id *id)
{
struct intel_th_drvdata *drvdata = (void *)id->driver_data;
struct resource resource[TH_MMIO_END] = {
struct resource resource[TH_MMIO_END + 1] = {
[TH_MMIO_CONFIG] = pdev->resource[TH_PCI_CONFIG_BAR],
[TH_MMIO_SW] = pdev->resource[TH_PCI_STH_SW_BAR],
};
@@ -92,7 +92,12 @@ static int intel_th_pci_probe(struct pci_dev *pdev,
r++;
}
th = intel_th_alloc(&pdev->dev, drvdata, resource, r, pdev->irq);
if (pdev->irq > 0) {
resource[r].flags = IORESOURCE_IRQ;
resource[r++].start = pdev->irq;
}
th = intel_th_alloc(&pdev->dev, drvdata, resource, r);
if (IS_ERR(th))
return PTR_ERR(th);