Skip to content
Snippets Groups Projects
Commit f5d3352b authored by Lucas Stach's avatar Lucas Stach Committed by Bjorn Helgaas
Browse files

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: default avatarStephen Warren <swarren@nvidia.com>
Signed-off-by: default avatarLucas Stach <l.stach@pengutronix.de>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
parent f8f2fe73
No related branches found
No related tags found
No related merge requests found
...@@ -639,10 +639,15 @@ static int tegra_pcie_setup(int nr, struct pci_sys_data *sys) ...@@ -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) 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); struct tegra_pcie *pcie = sys_to_pcie(pdev->bus->sysdata);
int irq;
tegra_cpuidle_pcie_irqs_in_use(); 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) static void tegra_pcie_add_bus(struct pci_bus *bus)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment