From patchwork Fri Aug 21 03:53:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 248058 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:d4c:0:0:0:0 with SMTP id h12csp4757ilj; Thu, 20 Aug 2020 20:55:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwzCepOrdhzSc2QsKc+QOavR6KcP4QoesA9hnD4XsMWHfaJsD+4KyRP0sMtvMlitUr8peRE X-Received: by 2002:a05:6402:31ba:: with SMTP id dj26mr973684edb.181.1597982132482; Thu, 20 Aug 2020 20:55:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597982132; cv=none; d=google.com; s=arc-20160816; b=fDMVvBA71o62ZQiK86cFahzcF11zHNu78gU3kQ98qbR8VEmWPI2xcooTRyx0WPzVPw VMosf5iP4y17iUQNxIQQiNuoEDX170RseZNluZtguttYQc+y4UHQUlMPGslCfFiddnNG /TQUcvQFPAPwn6/UhpDw4ot753mWOT7dWF9+PrHBbsbFk14D4FYWI7PIIBZQg80ZCgdq GpZFdNH/MlFiv/JSwFzdJRw3LwHD+XgaS+R0l4MFqn9/Url3an4bgyEFXbJF4KxAubuq /aJAPsc87Pl3L/llp4RuJlz3DP/6+oRFY9+DuDpZpF31dEZwBb/RgXp67i0oV0/Qhff+ s+qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=xcT/tBt5hzVcOFIbbxsACp+IaB0FfUbF9lTytCWuySo=; b=YPF129ys6RiBQ5dFNeG5wrjfPFoASiLkVZ3WGubaoyOhMFmHlFRJsdvzF2u8ZvEV11 YRt5+M30mojiKXQa0Y477UL3RCQp1KYPKwkkx1VkzifIoB2KI9GMo/cKBDhxhsOPcKCh TrL9yhmkVdtcqV/yEWAftQyUx0Xf2im2TPQGLbTDXXRtqC1yrCNWth7CMN7w+k+bH9Pc qUXWTBtQhoefwIS26SkLgh1DqDODLjtztGVngAYd5WIa0VS3DK5zpHwn6PMXqE0D0DuB pg5hc1lywBWPeIGrUX1taZaUNNZRL2Bh7QDb2Gt6nWXhTdaE9hiH5KNsJH5P9U0CIUl7 A6UQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-omap-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bq18si368562ejb.460.2020.08.20.20.55.32; Thu, 20 Aug 2020 20:55:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-omap-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-omap-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727968AbgHUDza (ORCPT + 4 others); Thu, 20 Aug 2020 23:55:30 -0400 Received: from mail-il1-f193.google.com ([209.85.166.193]:38770 "EHLO mail-il1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727780AbgHUDz2 (ORCPT ); Thu, 20 Aug 2020 23:55:28 -0400 Received: by mail-il1-f193.google.com with SMTP id 77so337944ilc.5; Thu, 20 Aug 2020 20:55:27 -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=xcT/tBt5hzVcOFIbbxsACp+IaB0FfUbF9lTytCWuySo=; b=Yrzvlp2Vi/+cSl2cg2rcd2F7Syq+hqnAeE0eQZQbNJVIOsPEayJcH2Y6hY5iAgKWaK rl35vRuYTMcttHeg4kJmZnhemDKZyyJ6cj4Tq9C+/HaES3vZLdNBirg4/JutOrRnVFHy FYxYfDWnxDJ7wOSMVd7jy/BdUDmC540EpSIEvzcu61O914nTmdZKFQRLoMSDmo+BHQ5f aVo0TS1zbZgRdCCY3mnkJ5LJi9gdgNm0PEIDvF8hTYQnzVcj1IXvTbHC//oJbsANunev xUwHD11ciK+YB9dWcpq/XwUHhD3feLg4g/c0xBCAUUS5gLOZkhTnhioFudpSwgNGsLm0 j0nA== X-Gm-Message-State: AOAM531DSVGrZoExLdVC86ZTJe7eY8F76KsAr0Cb83th1vCsPn6TYW2y d1BobwEbixrmxDM7+jRKJg== X-Received: by 2002:a92:6a0c:: with SMTP id f12mr952021ilc.213.1597982126498; Thu, 20 Aug 2020 20:55:26 -0700 (PDT) Received: from xps15.herring.priv ([64.188.179.249]) by smtp.googlemail.com with ESMTPSA id 79sm413923ilc.9.2020.08.20.20.55.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Aug 2020 20:55:25 -0700 (PDT) From: Rob Herring To: Bjorn Helgaas , Lorenzo Pieralisi Cc: linux-pci@vger.kernel.org, Andy Gross , Binghui Wang , Bjorn Andersson , Dilip Kota , Fabio Estevam , Gustavo Pimentel , Jerome Brunet , Jesper Nilsson , Jingoo Han , Jonathan Chocron , Jonathan Hunter , Kevin Hilman , Kishon Vijay Abraham I , Krzysztof Kozlowski , Kukjin Kim , Kunihiko Hayashi , Lucas Stach , Martin Blumenstingl , Masahiro Yamada , Murali Karicheri , Neil Armstrong , NXP Linux Team , Pengutronix Kernel Team , Pratyush Anand , Richard Zhu , Sascha Hauer , Shawn Guo , Shawn Guo , Stanimir Varbanov , Thierry Reding , Xiaowei Song , Yue Wang , Marc Zyngier , linux-amlogic@lists.infradead.org, linux-arm-kernel@axis.com, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-omap@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-tegra@vger.kernel.org Subject: [PATCH v2 16/40] PCI: dwc: Convert to use pci_host_probe() Date: Thu, 20 Aug 2020 21:53:56 -0600 Message-Id: <20200821035420.380495-17-robh@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200821035420.380495-1-robh@kernel.org> References: <20200821035420.380495-1-robh@kernel.org> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org Now that there are no more .scan_bus() callbacks, we can remove it and just use pci_host_probe(). Cc: Jingoo Han Cc: Gustavo Pimentel Cc: Lorenzo Pieralisi Cc: Bjorn Helgaas Signed-off-by: Rob Herring --- .../pci/controller/dwc/pcie-designware-host.c | 21 +++---------------- drivers/pci/controller/dwc/pcie-designware.h | 1 - 2 files changed, 3 insertions(+), 19 deletions(-) -- 2.25.1 diff --git a/drivers/pci/controller/dwc/pcie-designware-host.c b/drivers/pci/controller/dwc/pcie-designware-host.c index 07791b4ebaa7..42b13a7a7383 100644 --- a/drivers/pci/controller/dwc/pcie-designware-host.c +++ b/drivers/pci/controller/dwc/pcie-designware-host.c @@ -300,7 +300,6 @@ int dw_pcie_host_init(struct pcie_port *pp) struct device_node *np = dev->of_node; struct platform_device *pdev = to_platform_device(dev); struct resource_entry *win; - struct pci_bus *child; struct pci_host_bridge *bridge; struct resource *cfg_res; int ret; @@ -436,23 +435,9 @@ int dw_pcie_host_init(struct pcie_port *pp) bridge->sysdata = pp; - ret = pci_scan_root_bus_bridge(bridge); - if (ret) - goto err_free_msi; - - pp->root_bus = bridge->bus; - - if (pp->ops->scan_bus) - pp->ops->scan_bus(pp); - - pci_bus_size_bridges(pp->root_bus); - pci_bus_assign_resources(pp->root_bus); - - list_for_each_entry(child, &pp->root_bus->children, node) - pcie_bus_configure_settings(child); - - pci_bus_add_devices(pp->root_bus); - return 0; + ret = pci_host_probe(bridge); + if (!ret) + return 0; err_free_msi: if (pci_msi_enabled() && !pp->ops->msi_host_init) diff --git a/drivers/pci/controller/dwc/pcie-designware.h b/drivers/pci/controller/dwc/pcie-designware.h index 4ed59b051b2b..6cd61892f24f 100644 --- a/drivers/pci/controller/dwc/pcie-designware.h +++ b/drivers/pci/controller/dwc/pcie-designware.h @@ -161,7 +161,6 @@ enum dw_pcie_device_mode { struct dw_pcie_host_ops { int (*host_init)(struct pcie_port *pp); - void (*scan_bus)(struct pcie_port *pp); void (*set_num_vectors)(struct pcie_port *pp); int (*msi_host_init)(struct pcie_port *pp); };