From: Hauke Mehrtens <hauke@hauke-m.de>
To: rjui@broadcom.com, bhelgaas@google.com, arnd@arndb.de
Cc: linux-pci@vger.kernel.org, sbranden@broadcom.com,
linux-arm-kernel@lists.infradead.org,
bcm-kernel-feedback-list@broadcom.com, zajec5@gmail.com,
Hauke Mehrtens <hauke@hauke-m.de>
Subject: [PATCH 1/2] PCI: iproc: make of_irq_parse_and_map_pci() configurable
Date: Tue, 12 May 2015 23:23:00 +0200 [thread overview]
Message-ID: <1431465781-10753-2-git-send-email-hauke@hauke-m.de> (raw)
In-Reply-To: <1431465781-10753-1-git-send-email-hauke@hauke-m.de>
This patch makes the generic code not use the function
of_irq_parse_and_map_pci() always to get the irqs, but to take a
function the actual driver has provided. This is needed to make this
function work with drivers not using device tree.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
drivers/pci/host/pcie-iproc-platform.c | 2 ++
drivers/pci/host/pcie-iproc.c | 2 +-
drivers/pci/host/pcie-iproc.h | 1 +
3 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/pci/host/pcie-iproc-platform.c b/drivers/pci/host/pcie-iproc-platform.c
index afad6c2..c8aa06f 100644
--- a/drivers/pci/host/pcie-iproc-platform.c
+++ b/drivers/pci/host/pcie-iproc-platform.c
@@ -71,6 +71,8 @@ static int iproc_pcie_pltfm_probe(struct platform_device *pdev)
pcie->resources = &res;
+ pcie->map_irq = of_irq_parse_and_map_pci;
+
ret = iproc_pcie_setup(pcie);
if (ret) {
dev_err(pcie->dev, "PCIe controller setup failed\n");
diff --git a/drivers/pci/host/pcie-iproc.c b/drivers/pci/host/pcie-iproc.c
index 329e1b5..cef31f6 100644
--- a/drivers/pci/host/pcie-iproc.c
+++ b/drivers/pci/host/pcie-iproc.c
@@ -229,7 +229,7 @@ int iproc_pcie_setup(struct iproc_pcie *pcie)
pci_scan_child_bus(bus);
pci_assign_unassigned_bus_resources(bus);
- pci_fixup_irqs(pci_common_swizzle, of_irq_parse_and_map_pci);
+ pci_fixup_irqs(pci_common_swizzle, pcie->map_irq);
pci_bus_add_devices(bus);
return 0;
diff --git a/drivers/pci/host/pcie-iproc.h b/drivers/pci/host/pcie-iproc.h
index e28075e..a333d4b 100644
--- a/drivers/pci/host/pcie-iproc.h
+++ b/drivers/pci/host/pcie-iproc.h
@@ -34,6 +34,7 @@ struct iproc_pcie {
struct pci_bus *root_bus;
struct phy *phy;
int irqs[IPROC_PCIE_MAX_NUM_IRQS];
+ int (*map_irq)(const struct pci_dev *, u8, u8);
};
int iproc_pcie_setup(struct iproc_pcie *pcie);
--
2.1.4
next prev parent reply other threads:[~2015-05-12 21:31 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-12 21:22 [PATCH 0/2] PCI: iproc: add bcma PCIe 2.0 controller Hauke Mehrtens
2015-05-12 21:23 ` Hauke Mehrtens [this message]
2015-05-12 22:14 ` [PATCH 1/2] PCI: iproc: make of_irq_parse_and_map_pci() configurable Ray Jui
2015-05-12 21:23 ` [PATCH 2/2] PCI: iproc: add bcma pcie driver Hauke Mehrtens
2015-05-12 22:18 ` Ray Jui
2015-05-13 6:27 ` Rafał Miłecki
2015-05-13 15:56 ` Ray Jui
2015-05-13 16:19 ` Rafał Miłecki
2015-05-13 16:30 ` Ray Jui
2015-05-13 18:43 ` Hauke Mehrtens
2015-05-19 23:14 ` Bjorn Helgaas
2015-05-19 23:17 ` Ray Jui
2015-05-20 5:27 ` Rafał Miłecki
2015-05-12 22:05 ` [PATCH 0/2] PCI: iproc: add bcma PCIe 2.0 controller Ray Jui
2015-05-20 14:52 ` Bjorn Helgaas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1431465781-10753-2-git-send-email-hauke@hauke-m.de \
--to=hauke@hauke-m.de \
--cc=arnd@arndb.de \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=bhelgaas@google.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-pci@vger.kernel.org \
--cc=rjui@broadcom.com \
--cc=sbranden@broadcom.com \
--cc=zajec5@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).