Thread (48 messages) 48 messages, 10 authors, 2014-09-22
STALE4286d
Revisions (6)
  1. v8 [diff vs current]
  2. v9 current
  3. v10 [diff vs current]
  4. v11 [diff vs current]
  5. v12 [diff vs current]
  6. v13 [diff vs current]

[PATCH v9 02/12] PCI: OF: Parse and map the IRQ when adding the PCI device.

From: Liviu Dudau <Liviu.Dudau@arm.com>
Date: 2014-08-12 16:29:03
Also in: linux-arch, linux-arm-kernel, linux-pci, lkml
Subsystem: pci subsystem, the rest · Maintainers: Bjorn Helgaas, Linus Torvalds

Enhance the default implementation of pcibios_add_device() to
parse and map the IRQ of the device if a DT binding is available.

Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Grant Likely <redacted>
Cc: Rob Herring <robh+dt@kernel.org>
Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com>
---
 drivers/pci/pci.c | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 1c8592b..29d1775 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -17,6 +17,7 @@
 #include <linux/spinlock.h>
 #include <linux/string.h>
 #include <linux/log2.h>
+#include <linux/of_pci.h>
 #include <linux/pci-aspm.h>
 #include <linux/pm_wakeup.h>
 #include <linux/interrupt.h>
@@ -1453,6 +1454,8 @@ EXPORT_SYMBOL(pcim_pin_device);
  */
 int __weak pcibios_add_device(struct pci_dev *dev)
 {
+	dev->irq = of_irq_parse_and_map_pci(dev, 0, 0);
+
 	return 0;
 }
 
-- 
2.0.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help