lkml.org 
[lkml]   [2014]   [Jul]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v8 7/9] pci: of: Parse and map the IRQ when adding the PCI device.
    Date
    Enhance the default implementation of pcibios_add_device() to
    parse and map the IRQ of the device if a DT binding is available.

    Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com>
    ---
    drivers/pci/pci.c | 4 ++++
    1 file changed, 4 insertions(+)

    diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
    index 63a54a3..8e65dc3 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,9 @@ EXPORT_SYMBOL(pcim_pin_device);
    */
    int __weak pcibios_add_device(struct pci_dev *dev)
    {
    +#ifdef CONFIG_OF
    + dev->irq = of_irq_parse_and_map_pci(dev, 0, 0);
    +#endif
    return 0;
    }

    --
    2.0.0


    \
     
     \ /
      Last update: 2014-07-01 21:21    [W:4.119 / U:0.076 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site