From patchwork Mon Sep 22 09:51:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Phil Edworthy X-Patchwork-Id: 4946801 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 4012C9F32F for ; Mon, 22 Sep 2014 09:51:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 13A5C200ED for ; Mon, 22 Sep 2014 09:51:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AD02A20149 for ; Mon, 22 Sep 2014 09:51:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753564AbaIVJvX (ORCPT ); Mon, 22 Sep 2014 05:51:23 -0400 Received: from relmlor2.renesas.com ([210.160.252.172]:25225 "EHLO relmlie1.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753090AbaIVJvV (ORCPT ); Mon, 22 Sep 2014 05:51:21 -0400 Received: from unknown (HELO relmlir2.idc.renesas.com) ([10.200.68.152]) by relmlie1.idc.renesas.com with ESMTP; 22 Sep 2014 18:51:19 +0900 Received: from relmlac4.idc.renesas.com (relmlac4.idc.renesas.com [10.200.69.24]) by relmlir2.idc.renesas.com (Postfix) with ESMTP id B1E0346EAB; Mon, 22 Sep 2014 18:51:19 +0900 (JST) Received: by relmlac4.idc.renesas.com (Postfix, from userid 0) id 93721480A4; Mon, 22 Sep 2014 18:51:19 +0900 (JST) Received: from relmlac4.idc.renesas.com (localhost [127.0.0.1]) by relmlac4.idc.renesas.com (Postfix) with ESMTP id 91D4F480A9; Mon, 22 Sep 2014 18:51:19 +0900 (JST) Received: from relmlii2.idc.renesas.com [10.200.68.66] by relmlac4.idc.renesas.com with ESMTP id UAD32171; Mon, 22 Sep 2014 18:51:19 +0900 X-IronPort-AV: E=Sophos;i="5.04,571,1406559600"; d="scan'208";a="170703499" Received: from unknown (HELO relay51.aps.necel.com) ([10.29.19.60]) by relmlii2.idc.renesas.com with ESMTP; 22 Sep 2014 18:51:19 +0900 Received: from DU0NOTES13.ad.ree.renesas.com ([172.29.24.131]) by relay51.aps.necel.com (8.14.4+Sun/8.14.4) with ESMTP id s8M9pFE3008706; Mon, 22 Sep 2014 18:51:15 +0900 (JST) Received: from duacsls.ad.ree.renesas.com ([172.29.43.47]) by DU0NOTES13.ad.ree.renesas.com (Lotus Domino Release 8.5.3 HF466) with ESMTP id 2014092211511395-120745 ; Mon, 22 Sep 2014 11:51:13 +0200 From: Phil Edworthy To: linux-pci@vger.kernel.org Cc: linux-sh@vger.kernel.org, LAKML , Bjorn Helgaas , Simon Horman , Valentine Barshak , Sergei Shtylyov , Ben Dooks , Jason Gunthorpe , Arnd Bergmann , Liviu Dudau , Phil Edworthy X-Mailer: git-send-email 2.1.0 In-Reply-To: <1411379470-20639-1-git-send-email-phil.edworthy@renesas.com> References: <1411379470-20639-1-git-send-email-phil.edworthy@renesas.com> X-TNEFEvaluated: 1 Message-ID: <1411379470-20639-3-git-send-email-phil.edworthy@renesas.com> Date: Mon, 22 Sep 2014 10:51:09 +0100 Subject: [PATCH 2/3] PCI: rcar-internal-pci: Add call to get domain nr X-MIMETrack: Itemize by SMTP Server on DU0NOTES13/SERVER/REE(Release 8.5.3 HF466|March 09, 2012) at 22.09.2014 11:51:14, Serialize by Router on DU0NOTES13/SERVER/REE(Release 8.5.3 HF466|March 09, 2012) at 22.09.2014 11:51:15, Serialize complete at 22.09.2014 11:51:15 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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; }