From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6C884C433DF for ; Fri, 22 May 2020 23:48:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3185820723 for ; Fri, 22 May 2020 23:48:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590191324; bh=3xqomzrC6c7yLoeGvL5bKTqBEhOJ8GF2Qg/wV0RAUc0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=ACOwPrb8vyAUUNeNj8HFaFno5AAhvROKAIl4ggPkoQ6d278Ol3vP6CW4OqZSmuqT+ uXMDfVt7zW2aXMrIT6/4YNeUgFNroDUdskBCQbqV3iCRrygzTjAWZGABy5FMzzIUwq TTnk7eBKqXbP8ByYEgDOgCURQo0D+PSMxaYDMfEs= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387418AbgEVXsn (ORCPT ); Fri, 22 May 2020 19:48:43 -0400 Received: from mail-io1-f66.google.com ([209.85.166.66]:46669 "EHLO mail-io1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387417AbgEVXsn (ORCPT ); Fri, 22 May 2020 19:48:43 -0400 Received: by mail-io1-f66.google.com with SMTP id j8so13282662iog.13 for ; Fri, 22 May 2020 16:48:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Hu+r9D87KcoWa189MTy6Edmp4pidtqObZuiMTiz4cgc=; b=L4gL4OhXYE7nUbH8ZJhp2KcFZegEglt3DHqsRDYKeBj1PlCqZutN5y60NhBJL3mDEt GoU23aTdnWGL9Yt3cHTbbh85rNMlxpvFPMRlzsKrU8Ks/7mZdv0qKogLcqoGHbjmJ2LB k2wEy4yS9hFrouhju9KP13zg2xf68ztNExU0iTp3lI8p8G9ciqxJ54Mh+aJJ9lpkb52q mKY8ENX+SA+RVXaVes3AU+cgOJRLZSYcEKR3oEwB4LpCSiipgmQYqvkNGEWkCNr9HokL IPtbrf049HRMA3cuKxmUXyrGvZg07pE5yBnu4KRfoaQYnqiA/LkTLPpB3VIX0mb361Uh RAYA== X-Gm-Message-State: AOAM530G1sEv/JpxoP9vJFjGRNtyn33qbFOP1xaxGDhD8Kf1KCr6J5Dw 9VsWg2JSbaWIlP5ATeFENQ== X-Google-Smtp-Source: ABdhPJzvS3aCPPD+k4N9FAiNd4VPWGqJzq7xAINIEBc8KXR6heifVNZNNeQbLmVhFEJExzb4WHJESg== X-Received: by 2002:a6b:bc85:: with SMTP id m127mr5019308iof.89.1590191322407; Fri, 22 May 2020 16:48:42 -0700 (PDT) Received: from xps15.herring.priv ([64.188.179.252]) by smtp.googlemail.com with ESMTPSA id w23sm4390877iod.9.2020.05.22.16.48.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 May 2020 16:48:41 -0700 (PDT) From: Rob Herring To: Lorenzo Pieralisi Cc: Bjorn Helgaas , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 08/15] PCI: versatile: Use pci_host_probe() to register host Date: Fri, 22 May 2020 17:48:25 -0600 Message-Id: <20200522234832.954484-9-robh@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200522234832.954484-1-robh@kernel.org> References: <20200522234832.954484-1-robh@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org The versatile host driver does the same host registration and bus scanning calls as pci_host_probe, so let's use it instead. Cc: Lorenzo Pieralisi Signed-off-by: Rob Herring --- drivers/pci/controller/pci-versatile.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/pci/controller/pci-versatile.c b/drivers/pci/controller/pci-versatile.c index b911359b6d81..e90f0cc65c73 100644 --- a/drivers/pci/controller/pci-versatile.c +++ b/drivers/pci/controller/pci-versatile.c @@ -70,7 +70,6 @@ static int versatile_pci_probe(struct platform_device *pdev) int ret, i, myslot = -1, mem = 1; u32 val; void __iomem *local_pci_cfg_base; - struct pci_bus *bus, *child; struct pci_host_bridge *bridge; bridge = devm_pci_alloc_host_bridge(dev, 0); @@ -164,18 +163,7 @@ static int versatile_pci_probe(struct platform_device *pdev) bridge->map_irq = of_irq_parse_and_map_pci; bridge->swizzle_irq = pci_common_swizzle; - ret = pci_scan_root_bus_bridge(bridge); - if (ret < 0) - return ret; - - bus = bridge->bus; - - pci_assign_unassigned_bus_resources(bus); - list_for_each_entry(child, &bus->children, node) - pcie_bus_configure_settings(child); - pci_bus_add_devices(bus); - - return 0; + return pci_host_probe(bridge); } static const struct of_device_id versatile_pci_of_match[] = { -- 2.25.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A58F9C433E0 for ; Fri, 22 May 2020 23:51:27 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 61421206BE for ; Fri, 22 May 2020 23:51:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Z+0jWt7y" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 61421206BE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: 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: List-Owner; bh=4bNDWKRDofd2/n/H0+/s1gTqHqf60AxUSUCec0C16V0=; b=Z+0jWt7ys5JxzH b31maVIrMfoeX7xaZw1kxRa/X+S3aZLWLN9OwGHsgcCjBWWRoZdukPnoqUGWiHSUO5eWKPFUgOhXH vaQxAqj6Wve+gyzBOu9mBsGON3cjDDYD+jbFtFxydSE0geO9Um4Wr8ptGtLoBn2dYbxEo6l4hTRrV 8NnSEeHweYzuvX9R7PyALTjiptMbNPX74YfIeOUC0brRYieOBxOtRpZB4RE0BqVZGXOM1EMylNXKN imvmTlcvqD6fjKayTIfCyPPHMzE6+ZzV9pQ/56UY7n4QCTNt+gAPCxOz+pQOHXqzfgfb40AQIrShC RNgZm7rrdgWtgg1500UA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jcHRl-0007gr-0D; Fri, 22 May 2020 23:51:25 +0000 Received: from mail-io1-f67.google.com ([209.85.166.67]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jcHPA-0003Rn-6d for linux-arm-kernel@lists.infradead.org; Fri, 22 May 2020 23:48:46 +0000 Received: by mail-io1-f67.google.com with SMTP id q8so11952017iow.7 for ; Fri, 22 May 2020 16:48:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Hu+r9D87KcoWa189MTy6Edmp4pidtqObZuiMTiz4cgc=; b=GNgo21s7PXbwEWwO6sB2fQd6H0Zduw1iUif9UhvGcu5XJ0BbDmm02uNjtz6ruH65Kr zN1RWZkPpGVcLtDdUme8Lb2IT6Kh4xxHIOi8FPHJ60vjeqeZm659RvKNO6EvyMmEqL+4 MaVZPKYDN6iMcuO9/0GUKlKTsqqfCeLChjSxMlvAIG22boEZHtJspyHuDQ+CF+uzjAt9 9TogolR3VQ56L5wcHwQ9aEyFZrFfxcdgHvk0wugy17DjY9ZI4i0JxS+k4lTX8ypvc0JA NkhgkTtNokFfg1kee3wQPz+No2+3BsEl08H6Ma+S7aE+HLninqGbrLY5P0ui6sZ+mccW LTZA== X-Gm-Message-State: AOAM533iM9Ntfhz0Jxq/AfX8Qq72blkUB/w3MyntCjjxqur1oGcCatWI CJCywWf3HdEq99cNsbs64sxcE84= X-Google-Smtp-Source: ABdhPJzvS3aCPPD+k4N9FAiNd4VPWGqJzq7xAINIEBc8KXR6heifVNZNNeQbLmVhFEJExzb4WHJESg== X-Received: by 2002:a6b:bc85:: with SMTP id m127mr5019308iof.89.1590191322407; Fri, 22 May 2020 16:48:42 -0700 (PDT) Received: from xps15.herring.priv ([64.188.179.252]) by smtp.googlemail.com with ESMTPSA id w23sm4390877iod.9.2020.05.22.16.48.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 May 2020 16:48:41 -0700 (PDT) From: Rob Herring To: Lorenzo Pieralisi Subject: [PATCH 08/15] PCI: versatile: Use pci_host_probe() to register host Date: Fri, 22 May 2020 17:48:25 -0600 Message-Id: <20200522234832.954484-9-robh@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200522234832.954484-1-robh@kernel.org> References: <20200522234832.954484-1-robh@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200522_164844_342518_13E26164 X-CRM114-Status: GOOD ( 12.20 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bjorn Helgaas , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org The versatile host driver does the same host registration and bus scanning calls as pci_host_probe, so let's use it instead. Cc: Lorenzo Pieralisi Signed-off-by: Rob Herring --- drivers/pci/controller/pci-versatile.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/pci/controller/pci-versatile.c b/drivers/pci/controller/pci-versatile.c index b911359b6d81..e90f0cc65c73 100644 --- a/drivers/pci/controller/pci-versatile.c +++ b/drivers/pci/controller/pci-versatile.c @@ -70,7 +70,6 @@ static int versatile_pci_probe(struct platform_device *pdev) int ret, i, myslot = -1, mem = 1; u32 val; void __iomem *local_pci_cfg_base; - struct pci_bus *bus, *child; struct pci_host_bridge *bridge; bridge = devm_pci_alloc_host_bridge(dev, 0); @@ -164,18 +163,7 @@ static int versatile_pci_probe(struct platform_device *pdev) bridge->map_irq = of_irq_parse_and_map_pci; bridge->swizzle_irq = pci_common_swizzle; - ret = pci_scan_root_bus_bridge(bridge); - if (ret < 0) - return ret; - - bus = bridge->bus; - - pci_assign_unassigned_bus_resources(bus); - list_for_each_entry(child, &bus->children, node) - pcie_bus_configure_settings(child); - pci_bus_add_devices(bus); - - return 0; + return pci_host_probe(bridge); } static const struct of_device_id versatile_pci_of_match[] = { -- 2.25.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel