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 C6EFCC433E0 for ; Fri, 22 May 2020 23:48:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9916D20757 for ; Fri, 22 May 2020 23:48:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590191321; bh=CRH/tourJbY+/C7uI/1qO2NBHrJYDoGI0hq05Tgue7A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=kI7b83r0saE3Jex2LVizfeINCsVWUnH0InJJrSSRs7E6D7o2aPxlWFoao1IrzM7Xq uZmnMdK9kxKi4jBNQXwZYNTbGY5+KF7TUfzJ5W4f3NwZBQKCvqGdx3aSW1dLKN2+kc T48P2a+IUC1yLjkotorjL89NFfahhFJfogfknwm0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387406AbgEVXsl (ORCPT ); Fri, 22 May 2020 19:48:41 -0400 Received: from mail-io1-f68.google.com ([209.85.166.68]:42509 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387412AbgEVXsk (ORCPT ); Fri, 22 May 2020 19:48:40 -0400 Received: by mail-io1-f68.google.com with SMTP id d5so3835108ios.9 for ; Fri, 22 May 2020 16:48:39 -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=RDGTHJtHoujJlH0xuipOO/+33SMsAgY/ZHK2re0dJMA=; b=pOYL+cVma5GK+8zc8ssnTtw+zaw7UXDjGEhmK3NMEAlunh1uyBdrAgfSPWwfYrbCp+ xDf7vdSsEkwASOxE6M7VAAUH1gficeWC2MSWD+5F0EaA5AuxZrKYbB8Pe5t3V6TLEjzi lHalcEQShUxbkPrOpakmS/7B7o9iHtzYFf6dl77l8VrHhjWXE94OhGiYy7LjLxDAS1Tb a1nyXtumGxbHLyTnsJXo+Xz90EZRPemO1H80D1iE9bvTjCKkH1Fs547R+pzQa9R7nmXw 8j8yPUI3qze18zow0HPlaRuf7/6ZBE5+ac04AEc4sQga/I9FTg15zgRRIK32GK2Ixbdr B8JA== X-Gm-Message-State: AOAM532gtAbZi+g4jNAMQqVzSl7jVf7dranPQUDkvJKQlI0tt+hQcIUU ZDjM76+bBPy+9e45ZGsYNg== X-Google-Smtp-Source: ABdhPJyqxau5tXcv4nxZOzDxI5Uzfaw3Xu8Y/R/qSeDfpABcMfVTrSAct3cO36GKdKu07xo63/tr1g== X-Received: by 2002:a5d:8a01:: with SMTP id w1mr5106567iod.71.1590191319312; Fri, 22 May 2020 16:48:39 -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.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 May 2020 16:48:38 -0700 (PDT) From: Rob Herring To: Lorenzo Pieralisi Cc: Bjorn Helgaas , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Karthikeyan Mitran , Hou Zhiqiang Subject: [PATCH 05/15] PCI: mobiveil: Use pci_host_probe() to register host Date: Fri, 22 May 2020 17:48:22 -0600 Message-Id: <20200522234832.954484-6-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 mobiveil host driver does the same host registration and bus scanning calls as pci_host_probe, so let's use it instead. Cc: Karthikeyan Mitran Cc: Hou Zhiqiang Signed-off-by: Rob Herring --- .../pci/controller/mobiveil/pcie-mobiveil-host.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/drivers/pci/controller/mobiveil/pcie-mobiveil-host.c b/drivers/pci/controller/mobiveil/pcie-mobiveil-host.c index 5907baa9b1f2..5974619811ec 100644 --- a/drivers/pci/controller/mobiveil/pcie-mobiveil-host.c +++ b/drivers/pci/controller/mobiveil/pcie-mobiveil-host.c @@ -569,8 +569,6 @@ int mobiveil_pcie_host_probe(struct mobiveil_pcie *pcie) struct mobiveil_root_port *rp = &pcie->rp; struct pci_host_bridge *bridge = rp->bridge; struct device *dev = &pcie->pdev->dev; - struct pci_bus *bus; - struct pci_bus *child; int ret; ret = mobiveil_pcie_parse_dt(pcie); @@ -620,17 +618,5 @@ int mobiveil_pcie_host_probe(struct mobiveil_pcie *pcie) return ret; } - /* setup the kernel resources for the newly added PCIe root bus */ - ret = pci_scan_root_bus_bridge(bridge); - if (ret) - 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); } -- 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 CC33DC433DF for ; Fri, 22 May 2020 23:50:47 +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 99BBF20738 for ; Fri, 22 May 2020 23:50:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="iOd3CDgZ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 99BBF20738 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=cfzV/zm+7gtEURN+cCRZYrK9VKRzrv7Bt4dsDvIBNwI=; b=iOd3CDgZIXgi/o 8mDrnAz63y8WC/dxkWgDLW31lfFDnMxJOoB4LJfrnVbfRusZZd0W9j4Ar2iS/m6Ki605B4QP8ACBc P9rePPB3tYCiGni8CyOIQ5AvHj77cOgtmQ2GMBcx6mEvsffc2mtGMcfWUqDwSSPcqJEeIKXFTlJdb dXOcFOUzXrdFYlTUjXvrLrlhbXff9S0EJ0UgkRHQMHXgFyQT60zxZs9BL3d/UWOPqWroWDgtJFK1R TjqYsmu1Aoqic9oIvBGxNuscOCDrsEhm+OqctNayf3v1f+Gp4EfPqpvJGxHan9Gnzl4jV0dcEBV5x ZXQ6eUHrnla7p05lVc+g==; 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 1jcHR7-0007Aw-Vl; Fri, 22 May 2020 23:50:45 +0000 Received: from mail-io1-f66.google.com ([209.85.166.66]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jcHP6-0003Ns-DU for linux-arm-kernel@lists.infradead.org; Fri, 22 May 2020 23:48:41 +0000 Received: by mail-io1-f66.google.com with SMTP id o5so13321986iow.8 for ; Fri, 22 May 2020 16:48:40 -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=RDGTHJtHoujJlH0xuipOO/+33SMsAgY/ZHK2re0dJMA=; b=Sytw/0LR4JOthqqYjFATBpfV3TqeQZVJncX0e6qRLZigKo863mqocZ64He7+m7KOXn 0DGpXP7ONTFpJfNwXdTqeBWgXiyBVcGmkFkH7Xdy7wgtMpmYAqHApJgDbz0BZeA9qL9B 7Ttk4a5l+41wuKLzWgi7aIX10h4j1H1K5q64CMtEthBXIZbdl02XlKL3RhkGxuiJSlNR cS0XrtUEbqARvReSXe5OMmIRNULq4WhGoWW/PWdwHj/HnIRWc7IVsJFYKZtZPaj9TWE7 ubw82P4GXkkAHy6QCjB+Is58nvFzmoFonlnIDwpA4g56PhwyEmz7P781v7rl2M40XQ81 Ndjg== X-Gm-Message-State: AOAM531fWDcbjQzPRaXVEZRZh227ijRSTpG8074xDnTph+I6yUOhqdFr 2pmVP12b99TZGCIaPoUZNA== X-Google-Smtp-Source: ABdhPJyqxau5tXcv4nxZOzDxI5Uzfaw3Xu8Y/R/qSeDfpABcMfVTrSAct3cO36GKdKu07xo63/tr1g== X-Received: by 2002:a5d:8a01:: with SMTP id w1mr5106567iod.71.1590191319312; Fri, 22 May 2020 16:48:39 -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.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 May 2020 16:48:38 -0700 (PDT) From: Rob Herring To: Lorenzo Pieralisi Subject: [PATCH 05/15] PCI: mobiveil: Use pci_host_probe() to register host Date: Fri, 22 May 2020 17:48:22 -0600 Message-Id: <20200522234832.954484-6-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_164840_465600_32B564B4 X-CRM114-Status: GOOD ( 12.40 ) 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, Hou Zhiqiang , Karthikeyan Mitran , 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 mobiveil host driver does the same host registration and bus scanning calls as pci_host_probe, so let's use it instead. Cc: Karthikeyan Mitran Cc: Hou Zhiqiang Signed-off-by: Rob Herring --- .../pci/controller/mobiveil/pcie-mobiveil-host.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/drivers/pci/controller/mobiveil/pcie-mobiveil-host.c b/drivers/pci/controller/mobiveil/pcie-mobiveil-host.c index 5907baa9b1f2..5974619811ec 100644 --- a/drivers/pci/controller/mobiveil/pcie-mobiveil-host.c +++ b/drivers/pci/controller/mobiveil/pcie-mobiveil-host.c @@ -569,8 +569,6 @@ int mobiveil_pcie_host_probe(struct mobiveil_pcie *pcie) struct mobiveil_root_port *rp = &pcie->rp; struct pci_host_bridge *bridge = rp->bridge; struct device *dev = &pcie->pdev->dev; - struct pci_bus *bus; - struct pci_bus *child; int ret; ret = mobiveil_pcie_parse_dt(pcie); @@ -620,17 +618,5 @@ int mobiveil_pcie_host_probe(struct mobiveil_pcie *pcie) return ret; } - /* setup the kernel resources for the newly added PCIe root bus */ - ret = pci_scan_root_bus_bridge(bridge); - if (ret) - 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); } -- 2.25.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel