From patchwork Fri Aug 3 14:38:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 10555199 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CB5C215A6 for ; Fri, 3 Aug 2018 14:39:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B89372C7C0 for ; Fri, 3 Aug 2018 14:39:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AD2982C7D6; Fri, 3 Aug 2018 14:39:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 53F6D2C7D5 for ; Fri, 3 Aug 2018 14:39:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=rPxQFkZFnyippJwFh/He892CPE3m0qWGfhn3gMzWbd8=; b=Njp OxUUTn8NOEd5/Jm2F51wEUbE0vn+iirGWDt3DJY5lrFrg0y4sKPzE91BGCEfbceVsIRTkaOnqVfV9 02DmBYLyDpXpG4hnLLL/FPhUKsc0o30kgxNF0/+03aYAkbMgDZWSR3cehPUK6jmFaFMqnYZkb+QZX oQABfgr1gHC8g9uBWGX+mWos4GkscJK4k3sl0gCLPRike+R3wTNGPOoG07O++aCxIywVjla0alefP i5CnfC48ZJ77LzMIv1gRTCUY2WIXZG1eIFNGlqJ8bbk3G66g2c1JpoDiD9vJP/fO2zVe2/GwRTtLj Wj381XFcVO8kRVd9zFmxToj3QM3Wmmw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1flbEx-0002Az-16; Fri, 03 Aug 2018 14:39:39 +0000 Received: from mail.bootlin.com ([62.4.15.54]) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1flbEP-0001Qf-ED for linux-arm-kernel@lists.infradead.org; Fri, 03 Aug 2018 14:39:08 +0000 Received: by mail.bootlin.com (Postfix, from userid 110) id 8F8652074F; Fri, 3 Aug 2018 16:38:50 +0200 (CEST) Received: from localhost (AAubervilliers-681-1-99-143.w90-88.abo.wanadoo.fr [90.88.4.143]) by mail.bootlin.com (Postfix) with ESMTPSA id 63C3920712; Fri, 3 Aug 2018 16:38:50 +0200 (CEST) From: Thomas Petazzoni To: Bjorn Helgaas , Lorenzo Pieralisi , linux-pci@vger.kernel.org Subject: [PATCH v2 0/6] PCI: mvebu: cleanup and improvements Date: Fri, 3 Aug 2018 16:38:42 +0200 Message-Id: <20180803143848.21551-1-thomas.petazzoni@bootlin.com> X-Mailer: git-send-email 2.14.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180803_073905_625644_6A91A30D X-CRM114-Status: GOOD ( 10.23 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Antoine Tenart , Gregory Clement , Maxime Chevallier , Nadav Haklai , Thomas Petazzoni , =?utf-8?q?Miqu=C3=A8l_Rayn?= =?utf-8?q?al?= , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Hello, This is the v2 of the pci-mvebu cleanup and improvements, mainly aiming at using pci_host_bridge. Since v1, the changes are: - Rebase on v4.18-rc1 to make sure the patches apply - Add a patch fixing the I/O space end calculation (using resource_size() as the .end address of a resource is not correct) - Only remap the I/O space if there is a PCI I/O aperture described in the DT. - Use resource_size() in the loop mapping the I/O space, as suggested by Lorenzo. - Use pci_add_resource() instead of pci_add_resource_offset(), as suggested by Lorenzo. - Revert to using pci_ioremap_io(), since we need to map with a special memory type on Armada platforms, and pci_remap_iospace() doesn't allow to do that. Noticed by Lorenzo. Thanks! Thomas Thomas Petazzoni (6): PCI: mvebu: Remove redundant platform_set_drvdata() call PCI: mvebu: fix I/O space end address calculation PCI: mvebu: only remap I/O space if configured PCI: mvebu: use resource_size() to remap I/O space PCI: mvebu: Convert to use pci_host_bridge directly PCI: mvebu: Drop bogus comment above mvebu_pcie_map_registers() drivers/pci/controller/pci-mvebu.c | 153 +++++++++++++++++-------------------- 1 file changed, 68 insertions(+), 85 deletions(-)