diff options
author | Lucas Stach <l.stach@pengutronix.de> | 2014-04-07 05:30:20 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2014-04-15 13:49:14 -0400 |
commit | b9bfe1bca8ecccf3d1f015fd18fad52ed95f8033 (patch) | |
tree | 72200673602020215e651f4ed7b7172f35ab9186 /drivers/pci/host/pci-rcar-gen2.c | |
parent | c9eaa447e77efe77b7fa4c953bd62de8297fd6c5 (diff) |
PCI: rcar: 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.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Simon Horman <horms+renesas@verge.net.au>
Diffstat (limited to 'drivers/pci/host/pci-rcar-gen2.c')
-rw-r--r-- | drivers/pci/host/pci-rcar-gen2.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/pci/host/pci-rcar-gen2.c b/drivers/pci/host/pci-rcar-gen2.c index fd3e3ab56509..4fe349dcaf59 100644 --- a/drivers/pci/host/pci-rcar-gen2.c +++ b/drivers/pci/host/pci-rcar-gen2.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/io.h> | 15 | #include <linux/io.h> |
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/module.h> | 17 | #include <linux/module.h> |
18 | #include <linux/of_pci.h> | ||
18 | #include <linux/pci.h> | 19 | #include <linux/pci.h> |
19 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
20 | #include <linux/pm_runtime.h> | 21 | #include <linux/pm_runtime.h> |
@@ -180,8 +181,13 @@ static int rcar_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) | |||
180 | { | 181 | { |
181 | struct pci_sys_data *sys = dev->bus->sysdata; | 182 | struct pci_sys_data *sys = dev->bus->sysdata; |
182 | struct rcar_pci_priv *priv = sys->private_data; | 183 | struct rcar_pci_priv *priv = sys->private_data; |
184 | int irq; | ||
185 | |||
186 | irq = of_irq_parse_and_map_pci(dev, slot, pin); | ||
187 | if (!irq) | ||
188 | irq = priv->irq; | ||
183 | 189 | ||
184 | return priv->irq; | 190 | return irq; |
185 | } | 191 | } |
186 | 192 | ||
187 | #ifdef CONFIG_PCI_DEBUG | 193 | #ifdef CONFIG_PCI_DEBUG |