From patchwork Wed Nov 24 15:41:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 12693549 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1C1DEC433F5 for ; Wed, 24 Nov 2021 15:43:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6sPuF4rkAozZTJEbycTNR2MGaXsoYun+ksnA1Ymwx2M=; b=2hWVxQp6MG4Czi l58GfdKXzDMcg/CP6aCw+UCcjsC3ER3WPKSa83lknt0wFYlwpBsllF+4FpK+ZTi65Qq2XKpU+u4/Z VT73W0w3fCnd3RCNJSD1KxvZhuWwEO1xDpkgr0jn4fgWfFhaITOpCaLzLN3/4gPvsKOccuZLvFJEM 4nliSAILCJ3BPgBUByRNIjG15OhM3oxmqAV3uNVqa/y4uMleFWIxgKYJ5ah7tPf4AWjAdpmo1o5A1 UdTA8m+MbLwMeb69aX2CteRrF2uvoKJfkokUj2YwXqj7ODDktj72ciMVbtN5J0rxUwrxDhogdZgb6 qmigSLMGwOQBlMBuN1fw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mpuPV-0057Hd-UB; Wed, 24 Nov 2021 15:42:14 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mpuP5-005792-TB for linux-arm-kernel@lists.infradead.org; Wed, 24 Nov 2021 15:41:49 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6934160FE3; Wed, 24 Nov 2021 15:41:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1637768507; bh=6tDf7XJQIJvtSbp9viQfuVz7wDd2WfE7mXusR8/VED8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Pvhol1Ht81T34h17oByeGlEXxfM2tonYSzmIX43HESR6gMDHEIckCw4JaBtcvazJe elCaAg+GzntUtRo4XYbAqLgKE+rfDQWd6I7TkB1OdNM47rsIWK4Bzqr2Te5h80NtTv PN66gaFwWvKCOsWciD5cxa8asipHRnIeqco+vYaMMKo3Vr0sGiYPVWWlxYDGBK6EZx sAuS+otIAJB4VHm9bx1/gBy8z4ojFDLn84+Lfo5d/xivt8r3mkx8uGROlJHBKK7c5O 1aq292rOQYMeW7s0H0J/AlN+h9tqEtcOEhUluhti0ZcCC4PMcBFm6403VjgKQw1DLp GAf6ee1a1IooQ== Received: by pali.im (Postfix) id 28DAD56D; Wed, 24 Nov 2021 16:41:47 +0100 (CET) From: =?utf-8?q?Pali_Roh=C3=A1r?= To: Russell King , Andrew Lunn , Sebastian Hesselbarth , Gregory Clement , Thomas Petazzoni , Lorenzo Pieralisi , Rob Herring , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Bjorn Helgaas , Dominik Brodowski , Nicolas Ferre , Alexandre Belloni , Ludovic Desroches , =?utf-8?q?Marek_Beh?= =?utf-8?q?=C3=BAn?= Cc: linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/5] PCI: mvebu: Remove custom mvebu_pci_host_probe() function Date: Wed, 24 Nov 2021 16:41:14 +0100 Message-Id: <20211124154116.916-4-pali@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20211124154116.916-1-pali@kernel.org> References: <20211124154116.916-1-pali@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211124_074148_006056_0FD62818 X-CRM114-Status: GOOD ( 15.17 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Now after pci_ioremap_io() usage was replaced by devm_pci_remap_iospace() function, there is no need to use custom mvebu_pci_host_probe() function. Current implementation of mvebu_pci_host_probe() is same as standard PCI core functionn pci_host_probe(). So replace mvebu_pci_host_probe() call by pci_host_probe() and remove custom mvebu_pci_host_probe() function. Signed-off-by: Pali Rohár --- drivers/pci/controller/pci-mvebu.c | 41 +----------------------------- 1 file changed, 1 insertion(+), 40 deletions(-) diff --git a/drivers/pci/controller/pci-mvebu.c b/drivers/pci/controller/pci-mvebu.c index a55b8bd5eb62..f2180e4630a1 100644 --- a/drivers/pci/controller/pci-mvebu.c +++ b/drivers/pci/controller/pci-mvebu.c @@ -1005,45 +1005,6 @@ static int mvebu_pcie_parse_request_resources(struct mvebu_pcie *pcie) return 0; } -/* - * This is a copy of pci_host_probe(), except that it does the I/O - * remap as the last step, once we are sure we won't fail. - * - * It should be removed once the I/O remap error handling issue has - * been sorted out. - */ -static int mvebu_pci_host_probe(struct pci_host_bridge *bridge) -{ - struct pci_bus *bus, *child; - int ret; - - ret = pci_scan_root_bus_bridge(bridge); - if (ret < 0) { - dev_err(bridge->dev.parent, "Scanning root bridge failed"); - return ret; - } - - bus = bridge->bus; - - /* - * We insert PCI resources into the iomem_resource and - * ioport_resource trees in either pci_bus_claim_resources() - * or pci_bus_assign_resources(). - */ - if (pci_has_flag(PCI_PROBE_ONLY)) { - pci_bus_claim_resources(bus); - } else { - pci_bus_size_bridges(bus); - pci_bus_assign_resources(bus); - - list_for_each_entry(child, &bus->children, node) - pcie_bus_configure_settings(child); - } - - pci_bus_add_devices(bus); - return 0; -} - static int mvebu_pcie_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; @@ -1118,7 +1079,7 @@ static int mvebu_pcie_probe(struct platform_device *pdev) bridge->ops = &mvebu_pcie_ops; bridge->align_resource = mvebu_pcie_align_resource; - return mvebu_pci_host_probe(bridge); + return pci_host_probe(bridge); } static const struct of_device_id mvebu_pcie_of_match_table[] = {