From: Phil Edworthy <phil.edworthy@renesas.com>
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/3] PCI: rcar-pcie: Add call to get domain nr
Date: Mon, 22 Sep 2014 09:51:08 +0000 [thread overview]
Message-ID: <1411379470-20639-2-git-send-email-phil.edworthy@renesas.com> (raw)
In-Reply-To: <1411379470-20639-1-git-send-email-phil.edworthy@renesas.com>
R-Car devices (r8a7790 and r8a7791) need to place the internal PCI and external
PCIe controllers on separate domains so that they can work at the same time.
Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
---
drivers/pci/host/pcie-rcar.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/pci/host/pcie-rcar.c b/drivers/pci/host/pcie-rcar.c
index 4884ee5..db74371 100644
--- a/drivers/pci/host/pcie-rcar.c
+++ b/drivers/pci/host/pcie-rcar.c
@@ -128,6 +128,7 @@ struct rcar_pcie {
struct device *dev;
void __iomem *base;
struct resource res[RCAR_PCI_MAX_RESOURCES];
+ int domain;
struct resource busn;
int root_bus_nr;
struct clk *clk;
@@ -393,13 +394,13 @@ static void rcar_pcie_enable(struct rcar_pcie *pcie)
{
struct platform_device *pdev = to_platform_device(pcie->dev);
+#ifdef CONFIG_PCI_DOMAINS
+ rcar_pci.domain = pcie->domain;
+#endif
rcar_pci.nr_controllers = 1;
rcar_pci.private_data = (void **)&pcie;
pci_common_init_dev(&pdev->dev, &rcar_pci);
-#ifdef CONFIG_PCI_DOMAINS
- rcar_pci.domain++;
-#endif
}
static int phy_wait_for_ack(struct rcar_pcie *pcie)
@@ -917,6 +918,8 @@ static int rcar_pcie_probe(struct platform_device *pdev)
pcie->dev = &pdev->dev;
platform_set_drvdata(pdev, pcie);
+ pcie->domain = of_pci_get_domain_nr(pdev->dev.of_node, true);
+
/* Get the bus range */
if (of_pci_parse_bus_range(pdev->dev.of_node, &pcie->busn)) {
dev_err(&pdev->dev, "failed to parse bus-range property\n");
--
2.1.0
next prev parent reply other threads:[~2014-09-22 9:51 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-22 9:51 [PATCH 0/3] Add PCI domain support to R-Car drivers Phil Edworthy
2014-09-22 9:51 ` Phil Edworthy [this message]
2014-09-22 9:51 ` [PATCH 2/3] PCI: rcar-internal-pci: Add call to get domain nr Phil Edworthy
2014-09-22 9:51 ` [RFC PATCH 3/3] ARM: Enable PCI domains Phil Edworthy
2014-09-22 11:28 ` [PATCH 0/3] Add PCI domain support to R-Car drivers Liviu Dudau
2014-09-22 11:40 ` Phil Edworthy
2014-09-22 12:02 ` Liviu Dudau
2014-09-22 21:00 ` Bjorn Helgaas
2014-09-23 10:10 ` Phil Edworthy
2014-09-23 10:32 ` Liviu Dudau
2014-09-23 11:00 ` Phil Edworthy
2014-09-23 11:10 ` Liviu Dudau
2014-09-23 11:38 ` Phil Edworthy
2014-09-23 12:10 ` Liviu Dudau
2014-09-23 12:40 ` Phil Edworthy
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=1411379470-20639-2-git-send-email-phil.edworthy@renesas.com \
--to=phil.edworthy@renesas.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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).