From: Phil Edworthy <phil.edworthy@renesas.com>
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/3] PCI: rcar-internal-pci: Add call to get domain nr
Date: Mon, 22 Sep 2014 09:51:09 +0000 [thread overview]
Message-ID: <1411379470-20639-3-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/pci-rcar-gen2.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/pci/host/pci-rcar-gen2.c b/drivers/pci/host/pci-rcar-gen2.c
index 3ef854f..17681ea 100644
--- a/drivers/pci/host/pci-rcar-gen2.c
+++ b/drivers/pci/host/pci-rcar-gen2.c
@@ -99,6 +99,7 @@ struct rcar_pci_priv {
struct resource io_res;
struct resource mem_res;
struct resource *cfg_res;
+ int domain;
unsigned busnr;
int irq;
unsigned long window_size;
@@ -373,6 +374,8 @@ static int rcar_pci_probe(struct platform_device *pdev)
priv->window_size = SZ_1G;
+ priv->domain = of_pci_get_domain_nr(pdev->dev.of_node, true);
+
if (pdev->dev.of_node) {
struct resource busnr;
int ret;
@@ -397,6 +400,9 @@ static int rcar_pci_probe(struct platform_device *pdev)
hw.map_irq = rcar_pci_map_irq;
hw.ops = &rcar_pci_ops;
hw.setup = rcar_pci_setup;
+#ifdef CONFIG_PCI_DOMAINS
+ hw.domain = priv->domain;
+#endif
pci_common_init_dev(&pdev->dev, &hw);
return 0;
}
--
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 ` [PATCH 1/3] PCI: rcar-pcie: Add call to get domain nr Phil Edworthy
2014-09-22 9:51 ` Phil Edworthy [this message]
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-3-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).