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 1119DC433E3 for ; Fri, 22 May 2020 23:48:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D892E20723 for ; Fri, 22 May 2020 23:48:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590191330; bh=DwKzsC//kDJxl4wpgqBdvPofzofJg3/4Ka1tXFw0uwg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=Hl9u6/5l3PkvWXAZOBM4tNCs0J7IhqArO/13RjYRjqKXme/kkgUzvf8bX8zuyGnQ9 yyIajfhWA5sfWK6XNA0AlRMX5rTY+G/Px/DtkiFWNCpRmLDm0lQ73TBxNDhpg16Tit rizNRhl+tGPQ1ftAi5dhqAWu88GoJJDnVo6srZPk= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387438AbgEVXsu (ORCPT ); Fri, 22 May 2020 19:48:50 -0400 Received: from mail-il1-f195.google.com ([209.85.166.195]:42427 "EHLO mail-il1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387413AbgEVXst (ORCPT ); Fri, 22 May 2020 19:48:49 -0400 Received: by mail-il1-f195.google.com with SMTP id 18so12526249iln.9 for ; Fri, 22 May 2020 16:48:49 -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=t2p41fcnPOx/cmrCAPQSy3Fo8KrPmpfN6+RkySuTptI=; b=pU6pC7fpK+mexpvjTKHkGk0kcMmyiHXNZaTL8zwqPgTPOLzm9/Ub9aqGrz6CbpFKjP wM1SrTitSotL2gHIwGKah62m1BmnskGehJBPC8BY+CYKs5sfgzH+kiXLpTd87Lwktz80 94zfrLa6XJ/xeGYfBl941Uo5C10ykpBRLYt5AqWccIWk+xav3nbeCoU2p7DVCtQq/XOv mCChcoUy8mRhVOTFz+tESkItEgHzGqwWipuuXLDoEY8BAZ9nGw3OjfUU7sih9WBct245 RQASY82kK4N81KnzkKD2Iyurt3FOLWmTKvekLYUhA+zQgZPWDsRlsudaGahefwQVe/ty g97w== X-Gm-Message-State: AOAM5312WTzFBMFcN3rEJh7Lwxc4mR27Z+wPkoL6fhOwz1Mt6c7zTCv/ 0rgCD5BZCYndCAM/Pe46mg== X-Google-Smtp-Source: ABdhPJxJb8uMVFTBmE5EjVEFecM8hhfGGfXlSi7Mekr5euEb9ImK+hXgQFJSBd65bfpss/2gmn1F4A== X-Received: by 2002:a92:8d49:: with SMTP id s70mr15410384ild.54.1590191328942; Fri, 22 May 2020 16:48:48 -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.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 May 2020 16:48:48 -0700 (PDT) From: Rob Herring To: Lorenzo Pieralisi Cc: Bjorn Helgaas , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Michal Simek Subject: [PATCH 14/15] PCI: xilinx-nwl: Use pci_host_probe() to register host Date: Fri, 22 May 2020 17:48:31 -0600 Message-Id: <20200522234832.954484-15-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 xilinx-nwl host driver does the same host registration and bus scanning calls as pci_host_probe, so let's use it instead. The only difference is pci_assign_unassigned_bus_resources() was called instead of pci_bus_size_bridges() and pci_bus_assign_resources(). This should be the same. Cc: Michal Simek Signed-off-by: Rob Herring --- drivers/pci/controller/pcie-xilinx-nwl.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/pci/controller/pcie-xilinx-nwl.c b/drivers/pci/controller/pcie-xilinx-nwl.c index 9bd1427f2fd6..32a0b08d6da5 100644 --- a/drivers/pci/controller/pcie-xilinx-nwl.c +++ b/drivers/pci/controller/pcie-xilinx-nwl.c @@ -817,8 +817,6 @@ static int nwl_pcie_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct nwl_pcie *pcie; - struct pci_bus *bus; - struct pci_bus *child; struct pci_host_bridge *bridge; int err; @@ -871,17 +869,7 @@ static int nwl_pcie_probe(struct platform_device *pdev) } } - err = pci_scan_root_bus_bridge(bridge); - if (err) - return err; - - 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 struct platform_driver nwl_pcie_driver = { -- 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 21786C433DF for ; Fri, 22 May 2020 23:52: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 DF1CF206BE for ; Fri, 22 May 2020 23:52:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="sp75jK1S" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DF1CF206BE 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=6OTCS06358Cxk280JPsb+2rDVO171LXrIi8OnGmvfeI=; b=sp75jK1S59DnqO X6B+Svl7cem67P8r4/UlM0HdkeNxet4ngl0qVf+MIeWO1k8UmxkRgVuS/nk3v/74iEWKatLS0FMjU kCDZGa2EEKPA0TMXCZhXoKOp68orP8dvgTaPKRD1D9BAcWod2xLYa2IKVmjZs4pJfcuNzYJEyVkRJ NQXawbsk7Fs5K0RUbrVsPKJsYxTWrz6byXqCn2JVzQ4cx45OMjIO2/23mt77qgGntsvR7pr3Z+xcp vj5OmhZJkA4fhN6PMo7gkB5cKTHNQ1QfvmFqoiW0SxiksfY6hXyxxZ6XWpm7LUex8ZFD8wBxqlsWK pXJYULj1yL9pGpvWib+w==; 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 1jcHT3-0000UG-RT; Fri, 22 May 2020 23:52:45 +0000 Received: from mail-il1-f195.google.com ([209.85.166.195]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jcHPG-0003aY-1h for linux-arm-kernel@lists.infradead.org; Fri, 22 May 2020 23:48:52 +0000 Received: by mail-il1-f195.google.com with SMTP id m6so12482858ilq.7 for ; Fri, 22 May 2020 16:48:49 -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=t2p41fcnPOx/cmrCAPQSy3Fo8KrPmpfN6+RkySuTptI=; b=OidS00vhxHUkmyrlZM2IoYXwGVBhD038jkapVCv82Vt2ao3fF95krpdCWLlPKUhJwP WoHJfah0VSY9dAxftMucO5DBdm1TEBCzwxMZpO0QKuiT2P5ySx2rl1Ai3n2SZpYg7A86 cFD7QfUNiCZ6Sp2IPq6na7Eu9ufXwqwiByU2VMFUhCI6jLnj4sKP5ZL8jgbng/bExM3T AFG3PGVZ6th5ggrK9bOibT2Oc7zVCNcI3uG9ik6bevPgt/1NkvNWdIi8Y2kR8vVsZgNW vMZ1SIBbYMsasAdZNd378N+Ge3ralEq0tLaJBuOcUPdQK/p0JgClGR9rMcdcvz/X/pbL DC5Q== X-Gm-Message-State: AOAM532cJeCjNxlYaP0FG6JvpPAXYEOtJuOlgPAFVYhRsG2wlmDuVX3+ Y244BlDAYdZMWNpRUAeJHN6oYbQ= X-Google-Smtp-Source: ABdhPJxJb8uMVFTBmE5EjVEFecM8hhfGGfXlSi7Mekr5euEb9ImK+hXgQFJSBd65bfpss/2gmn1F4A== X-Received: by 2002:a92:8d49:: with SMTP id s70mr15410384ild.54.1590191328942; Fri, 22 May 2020 16:48:48 -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.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 May 2020 16:48:48 -0700 (PDT) From: Rob Herring To: Lorenzo Pieralisi Subject: [PATCH 14/15] PCI: xilinx-nwl: Use pci_host_probe() to register host Date: Fri, 22 May 2020 17:48:31 -0600 Message-Id: <20200522234832.954484-15-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_164850_235503_D78008DF X-CRM114-Status: GOOD ( 12.54 ) 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, Michal Simek , 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 xilinx-nwl host driver does the same host registration and bus scanning calls as pci_host_probe, so let's use it instead. The only difference is pci_assign_unassigned_bus_resources() was called instead of pci_bus_size_bridges() and pci_bus_assign_resources(). This should be the same. Cc: Michal Simek Signed-off-by: Rob Herring --- drivers/pci/controller/pcie-xilinx-nwl.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/pci/controller/pcie-xilinx-nwl.c b/drivers/pci/controller/pcie-xilinx-nwl.c index 9bd1427f2fd6..32a0b08d6da5 100644 --- a/drivers/pci/controller/pcie-xilinx-nwl.c +++ b/drivers/pci/controller/pcie-xilinx-nwl.c @@ -817,8 +817,6 @@ static int nwl_pcie_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct nwl_pcie *pcie; - struct pci_bus *bus; - struct pci_bus *child; struct pci_host_bridge *bridge; int err; @@ -871,17 +869,7 @@ static int nwl_pcie_probe(struct platform_device *pdev) } } - err = pci_scan_root_bus_bridge(bridge); - if (err) - return err; - - 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 struct platform_driver nwl_pcie_driver = { -- 2.25.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel