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: 10555177 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 52DC915A6 for ; Fri, 3 Aug 2018 14:38:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 436FA2C7C0 for ; Fri, 3 Aug 2018 14:38:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3586B2C7D6; Fri, 3 Aug 2018 14:38:54 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BF80C2C7D5 for ; Fri, 3 Aug 2018 14:38:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732411AbeHCQfa (ORCPT ); Fri, 3 Aug 2018 12:35:30 -0400 Received: from mail.bootlin.com ([62.4.15.54]:50326 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732250AbeHCQf3 (ORCPT ); Fri, 3 Aug 2018 12:35:29 -0400 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 Cc: Nadav Haklai , Gregory Clement , =?utf-8?q?Miqu=C3=A8l_Raynal?= , Maxime Chevallier , Antoine Tenart , linux-arm-kernel@lists.infradead.org, Thomas Petazzoni 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 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.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(-)