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 B73D1C433E2 for ; Fri, 22 May 2020 23:48:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 96573207D8 for ; Fri, 22 May 2020 23:48:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590191325; bh=vkTZAhOxML5J2W0WiNmq5y8QtbZI22qLeH3ioCO0PEo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=Q5Zpu4shEPYS0pa1o9/TPBI4oT4tuADs5PLHmRCybG/zbyUB1ymO781j38WUH9Mxi vehwzXr8tb4UPik+7ZGKxttA1ATeX9tqOs0WBt0gSphwh2DHMOjr6bYNHAf6qPwWIr cop8AGRTjVj5h3lKSTcvBiPb1YSGxki9/S2bxtwo= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387427AbgEVXsp (ORCPT ); Fri, 22 May 2020 19:48:45 -0400 Received: from mail-io1-f65.google.com ([209.85.166.65]:46669 "EHLO mail-io1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387412AbgEVXso (ORCPT ); Fri, 22 May 2020 19:48:44 -0400 Received: by mail-io1-f65.google.com with SMTP id j8so13282692iog.13 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=esB6b61apNwpYj2Ii2qJBKmfmJ2cKVbjKA7d7D0yxhA=; b=KMAXyptnOOV365s46hLTHSJ/N4D0wcAkoPvpeBpl3O75WqWvmLSyLfyGwVC0wDf0Xm OWODfjyGLTck76RMFi0f/vAbMGV+AKXW8EC9c5SDBvjVKuo++hrCQYJwOSm0YKcu7JJX vs3IF3tCPrqq4luhrl6tQ33YVsn9ypfTHW0LiNS1l88rKKmnwDugwh36LCtIdoCXUem4 9WMbARaUZKN+Ui2Ms/Ge9dPFENLPf9OVGfzViw5eWfW9qJqxB9Ll79f95JsNDKCS1sGE zA80h5k4QuKUR4FRcE9uTC2SF5+8m7oSoeES3PzY0kIzJzWr3DcKtmAXKxe6OP+lEgQI uQyQ== X-Gm-Message-State: AOAM530kUuI8gmf9VqbcWa/8X4nyTIWY3D3f54VVg2bd8EVveAN50ybZ riAocRyHCDaGCcfKvNg+8w== X-Google-Smtp-Source: ABdhPJyNYc9vzogrqFrsqVMURFj3X5uQdcgBg6RgjMS5Fz1B6QbL79L43BEqeIa+lFhIECyX99pQFw== X-Received: by 2002:a6b:5008:: with SMTP id e8mr5162852iob.161.1590191323471; Fri, 22 May 2020 16:48:43 -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.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 May 2020 16:48:42 -0700 (PDT) From: Rob Herring To: Lorenzo Pieralisi Cc: Bjorn Helgaas , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Toan Le Subject: [PATCH 09/15] PCI: xgene: Use pci_host_probe() to register host Date: Fri, 22 May 2020 17:48:26 -0600 Message-Id: <20200522234832.954484-10-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 xgene host driver does the same host registration and bus scanning calls as pci_host_probe, so let's use it instead. Cc: Toan Le Signed-off-by: Rob Herring --- drivers/pci/controller/pci-xgene.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/pci/controller/pci-xgene.c b/drivers/pci/controller/pci-xgene.c index d1efa8ffbae1..5aee802946cb 100644 --- a/drivers/pci/controller/pci-xgene.c +++ b/drivers/pci/controller/pci-xgene.c @@ -591,7 +591,6 @@ static int xgene_pcie_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct device_node *dn = dev->of_node; struct xgene_pcie_port *port; - struct pci_bus *bus, *child; struct pci_host_bridge *bridge; int ret; @@ -632,17 +631,7 @@ static int xgene_pcie_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 xgene_pcie_match_table[] = { -- 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 64B82C433DF for ; Fri, 22 May 2020 23:52:13 +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 2664B206BE for ; Fri, 22 May 2020 23:52:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="J0dUxI8i" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2664B206BE 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=XOUiQU3E5yuBHXdfwKeSlQtqHbUVvgaEp/deOkq7CkE=; b=J0dUxI8i4Z0MgP D6clYuQIJP+tX9oNY4XGoEvEpig8MQz1r29MgxsDHLsllUBxl5VL/TBXSCr0k7Mtn44MANk+sCaSv wsBhHg7elNO8p83lsUJ4RLryyOVZjlU5HyohugxhGJ8oqXwKciWR6LL7cOGny/sQFBs1VnweLeyMr fHmCqfeBEc1sh1K7yD2Hg/+uvYDsnBm76jbPI6KunCMbbLTEeWygn/2LnNJJuN2veSUNgcQuVhzsw QMffkEDPnRY8alSED1/zNKhwmzjiFLp8+7fp0aKut9FPgWiVU6B6IKRvLNQltvoEOu2L1thLMN/Z5 5mK5ssfBGlp4ZuSybUqw==; 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 1jcHSW-0008R1-Sx; Fri, 22 May 2020 23:52:12 +0000 Received: from mail-io1-f68.google.com ([209.85.166.68]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jcHPA-0003Sj-8y for linux-arm-kernel@lists.infradead.org; Fri, 22 May 2020 23:48:45 +0000 Received: by mail-io1-f68.google.com with SMTP id f4so13286550iov.11 for ; Fri, 22 May 2020 16:48:44 -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=esB6b61apNwpYj2Ii2qJBKmfmJ2cKVbjKA7d7D0yxhA=; b=EjRivG57uocagmbsfqsQMNSkL8N3HoQXhHdQ3oFd2ZZWBIPpj4OxUmctSppfltVWGy eIoRTkV+eJQY2X4d4gMUCc4lRitfe7Liof7F2traygqZ43wbdhWtnUuyCz30LhuSrCmS w5nDQx3dZUr1KTRZGVW+5mIRmH74+t3RtOPdYi6+xYuY6fKytrYY61ONs+SLTV6aYqs9 g9zNAftn+ugFgXXsmM8WN/QlMZz3sFhxIa/X3j/wWC8Y1qptoaG5CX9IrgpIodnpaiFr NPAwtp0lxEod81PFYdnzxfnHTd5gbGNUZen73ajQvh+omphWRZc54DM5MAm5BTd/npGD KVeQ== X-Gm-Message-State: AOAM5339XlxfKIyDq//FyyKRvzqeMzlzDihCIX0fRmlNv09HUqW4u+gD 3SKQhUUVi36u+OZahou1qg== X-Google-Smtp-Source: ABdhPJyNYc9vzogrqFrsqVMURFj3X5uQdcgBg6RgjMS5Fz1B6QbL79L43BEqeIa+lFhIECyX99pQFw== X-Received: by 2002:a6b:5008:: with SMTP id e8mr5162852iob.161.1590191323471; Fri, 22 May 2020 16:48:43 -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.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 May 2020 16:48:42 -0700 (PDT) From: Rob Herring To: Lorenzo Pieralisi Subject: [PATCH 09/15] PCI: xgene: Use pci_host_probe() to register host Date: Fri, 22 May 2020 17:48:26 -0600 Message-Id: <20200522234832.954484-10-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_363526_94E17086 X-CRM114-Status: GOOD ( 11.82 ) 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, Toan Le , 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 xgene host driver does the same host registration and bus scanning calls as pci_host_probe, so let's use it instead. Cc: Toan Le Signed-off-by: Rob Herring --- drivers/pci/controller/pci-xgene.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/pci/controller/pci-xgene.c b/drivers/pci/controller/pci-xgene.c index d1efa8ffbae1..5aee802946cb 100644 --- a/drivers/pci/controller/pci-xgene.c +++ b/drivers/pci/controller/pci-xgene.c @@ -591,7 +591,6 @@ static int xgene_pcie_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct device_node *dn = dev->of_node; struct xgene_pcie_port *port; - struct pci_bus *bus, *child; struct pci_host_bridge *bridge; int ret; @@ -632,17 +631,7 @@ static int xgene_pcie_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 xgene_pcie_match_table[] = { -- 2.25.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel