@@ -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;
}
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(+)