From patchwork Mon Aug 3 21:01:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 247410 Delivered-To: patch@linaro.org Received: by 2002:a92:cc90:0:0:0:0:0 with SMTP id x16csp1539788ilo; Mon, 3 Aug 2020 14:02:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxcmtfNWLLH8GX7+oUM1Cf2PXigEkcdtbm7MUwCydgx5H4GdMmRVVOrzjiykux6fmxRj2RS X-Received: by 2002:a50:9e6f:: with SMTP id z102mr17945638ede.300.1596488523846; Mon, 03 Aug 2020 14:02:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596488523; cv=none; d=google.com; s=arc-20160816; b=bAhs1m7RnGtodGLBHOaykYWbDLmYClXdRZHBb6WnuWXESi8wy8+bJ96sOJ38J8lbPk j8vmJODVDYcPUnL1Y4e3oG7oGVq94hg84FLwjA6+VPnhFFkiDzXUCNlGwiaby6Zys3tC HtGMAIzaTN+VfIiizkwrQs8s3fRRl27OU4HC9bh5ozp7u8gNopCOiWP0RW1lt5wceNj4 6pwzlUU4ClpwyHfUG07cDK4lnEKLhSstpBaaqzN131uN+TlP4JuyJgRNRQpZCo1v/Uv8 +pEru0StvuIEYOuLb+KqY8I48i530L6D4gf1cupr9SLz8MXyksdaDUpkbFn7pu9koXhz k30w== 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=+aVzUrW/b+OR7PsyqkF7d3uV9W2kuObPvJUPmZOvAKM=; b=poR62SdQTGGPlmkYCRfk05j6hAQs7f0lgqO0hz+/foN02iQ+AXF6TRvoQReFMrgGmD I0RYMtT+UOMCfts+6uee7b4uLv+NJ27nSipnPazIEBXLFmyC0/3CnC3fy2QUHFgP/+zt Ei9nY7It8O84NmeZfn6c6Can7boXc3TWGnWi0X6+nrEHu2vSMXe6nN71DgD1VcGJz/kf 0z0lrwZXg3k1tFt7p3uNR1/du+LechunK+pHurvQMBFjzUVl8IA6nS+C8Kjy3FJnctf9 V3BydsSxOTr5EnapNXhXsttZ+8POPLDMh5PBWZ4qmmmtXXnLLoaFh74T+qJBG3sCNYCm 8Mqw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-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 i2si9818208ejp.500.2020.08.03.14.02.03; Mon, 03 Aug 2020 14:02:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-msm-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-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-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 S1729073AbgHCVCC (ORCPT + 15 others); Mon, 3 Aug 2020 17:02:02 -0400 Received: from mail-il1-f194.google.com ([209.85.166.194]:45964 "EHLO mail-il1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729064AbgHCVCC (ORCPT ); Mon, 3 Aug 2020 17:02:02 -0400 Received: by mail-il1-f194.google.com with SMTP id f68so10457680ilh.12; Mon, 03 Aug 2020 14:02:01 -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=+aVzUrW/b+OR7PsyqkF7d3uV9W2kuObPvJUPmZOvAKM=; b=L5i6A4KQ9QUbLbttgLwwy/EyNetA5PHd8XPe6orXHFuIEjmU0DyNWHMrrTTZLyuc/3 HAESAL6lnpFVYomVOkkynlTU0yjh22VHQNSMPgzGySzeP+1UNyqp8hQkRUpfSHcs5SQm cg/kAeNL3EETnfYQdZrOqPE5DuKaYY+Ax+bfFd1unVrE67fqiBP7pf3pE5bH1ehtSvfl /yrODqXKyDzkFRRMsKsdq8vqGAXjTfYWXUVlSbFYMIB6Joxkar+aF+cQOzNIEgl6qAif vUPSxeoGWkuh7QiPRHBMJceSiR8QSUNeYVu+aQFnHwmorIku+4fioOLeVGtAlY05eci2 vGTQ== X-Gm-Message-State: AOAM532OQTuwBdZDCOc4x8WYphrzUUHl6avW+/rWmzj/80Z2Pm65V6kX XNELdnCiAN65Z3cl21X7vw== X-Received: by 2002:a92:c883:: with SMTP id w3mr1144796ilo.2.1596488521305; Mon, 03 Aug 2020 14:02:01 -0700 (PDT) Received: from xps15.herring.priv ([64.188.179.252]) by smtp.googlemail.com with ESMTPSA id r6sm9292280iod.7.2020.08.03.14.01.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Aug 2020 14:02:00 -0700 (PDT) From: Rob Herring To: Bjorn Helgaas , Gustavo Pimentel , Jingoo Han , Lorenzo Pieralisi Cc: Binghui Wang , Bjorn Andersson , Fabio Estevam , Jesper Nilsson , Jonathan Chocron , Jonathan Hunter , Kevin Hilman , Kishon Vijay Abraham I , Krzysztof Kozlowski , Kukjin Kim , Kunihiko Hayashi , 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-pci@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-tegra@vger.kernel.org, Lucas Stach , Masahiro Yamada , Murali Karicheri , NXP Linux Team , Pengutronix Kernel Team , Pratyush Anand , Richard Zhu , Sascha Hauer , Shawn Guo , Stanimir Varbanov , Thierry Reding , Xiaowei Song , Yue Wang Subject: [RFC 16/27] PCI: dwc: Convert to use pci_host_probe() Date: Mon, 3 Aug 2020 15:01:05 -0600 Message-Id: <20200803210116.3132633-17-robh@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200803210116.3132633-1-robh@kernel.org> References: <20200803210116.3132633-1-robh@kernel.org> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@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 e9778f8ee955..dc336163104a 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; @@ -447,23 +446,9 @@ int dw_pcie_host_init(struct pcie_port *pp) bridge->map_irq = of_irq_parse_and_map_pci; bridge->swizzle_irq = pci_common_swizzle; - 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 28e7ad3eb89f..10d22269254a 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); };