diff options
author | Rob Herring <robh@kernel.org> | 2020-07-22 04:25:14 +0200 |
---|---|---|
committer | Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> | 2020-08-04 17:36:30 +0200 |
commit | b64aa11eb2ddb0600361178286d7b7ed5a069fd8 (patch) | |
tree | ef74f2cd8ed8bbecf598e1c6d362fbf0610a9f3e /drivers/pci/of.c | |
parent | PCI: Move DT resource setup into devm_pci_alloc_host_bridge() (diff) | |
download | linux-b64aa11eb2ddb0600361178286d7b7ed5a069fd8.tar.xz linux-b64aa11eb2ddb0600361178286d7b7ed5a069fd8.zip |
PCI: Set bridge map_irq and swizzle_irq to default functions
The majority of DT based host drivers use the default .map_irq() and
.swizzle_irq() functions, so let's initialize the function pointers to
the default and drop setting them in the host drivers.
Drivers like iProc which don't support legacy interrupts need to set
.map_irq() back to NULL.
Link: https://lore.kernel.org/r/20200722022514.1283916-20-robh@kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/of.c')
-rw-r--r-- | drivers/pci/of.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/pci/of.c b/drivers/pci/of.c index 5e06aae1b4cd..8f478d923196 100644 --- a/drivers/pci/of.c +++ b/drivers/pci/of.c @@ -569,6 +569,9 @@ int devm_of_pci_bridge_init(struct device *dev, struct pci_host_bridge *bridge) if (!dev->of_node) return 0; + bridge->swizzle_irq = pci_common_swizzle; + bridge->map_irq = of_irq_parse_and_map_pci; + return pci_parse_request_of_pci_ranges(dev, bridge); } |