diff options
author | Lucas Stach <l.stach@pengutronix.de> | 2014-04-14 22:56:51 +0200 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2014-04-14 22:56:51 +0200 |
commit | 4356e1a33b132d86e19a772ed62e77645b03f8f2 (patch) | |
tree | ac3eba39fdab8dad57d3e8bd9451868f515ef9e2 /drivers/pci | |
parent | Linux 3.15-rc1 (diff) | |
download | linux-4356e1a33b132d86e19a772ed62e77645b03f8f2.tar.xz linux-4356e1a33b132d86e19a772ed62e77645b03f8f2.zip |
PCI: tegra: Use new OF interrupt mapping when possible
Use new OF interrupt mapping (of_irq_parse_and_map_pci()) when possible.
This is the recommended method of doing the IRQ mapping. For old
devicetrees we fall back to the previous practice.
This allows interrupts to be remapped across bridges.
Tested-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/host/pci-tegra.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/pci/host/pci-tegra.c b/drivers/pci/host/pci-tegra.c index 330f7e3a32dd..083cf37ca047 100644 --- a/drivers/pci/host/pci-tegra.c +++ b/drivers/pci/host/pci-tegra.c @@ -639,10 +639,15 @@ static int tegra_pcie_setup(int nr, struct pci_sys_data *sys) static int tegra_pcie_map_irq(const struct pci_dev *pdev, u8 slot, u8 pin) { struct tegra_pcie *pcie = sys_to_pcie(pdev->bus->sysdata); + int irq; tegra_cpuidle_pcie_irqs_in_use(); - return pcie->irq; + irq = of_irq_parse_and_map_pci(pdev, slot, pin); + if (!irq) + irq = pcie->irq; + + return irq; } static void tegra_pcie_add_bus(struct pci_bus *bus) |