From patchwork Fri May 22 23:48:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring (Arm)" X-Patchwork-Id: 11566425 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 66EF2913 for ; Fri, 22 May 2020 23:49:16 +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 D684320723 for ; Fri, 22 May 2020 23:49:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="hD+KRk2g" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D684320723 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+patchwork-linux-arm=patchwork.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=uzThFBMQ1dwveWjStDg4opoZOsHB9FpDzUilE1BADMo=; b=hD+KRk2gMpW2Fq sSSx0U4+xoA5PjLhSfSWmzDu0feqOQ7JRO/vFRBWgPPqzSz9JJcirlDNl51Jks7hFXUjfSKdSmKof dL+wIOdWLFL0vK9Xcdj7bpgkHb+CbT5tsto5HOKvKm2vR3k3E9DJQcjnzFd76gVa+maBfN2c9UZB4 OBtjAl6gk1AjTHCdB9uOBP7QgrCQkgul51TbBzVcE7wPRM25wFRJKzmJKSNcW8Qn5UgTR+ZbC0lLD rH3pOSDGMZjrvIO352MKcK7haQEaEr6dhXpG4f8syjC9SwpJBEtivq6qSsBPOsP3qz3Qetq59tVTv p80tVJWK0LvQ7v0yhEvQ==; 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 1jcHPK-0003cG-6x; Fri, 22 May 2020 23:48:54 +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 1jcHP1-0003Jz-Vb for linux-arm-kernel@lists.infradead.org; Fri, 22 May 2020 23:48:37 +0000 Received: by mail-il1-f195.google.com with SMTP id 4so12533193ilg.1 for ; Fri, 22 May 2020 16:48:35 -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=oGPS1/9t2DbdpX0irS4os0tkteUYvgsNTUcQ44RgQLA=; b=kxkX+IRXXF7+YLX6zhAKSpVbHXSUJWmdkVwxRkSpGuJANLIW5vjofdnpBAa47GvVl1 UTnMqo3UfqPQMaPwdzCiQhIeAQDv6UiEHFhL9dltTN/JWQyR+FtbKXt1ZHT+PN5FbRRr xhgKWKO0zUPcMupJWgWOIl4PQN+0HZFKCK3p4P9IoEGXfCU4g/PuRNfiEGOJecBxqCsa +2LXbGb0wG1UAS+UG0kp0b5lzc7mX0fwtGo892WhqsbISv1cv2KLaYCc9oGvIZv7m0+V J/vzYbpw2FPf7nJwKrXHsG4Tkor7WVeEmSi5bWMJypqups15m7SeXlrRAqBNpLMOTTpQ 4w6Q== X-Gm-Message-State: AOAM532z33zX+maJ+d2fjKdPfpEhW4PakYYRk1mf5GvtRd8WyeVT5fDg hbouSgIgFh80MwMZKoKxEw== X-Google-Smtp-Source: ABdhPJyuqDfEj9pKyUgEYZRO+cysIrAtCQrOxTDCZeXzJp8d1Psmue13wAQH//FdOBy3lTptmkGmxw== X-Received: by 2002:a92:d6c5:: with SMTP id z5mr15613014ilp.194.1590191315033; Fri, 22 May 2020 16:48:35 -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.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 May 2020 16:48:34 -0700 (PDT) From: Rob Herring To: Lorenzo Pieralisi Subject: [PATCH 01/15] PCI: cadence: Use struct pci_host_bridge.windows list directly Date: Fri, 22 May 2020 17:48:18 -0600 Message-Id: <20200522234832.954484-2-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_164836_011509_CF29425E X-CRM114-Status: GOOD ( 12.13 ) X-Spam-Score: 0.8 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (0.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.166.195 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [robherring2[at]gmail.com] 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [robherring2[at]gmail.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.166.195 listed in wl.mailspike.net] 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different 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, Tom Joseph , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org There's no need to create a temporary resource list and then splice it to struct pci_host_bridge.windows list. Just use pci_host_bridge.windows directly. The necessary clean-up is already handled by the PCI core. Cc: Tom Joseph Signed-off-by: Rob Herring --- .../controller/cadence/pcie-cadence-host.c | 26 +++++-------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/drivers/pci/controller/cadence/pcie-cadence-host.c b/drivers/pci/controller/cadence/pcie-cadence-host.c index 8c2543f28ba0..9f77e47983c3 100644 --- a/drivers/pci/controller/cadence/pcie-cadence-host.c +++ b/drivers/pci/controller/cadence/pcie-cadence-host.c @@ -169,14 +169,15 @@ static int cdns_pcie_host_init_address_translation(struct cdns_pcie_rc *rc) } static int cdns_pcie_host_init(struct device *dev, - struct list_head *resources, struct cdns_pcie_rc *rc) { + struct pci_host_bridge *bridge = pci_host_bridge_from_priv(rc); struct resource *bus_range = NULL; int err; /* Parse our PCI ranges and request their resources */ - err = pci_parse_request_of_pci_ranges(dev, resources, NULL, &bus_range); + err = pci_parse_request_of_pci_ranges(dev, &bridge->windows, NULL, + &bus_range); if (err) return err; @@ -185,17 +186,9 @@ static int cdns_pcie_host_init(struct device *dev, err = cdns_pcie_host_init_root_port(rc); if (err) - goto err_out; - - err = cdns_pcie_host_init_address_translation(rc); - if (err) - goto err_out; - - return 0; + return err; - err_out: - pci_free_resource_list(resources); - return err; + return cdns_pcie_host_init_address_translation(rc); } int cdns_pcie_host_setup(struct cdns_pcie_rc *rc) @@ -204,7 +197,6 @@ int cdns_pcie_host_setup(struct cdns_pcie_rc *rc) struct platform_device *pdev = to_platform_device(dev); struct device_node *np = dev->of_node; struct pci_host_bridge *bridge; - struct list_head resources; struct cdns_pcie *pcie; struct resource *res; int ret; @@ -248,11 +240,10 @@ int cdns_pcie_host_setup(struct cdns_pcie_rc *rc) pcie->mem_res = res; - ret = cdns_pcie_host_init(dev, &resources, rc); + ret = cdns_pcie_host_init(dev, rc); if (ret) goto err_init; - list_splice_init(&resources, &bridge->windows); bridge->dev.parent = dev; bridge->busnr = pcie->bus; bridge->ops = &cdns_pcie_host_ops; @@ -261,13 +252,10 @@ int cdns_pcie_host_setup(struct cdns_pcie_rc *rc) ret = pci_host_probe(bridge); if (ret < 0) - goto err_host_probe; + goto err_init; return 0; - err_host_probe: - pci_free_resource_list(&resources); - err_init: pm_runtime_put_sync(dev); From patchwork Fri May 22 23:48:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring (Arm)" X-Patchwork-Id: 11566427 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A3D05912 for ; Fri, 22 May 2020 23:49:26 +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 7DCEC20723 for ; Fri, 22 May 2020 23:49:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="qlSEH0em" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7DCEC20723 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+patchwork-linux-arm=patchwork.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=lZiHSvtNyKjMJtVKttS7F730IoD8MJVldDcoaWqwUBQ=; b=qlSEH0emBwq0xX 5uorn5WjFwAwn4h4tTvEJ2MPriAiCwwtkjKf8RWHjzyanXpkvC6EEkafQarQpEfRCZTkVqD+QUKtm FAvzpKDqjfKIzP0t2w3vVyE5weM6lCAH4JmFtuCNezEy95YbyRCmAw0NGdvcmSwas191dPKG9n8Z4 fs5C0brprU6jdKmqR+hMEO7eEw0WtVSg3Sfx3eZ92WBGBtWicsCUAgr3T8kyb3TOAEPCFgE30ezc4 Kq4NVH7KvDB6c39Jir65yNx9Gz5XO57zlWN0WU5IpB6PS7gOsJeTu0j5Hl0hx4NAS50dEXVRqk/GU 10bJFtvJVmRLiGAnPi3g==; 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 1jcHPl-0003tM-TF; Fri, 22 May 2020 23:49:21 +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 1jcHP3-0003KK-2Q for linux-arm-kernel@lists.infradead.org; Fri, 22 May 2020 23:48:38 +0000 Received: by mail-io1-f68.google.com with SMTP id r2so3014424ioo.4 for ; Fri, 22 May 2020 16:48:36 -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=W4+faHiQpbiKoNArdRYrYzpj6r3I7BpUrWFS3s8f/VI=; b=ZXsloqAfZ/OQqX7bg88I8PC0p1ukNpskjfFPofeV73G1Wid+JJKZPUAVceojGMwgmv 0fRcSiJvAvU1Na3XpKIdT9RGzM6RdudIJm7uRVDK3AZmse8LSh1yqUwITsk9j4EYcbHk WytP455gZq+P72FBRUFA2EbDmQqocvtpzhxOj9v+z553ex9lj/3OeLsDpzXc4LEuWz9M pGHXIHdSPnyBJXhXwnx/z7xs5Md+hW9vPXoagHsXZtZxJzW0d7O5qWodABJPNzAsEazc zgiNwKHbxeCRtt386wsJoB4KrLOR2MbUKIzXFQFsKS3/ctU9RvdsjgLeMRHQUblDpAG0 HSiw== X-Gm-Message-State: AOAM532tLcVAW9jIKgy96exb/JPshfhRKAID316fXG34hMdKaNlfOXkT aCcAFBQxUmqJQ1f1gt5vkw== X-Google-Smtp-Source: ABdhPJzN5mP6wcYyIO0prwZR7WJYYh7QphTWx1pZw96CB3uHi1bA3huv1VVkQoA0SVgvDeTWo4nM+g== X-Received: by 2002:a6b:5813:: with SMTP id m19mr5015868iob.88.1590191316081; Fri, 22 May 2020 16:48:36 -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.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 May 2020 16:48:35 -0700 (PDT) From: Rob Herring To: Lorenzo Pieralisi Subject: [PATCH 02/15] PCI: mvebu: Use struct pci_host_bridge.windows list directly Date: Fri, 22 May 2020 17:48:19 -0600 Message-Id: <20200522234832.954484-3-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_164837_108945_2F856000 X-CRM114-Status: GOOD ( 11.89 ) X-Spam-Score: 0.8 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (0.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.166.68 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [robherring2[at]gmail.com] 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [robherring2[at]gmail.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.166.68 listed in wl.mailspike.net] 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different 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, Thomas Petazzoni , linux-arm-kernel@lists.infradead.org, Jason Cooper Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org There's no need to create a temporary resource list and then splice it to struct pci_host_bridge.windows list. Just use pci_host_bridge.windows directly. The necessary clean-up is already handled by the PCI core. Cc: Thomas Petazzoni Cc: Jason Cooper Signed-off-by: Rob Herring --- drivers/pci/controller/pci-mvebu.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/pci/controller/pci-mvebu.c b/drivers/pci/controller/pci-mvebu.c index 153a64676bc9..801044523a3d 100644 --- a/drivers/pci/controller/pci-mvebu.c +++ b/drivers/pci/controller/pci-mvebu.c @@ -71,7 +71,6 @@ struct mvebu_pcie { struct platform_device *pdev; struct mvebu_pcie_port *ports; struct msi_controller *msi; - struct list_head resources; struct resource io; struct resource realio; struct resource mem; @@ -961,17 +960,16 @@ static int mvebu_pcie_parse_request_resources(struct mvebu_pcie *pcie) { struct device *dev = &pcie->pdev->dev; struct device_node *np = dev->of_node; + struct pci_host_bridge *bridge = pci_host_bridge_from_priv(pcie); int ret; - INIT_LIST_HEAD(&pcie->resources); - /* Get the bus range */ ret = of_pci_parse_bus_range(np, &pcie->busn); if (ret) { dev_err(dev, "failed to parse bus-range property: %d\n", ret); return ret; } - pci_add_resource(&pcie->resources, &pcie->busn); + pci_add_resource(&bridge->windows, &pcie->busn); /* Get the PCIe memory aperture */ mvebu_mbus_get_pcie_mem_aperture(&pcie->mem); @@ -981,7 +979,7 @@ static int mvebu_pcie_parse_request_resources(struct mvebu_pcie *pcie) } pcie->mem.name = "PCI MEM"; - pci_add_resource(&pcie->resources, &pcie->mem); + pci_add_resource(&bridge->windows, &pcie->mem); /* Get the PCIe IO aperture */ mvebu_mbus_get_pcie_io_aperture(&pcie->io); @@ -994,10 +992,10 @@ static int mvebu_pcie_parse_request_resources(struct mvebu_pcie *pcie) resource_size(&pcie->io) - 1); pcie->realio.name = "PCI I/O"; - pci_add_resource(&pcie->resources, &pcie->realio); + pci_add_resource(&bridge->windows, &pcie->realio); } - return devm_request_pci_bus_resources(dev, &pcie->resources); + return devm_request_pci_bus_resources(dev, &bridge->windows); } /* @@ -1118,7 +1116,6 @@ static int mvebu_pcie_probe(struct platform_device *pdev) pcie->nports = i; - list_splice_init(&pcie->resources, &bridge->windows); bridge->dev.parent = dev; bridge->sysdata = pcie; bridge->busnr = 0; From patchwork Fri May 22 23:48:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring (Arm)" X-Patchwork-Id: 11566429 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 367BD913 for ; Fri, 22 May 2020 23:49:50 +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 14C4B20723 for ; Fri, 22 May 2020 23:49:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="nDXpUvKz" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 14C4B20723 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+patchwork-linux-arm=patchwork.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=rpKvJMUH13IgDH5u9cDUnrKQc9bcXot6eaRto8jqF+M=; b=nDXpUvKzYMx9Nz r0dKVLICyf6foWyKF3EsBlsWT3Rry3mpXWg1c2PaC1euSjjN7iuOrkJ1X4shk+zGtfiK9OHmNyzSt zNI9L3GsGLXOQjpB9lczrl4Q4Fq8H42p9+/vC6aEjlvH7VGUxUcbHPI0ferv2WKsUr/CVIiF+Wbns UoWdEE6iR9YVKthbzeiJItg4V1FFuuANFi+LYt+Xn/2Rkms/qxmeGaJBt6fI01AyGRaDwU7Q/I6Lg TEqlAX0RSnfvCzL5mkTWNT9WT2CSKCRAWz37QE+3+KmI2YJBi76pUUS5iGgTwceQInzgkRQ8diSNp q+TiCXMlEtOsj5gpXYww==; 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 1jcHQ6-00047R-Mr; Fri, 22 May 2020 23:49:42 +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 1jcHP3-0003L1-PS for linux-arm-kernel@lists.infradead.org; Fri, 22 May 2020 23:48:39 +0000 Received: by mail-io1-f68.google.com with SMTP id d7so13359342ioq.5 for ; Fri, 22 May 2020 16:48:37 -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=ThmdbRMtyh+goPlCsRsJutoUCzX5VD3oRn0IWK/oqQw=; b=iMMBYjotc/mrNotHwkN07lWKBDEdSCNb7YvXLkR71C8YidWoyovmLiFKXaeIV+UhgG LwwfEkndG+yPOirArVvsx4V42tQgsLfDXeUjwXuTLXfjNi6wmicvujNmhXzNPwJx7H8V 1Eim4X3ROHKWH+pg42jXHjP2Kp7+MakFj33ePXwoDzVnzgo6xzN6eFbNeJqEpOKTUcIX KqneaC1XY0MBJNIWaCcRfWubjzNZ1iYOyTndgdvsqUIZpvODlZsBdC2lDaTuOSx8KH5U /4uKZDYmU/ejP7M6n+zhYtPZBna9iHn7MRs8pZbH68o00Nzu2//2SDTY7fBJ7GegJmSW iU8A== X-Gm-Message-State: AOAM532F4n4SKO6BX0zh4fibTZFObenkWu9vRtcULqB/xmBhIWIPewdN JVApIvoFUZH9WZjjacobjg== X-Google-Smtp-Source: ABdhPJyDe0JoDXoIsQG/kMCc3sQ6ItzXn8qXN6+PN/9wYAzSRpPJ6IwR3EmqfjWPoiHq9avExGm3NA== X-Received: by 2002:a6b:ee15:: with SMTP id i21mr5318999ioh.179.1590191317148; Fri, 22 May 2020 16:48:37 -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.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 May 2020 16:48:36 -0700 (PDT) From: Rob Herring To: Lorenzo Pieralisi Subject: [PATCH 03/15] PCI: host-common: Use struct pci_host_bridge.windows list directly Date: Fri, 22 May 2020 17:48:20 -0600 Message-Id: <20200522234832.954484-4-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_164837_838236_7C02440F X-CRM114-Status: GOOD ( 12.99 ) X-Spam-Score: 0.8 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (0.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.166.68 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.166.68 listed in wl.mailspike.net] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [robherring2[at]gmail.com] 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [robherring2[at]gmail.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different 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, Will Deacon , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org There's no need to create a temporary resource list and then splice it to struct pci_host_bridge.windows list. Just use pci_host_bridge.windows directly. The necessary clean-up is already handled by the PCI core. Cc: Will Deacon Signed-off-by: Rob Herring --- drivers/pci/controller/pci-host-common.c | 36 ++++++++---------------- 1 file changed, 11 insertions(+), 25 deletions(-) diff --git a/drivers/pci/controller/pci-host-common.c b/drivers/pci/controller/pci-host-common.c index 953de57f6c57..f8f71d99e427 100644 --- a/drivers/pci/controller/pci-host-common.c +++ b/drivers/pci/controller/pci-host-common.c @@ -21,7 +21,7 @@ static void gen_pci_unmap_cfg(void *ptr) } static struct pci_config_window *gen_pci_init(struct device *dev, - struct list_head *resources, const struct pci_ecam_ops *ops) + struct pci_host_bridge *bridge, const struct pci_ecam_ops *ops) { int err; struct resource cfgres; @@ -29,31 +29,25 @@ static struct pci_config_window *gen_pci_init(struct device *dev, struct pci_config_window *cfg; /* Parse our PCI ranges and request their resources */ - err = pci_parse_request_of_pci_ranges(dev, resources, NULL, &bus_range); + err = pci_parse_request_of_pci_ranges(dev, &bridge->windows, NULL, &bus_range); if (err) return ERR_PTR(err); err = of_address_to_resource(dev->of_node, 0, &cfgres); if (err) { dev_err(dev, "missing \"reg\" property\n"); - goto err_out; + return ERR_PTR(err); } cfg = pci_ecam_create(dev, &cfgres, bus_range, ops); - if (IS_ERR(cfg)) { - err = PTR_ERR(cfg); - goto err_out; - } + if (IS_ERR(cfg)) + return cfg; err = devm_add_action_or_reset(dev, gen_pci_unmap_cfg, cfg); - if (err) { - goto err_out; - } - return cfg; + if (err) + return ERR_PTR(err); -err_out: - pci_free_resource_list(resources); - return ERR_PTR(err); + return cfg; } int pci_host_common_probe(struct platform_device *pdev) @@ -61,9 +55,7 @@ int pci_host_common_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct pci_host_bridge *bridge; struct pci_config_window *cfg; - struct list_head resources; const struct pci_ecam_ops *ops; - int ret; ops = of_device_get_match_data(&pdev->dev); if (!ops) @@ -76,7 +68,7 @@ int pci_host_common_probe(struct platform_device *pdev) of_pci_check_probe_only(); /* Parse and map our Configuration Space windows */ - cfg = gen_pci_init(dev, &resources, ops); + cfg = gen_pci_init(dev, bridge, ops); if (IS_ERR(cfg)) return PTR_ERR(cfg); @@ -84,7 +76,6 @@ int pci_host_common_probe(struct platform_device *pdev) if (!pci_has_flag(PCI_PROBE_ONLY)) pci_add_flags(PCI_REASSIGN_ALL_BUS); - list_splice_init(&resources, &bridge->windows); bridge->dev.parent = dev; bridge->sysdata = cfg; bridge->busnr = cfg->busr.start; @@ -92,14 +83,9 @@ int pci_host_common_probe(struct platform_device *pdev) bridge->map_irq = of_irq_parse_and_map_pci; bridge->swizzle_irq = pci_common_swizzle; - ret = pci_host_probe(bridge); - if (ret < 0) { - pci_free_resource_list(&resources); - return ret; - } - platform_set_drvdata(pdev, bridge->bus); - return 0; + + return pci_host_probe(bridge); } EXPORT_SYMBOL_GPL(pci_host_common_probe); From patchwork Fri May 22 23:48:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring (Arm)" X-Patchwork-Id: 11566431 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 45AF4912 for ; Fri, 22 May 2020 23:50:10 +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 0F016206BE for ; Fri, 22 May 2020 23:50:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="FCcOkeK6" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0F016206BE 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+patchwork-linux-arm=patchwork.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=B5uUQMoBXwKwyibK4A7t0K50kTTBDOC47IYbONoEN9c=; b=FCcOkeK6XZJjAD B7ySwGAvDqmxHXRgsTrAPsJgL3I8IOGYD/lFar9oq0za4uduONscDdFBhDfggkKR2THz295ba/tsT xEr0ofN3HaJUIpB+xqxFu8nJtRvW2uTszLgCAQocDo/DAVEoBTLGmoXAYXYLWAMlmPwtCBrJWy+cJ 22O3NTnQDlsckdiwNTS8J1XiSF/qkuhjN4XL4lZFKr2nliTHj1/aqmR/makZPyetSxG9VoH7chkYT VeEF3PzdnPVEmcto57Q1gg4GQBK1mbw2PX65yKLLvQBoX17woeJJNrvN3+t8xTnOam7L+nfzc+QU+ U4zOgJlWkEP0MUxEJoMw==; 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 1jcHQN-0004K8-Rw; Fri, 22 May 2020 23:49:59 +0000 Received: from mail-il1-f193.google.com ([209.85.166.193]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jcHP5-0003MG-9L; Fri, 22 May 2020 23:48:40 +0000 Received: by mail-il1-f193.google.com with SMTP id 4so12533298ilg.1; Fri, 22 May 2020 16:48:38 -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=fcOH9Yyg8RTS1uDyK4ju1tKTwPN2SKJdo9WLhc7R054=; b=Gi/3Ei4PZu0elGWQYPUzN0iqynSjfNvmUucR5tSFfzCHd1Zwjr6uHhfDWGcNr8zXDN hrVfbEXOswXwu1Vv3CZ00ODUNUURjwFiWu4DnkCyPxsIEOTVBuTtfjtEzrv3v+vI63Yu qpvGhI8PzSIi2XaMV5B0DCPFItRvApvKLHf193H6bHpQufRKiBL8L8j7Tra7sMnGIXjL +M8FbqQR/YkaIShtXV4WDyr7EMDbyu1MPcvLwtQ/BbdBhQihTEh2FzxAjuri7n+rwb8T aHc0aAqQvlPqveIt1hVu24YsXnbBcBpdAxwZ+FMpyieL58TOYawg2dY7IMnl6vjQ7OBM clTg== X-Gm-Message-State: AOAM533fFwP4lnfYTtVilHtkmI06unL4KOr4ohlx8UNBUTOu4x4E7Lie 1vLy7W4/mIuLfF9K4sa3+b6AFlw= X-Google-Smtp-Source: ABdhPJxSQMk+Xgx5mMu8Qr8nZIuiuOwT56dTl3b5bTFmMoPFk+wCyTSsmV14SJYYFxh7j5CDBkgX/w== X-Received: by 2002:a92:cf46:: with SMTP id c6mr16172424ilr.4.1590191318280; Fri, 22 May 2020 16:48:38 -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.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 May 2020 16:48:37 -0700 (PDT) From: Rob Herring To: Lorenzo Pieralisi Subject: [PATCH 04/15] PCI: brcmstb: Use pci_host_probe() to register host Date: Fri, 22 May 2020 17:48:21 -0600 Message-Id: <20200522234832.954484-5-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_164839_362483_5F316FE5 X-CRM114-Status: GOOD ( 11.42 ) X-Spam-Score: 0.8 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (0.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.166.193 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [robherring2[at]gmail.com] 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [robherring2[at]gmail.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.166.193 listed in wl.mailspike.net] 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different 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: linux-pci@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, linux-arm-kernel@lists.infradead.org, Bjorn Helgaas , Nicolas Saenz Julienne , linux-rpi-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The brcmstb host driver does the same host registration and bus scanning calls as pci_host_probe, so let's use it instead. Cc: Nicolas Saenz Julienne Cc: bcm-kernel-feedback-list@broadcom.com Cc: linux-rpi-kernel@lists.infradead.org Signed-off-by: Rob Herring Tested-by: Nicolas Saenz Julienne Acked-by: Nicolas Saenz Julienne --- drivers/pci/controller/pcie-brcmstb.c | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/drivers/pci/controller/pcie-brcmstb.c b/drivers/pci/controller/pcie-brcmstb.c index 7730ea845ff2..15c747c1390a 100644 --- a/drivers/pci/controller/pcie-brcmstb.c +++ b/drivers/pci/controller/pcie-brcmstb.c @@ -172,7 +172,6 @@ struct brcm_pcie { struct device *dev; void __iomem *base; struct clk *clk; - struct pci_bus *root_bus; struct device_node *np; bool ssc; int gen; @@ -919,9 +918,10 @@ static void __brcm_pcie_remove(struct brcm_pcie *pcie) static int brcm_pcie_remove(struct platform_device *pdev) { struct brcm_pcie *pcie = platform_get_drvdata(pdev); + struct pci_host_bridge *bridge = pci_host_bridge_from_priv(pcie); - pci_stop_root_bus(pcie->root_bus); - pci_remove_root_bus(pcie->root_bus); + pci_stop_root_bus(bridge->bus); + pci_remove_root_bus(bridge->bus); __brcm_pcie_remove(pcie); return 0; @@ -933,7 +933,6 @@ static int brcm_pcie_probe(struct platform_device *pdev) struct pci_host_bridge *bridge; struct device_node *fw_np; struct brcm_pcie *pcie; - struct pci_bus *child; struct resource *res; int ret; @@ -1004,20 +1003,9 @@ static int brcm_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) { - dev_err(pcie->dev, "Scanning root bridge failed\n"); - goto fail; - } - - pci_assign_unassigned_bus_resources(bridge->bus); - list_for_each_entry(child, &bridge->bus->children, node) - pcie_bus_configure_settings(child); - pci_bus_add_devices(bridge->bus); platform_set_drvdata(pdev, pcie); - pcie->root_bus = bridge->bus; - return 0; + return pci_host_probe(bridge); fail: __brcm_pcie_remove(pcie); return ret; From patchwork Fri May 22 23:48:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring (Arm)" X-Patchwork-Id: 11566435 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 65CD7912 for ; Fri, 22 May 2020 23:50:53 +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 424C8206BE for ; Fri, 22 May 2020 23:50:53 +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 424C8206BE 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+patchwork-linux-arm=patchwork.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 1jcHR8-0007Aw-20; Fri, 22 May 2020 23:50:46 +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-Spam-Score: 0.8 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (0.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.166.66 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [robherring2[at]gmail.com] 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [robherring2[at]gmail.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.166.66 listed in wl.mailspike.net] 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different 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 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.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); } From patchwork Fri May 22 23:48:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring (Arm)" X-Patchwork-Id: 11566433 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E8C1B912 for ; Fri, 22 May 2020 23:50:33 +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 B8020206BE for ; Fri, 22 May 2020 23:50:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="pdVKRIUf" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B8020206BE 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+patchwork-linux-arm=patchwork.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=nsAqVr6Rq96jPEtM9jozk4uPrdflcGwOH33JO2HBRvA=; b=pdVKRIUfODzkdg nkoS4sPdZh/bpfUNoGh+vPD7K7t9+inLq/9tfTMexKHStId7OAZOgKoAikbzeKr6gybyw356B+hut IuLJ15AiTVYNcS2foAaaZnBH3WFT6pFXHYM/ydxC2WbfgBl/k1iUhrunXiwJQREcuxBVGtw+2bYI8 hEfiqgBUAEX3ohGhAC/k4kqjaJYeEKhdnxN70uwPgjmeDhDTnEnWtLnWJ/3afX5DdLHaENAWvm3mE cbJ2/muKCKgjiN6mva/jm1Rb5n3+T2N3zZUfNdgZZPOcyeLhW4WXJobxcj65tofDYcXPIujiEzAyL tWM9pa0tQWM7nKs/Zm8A==; 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 1jcHQq-0006xu-Sj; Fri, 22 May 2020 23:50:29 +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 1jcHP7-0003Oz-BQ for linux-arm-kernel@lists.infradead.org; Fri, 22 May 2020 23:48:42 +0000 Received: by mail-io1-f66.google.com with SMTP id j8so13282604iog.13 for ; Fri, 22 May 2020 16:48:41 -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=UVLALo+Rw4G28pn8E/Fr1iTDsfsUKpN35tQ7eb98FMg=; b=Ho1+/MWXvc7+HNzo2bhaONxC+58n2vmj46hyd42DOL9WoOhg7bwhBaRxYQDeTXiAXg 54Ex8cCITTVpU6UDqt3nxF/1ATzr3pvMA4lPY+C3JVLciVfiu5u5v2auZd/wh4gsSuLR hsIZkfGGF/0ctRGw+I/0PjNwWvp1bItFFH+bGRvMkCICT6S4knFSOsM2wN37cTVF8FiO fdC1XnESO2MAlFbw9qZvw73Nysabq13gumLDsLxZikXQjdm+z2WRPAx0N2N6mNDvaRnN 6tC2naToqWZPhxD4Z1WCBW1mEeO7133btYFCFxCBk+c+VTbPryQXYGqsFAthKCd1L0/g BI3g== X-Gm-Message-State: AOAM5335wo/L66y0KNXxWi+EXTdPOljgCuMZzLLwlGHiY4Th3EbyMlg/ fZ/GnGQ3KU2TxAP2gboV7Q== X-Google-Smtp-Source: ABdhPJzSme6sM1qHBaImIWc5kpH40B37+rjqfkGC+CAaVZMzhxyay108QnlcxCdxriE8AeY4K14g7w== X-Received: by 2002:a5d:8613:: with SMTP id f19mr5238435iol.173.1590191320399; Fri, 22 May 2020 16:48:40 -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.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 May 2020 16:48:39 -0700 (PDT) From: Rob Herring To: Lorenzo Pieralisi Subject: [PATCH 06/15] PCI: tegra: Use pci_host_probe() to register host Date: Fri, 22 May 2020 17:48:23 -0600 Message-Id: <20200522234832.954484-7-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_164841_420593_8662B74E X-CRM114-Status: GOOD ( 11.96 ) X-Spam-Score: 0.8 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (0.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.166.66 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.166.66 listed in wl.mailspike.net] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [robherring2[at]gmail.com] 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [robherring2[at]gmail.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different 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: linux-pci@vger.kernel.org, Jonathan Hunter , linux-tegra@vger.kernel.org, Thierry Reding , Bjorn Helgaas , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The tegra host driver does the same host registration and bus scanning calls as pci_host_probe, so let's use it instead. Cc: Thierry Reding Cc: Jonathan Hunter Cc: linux-tegra@vger.kernel.org Signed-off-by: Rob Herring --- drivers/pci/controller/pci-tegra.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/pci/controller/pci-tegra.c b/drivers/pci/controller/pci-tegra.c index e3e917243e10..3cae96dfe75d 100644 --- a/drivers/pci/controller/pci-tegra.c +++ b/drivers/pci/controller/pci-tegra.c @@ -2670,7 +2670,6 @@ static int tegra_pcie_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct pci_host_bridge *host; struct tegra_pcie *pcie; - struct pci_bus *child; struct resource *bus; int err; @@ -2721,20 +2720,12 @@ static int tegra_pcie_probe(struct platform_device *pdev) host->map_irq = tegra_pcie_map_irq; host->swizzle_irq = pci_common_swizzle; - err = pci_scan_root_bus_bridge(host); + err = pci_host_probe(host); if (err < 0) { dev_err(dev, "failed to register host: %d\n", err); goto pm_runtime_put; } - pci_bus_size_bridges(host->bus); - pci_bus_assign_resources(host->bus); - - list_for_each_entry(child, &host->bus->children, node) - pcie_bus_configure_settings(child); - - pci_bus_add_devices(host->bus); - if (IS_ENABLED(CONFIG_DEBUG_FS)) { err = tegra_pcie_debugfs_init(pcie); if (err < 0) From patchwork Fri May 22 23:48:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring (Arm)" X-Patchwork-Id: 11566437 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8BDE71391 for ; Fri, 22 May 2020 23:51:07 +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 59A1B2073B for ; Fri, 22 May 2020 23:51:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="quRNk25c" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 59A1B2073B 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+patchwork-linux-arm=patchwork.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=iOYoevn1UgYD/M0utux6NQMTtyJWNpwXXuK7GPZVtlg=; b=quRNk25cB4Ycl4 j44dMWJ1lBZuya+fgw21P8EjDABF17nPJbSYLgNtavscg0EZ1o+4n6hzrtuaxYU/gjHUAmEdANu9/ L5s7/KieHVQTHH99JY1aj6KhdWMoU16U0BZuTQgGVsXe671f6/OYtkey3tok0+57tTcMC5NpSuyLN xAU/Q1ilC1qKuK2HofAmEdfR48h/6ZUi7U2eU2+KLhJ6xAI+B+veGO1en42qsEJ38WYJJN7h97O8f 0mQ99zmHpOPhOanbBllPFlfW7YOQSmWEXPm6rXg/GA/3YawAND0NmTPFb9+iG8qYhK+DvClqY7JxX GF4lhS9V4V+EWs/19otQ==; 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 1jcHRO-0007PM-VU; Fri, 22 May 2020 23:51:02 +0000 Received: from mail-io1-f65.google.com ([209.85.166.65]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jcHP8-0003QJ-Ja for linux-arm-kernel@lists.infradead.org; Fri, 22 May 2020 23:48:44 +0000 Received: by mail-io1-f65.google.com with SMTP id d7so13359464ioq.5 for ; Fri, 22 May 2020 16:48:42 -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=J45nDshYNcYrGRYkIpqQuCHqEq06Xr5wTtd6CkH1TKQ=; b=h5I1OPwKJsfMRO6eUPQf4aUijpUZnWP3PENQlTH/KwCGFnAmmQ4hXeFvoCVanUS/wq FLbahfayyns/yKW/yCATaqrm1xQILDTAvGYBDfwOART3rJpEUtpPX/N8KeyZvL17T1nB 08alk/zGf3Lu8PfF8qo1lCNC1KNtaX4HRhpj2IOoH5ngJearBL5/qmhEIJk6YfAeD+sg R4MKpTfhA8GcatQleH9l4/6LYQSwV2oI9YSXtq9MLEh2Z8giHzJXdm6EF8xoJ443snd8 2UZw8aqISSKpGJdWHKDsSo/ZOs5xHqVFOBErnEPS3bIar82G73Zmenga0roMqL5w52nH jYRg== X-Gm-Message-State: AOAM53337lQr9+NyTmxNzRS1R2fiMCmv/sG33GhPwj8UwzIivlz/7+83 xxR8b2VEO28AhCM57AFrXQ== X-Google-Smtp-Source: ABdhPJwvpizplNylsZ+mOBoLddCdqOsvUiQzZKpGEl+BV1UIE2Xf70za28p9484+5NSevVTlVtJ7jw== X-Received: by 2002:a5e:cb4d:: with SMTP id h13mr5172992iok.141.1590191321380; Fri, 22 May 2020 16:48:41 -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.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 May 2020 16:48:40 -0700 (PDT) From: Rob Herring To: Lorenzo Pieralisi Subject: [PATCH 07/15] PCI: v3: Use pci_host_probe() to register host Date: Fri, 22 May 2020 17:48:24 -0600 Message-Id: <20200522234832.954484-8-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_164842_658899_B4AA5728 X-CRM114-Status: GOOD ( 12.65 ) X-Spam-Score: 0.8 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (0.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.166.65 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.166.65 listed in wl.mailspike.net] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [robherring2[at]gmail.com] 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [robherring2[at]gmail.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different 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, Linus Walleij , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The v3 host driver does the same host registration and bus scanning calls as pci_host_probe, so let's use it instead. Cc: Linus Walleij Signed-off-by: Rob Herring Reviewed-by: Linus Walleij --- drivers/pci/controller/pci-v3-semi.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/pci/controller/pci-v3-semi.c b/drivers/pci/controller/pci-v3-semi.c index 3681e5af3878..198cf2c6ed92 100644 --- a/drivers/pci/controller/pci-v3-semi.c +++ b/drivers/pci/controller/pci-v3-semi.c @@ -239,7 +239,6 @@ struct v3_pci { struct device *dev; void __iomem *base; void __iomem *config_base; - struct pci_bus *bus; u32 config_mem; u32 non_pre_mem; u32 pre_mem; @@ -904,17 +903,7 @@ static int v3_pci_probe(struct platform_device *pdev) val |= V3_SYSTEM_M_LOCK; writew(val, v3->base + V3_SYSTEM); - ret = pci_scan_root_bus_bridge(host); - if (ret) { - dev_err(dev, "failed to register host: %d\n", ret); - return ret; - } - v3->bus = host->bus; - - pci_bus_assign_resources(v3->bus); - pci_bus_add_devices(v3->bus); - - return 0; + return pci_host_probe(host); } static const struct of_device_id v3_pci_of_match[] = { From patchwork Fri May 22 23:48:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring (Arm)" X-Patchwork-Id: 11566439 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 88B56912 for ; Fri, 22 May 2020 23:51:32 +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 66F54206BE for ; Fri, 22 May 2020 23:51:32 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Z+0jWt7y" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 66F54206BE 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+patchwork-linux-arm=patchwork.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=4bNDWKRDofd2/n/H0+/s1gTqHqf60AxUSUCec0C16V0=; b=Z+0jWt7ys5JxzH b31maVIrMfoeX7xaZw1kxRa/X+S3aZLWLN9OwGHsgcCjBWWRoZdukPnoqUGWiHSUO5eWKPFUgOhXH vaQxAqj6Wve+gyzBOu9mBsGON3cjDDYD+jbFtFxydSE0geO9Um4Wr8ptGtLoBn2dYbxEo6l4hTRrV 8NnSEeHweYzuvX9R7PyALTjiptMbNPX74YfIeOUC0brRYieOBxOtRpZB4RE0BqVZGXOM1EMylNXKN imvmTlcvqD6fjKayTIfCyPPHMzE6+ZzV9pQ/56UY7n4QCTNt+gAPCxOz+pQOHXqzfgfb40AQIrShC RNgZm7rrdgWtgg1500UA==; 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 1jcHRl-0007gr-Fb; Fri, 22 May 2020 23:51:25 +0000 Received: from mail-io1-f67.google.com ([209.85.166.67]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jcHPA-0003Rn-6d for linux-arm-kernel@lists.infradead.org; Fri, 22 May 2020 23:48:46 +0000 Received: by mail-io1-f67.google.com with SMTP id q8so11952017iow.7 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=Hu+r9D87KcoWa189MTy6Edmp4pidtqObZuiMTiz4cgc=; b=GNgo21s7PXbwEWwO6sB2fQd6H0Zduw1iUif9UhvGcu5XJ0BbDmm02uNjtz6ruH65Kr zN1RWZkPpGVcLtDdUme8Lb2IT6Kh4xxHIOi8FPHJ60vjeqeZm659RvKNO6EvyMmEqL+4 MaVZPKYDN6iMcuO9/0GUKlKTsqqfCeLChjSxMlvAIG22boEZHtJspyHuDQ+CF+uzjAt9 9TogolR3VQ56L5wcHwQ9aEyFZrFfxcdgHvk0wugy17DjY9ZI4i0JxS+k4lTX8ypvc0JA NkhgkTtNokFfg1kee3wQPz+No2+3BsEl08H6Ma+S7aE+HLninqGbrLY5P0ui6sZ+mccW LTZA== X-Gm-Message-State: AOAM533iM9Ntfhz0Jxq/AfX8Qq72blkUB/w3MyntCjjxqur1oGcCatWI CJCywWf3HdEq99cNsbs64sxcE84= X-Google-Smtp-Source: ABdhPJzvS3aCPPD+k4N9FAiNd4VPWGqJzq7xAINIEBc8KXR6heifVNZNNeQbLmVhFEJExzb4WHJESg== X-Received: by 2002:a6b:bc85:: with SMTP id m127mr5019308iof.89.1590191322407; Fri, 22 May 2020 16:48:42 -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.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 May 2020 16:48:41 -0700 (PDT) From: Rob Herring To: Lorenzo Pieralisi Subject: [PATCH 08/15] PCI: versatile: Use pci_host_probe() to register host Date: Fri, 22 May 2020 17:48:25 -0600 Message-Id: <20200522234832.954484-9-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_342518_13E26164 X-CRM114-Status: GOOD ( 12.20 ) X-Spam-Score: 0.8 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (0.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.166.67 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [robherring2[at]gmail.com] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.166.67 listed in wl.mailspike.net] 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [robherring2[at]gmail.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different 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, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The versatile host driver does the same host registration and bus scanning calls as pci_host_probe, so let's use it instead. Cc: Lorenzo Pieralisi Signed-off-by: Rob Herring --- drivers/pci/controller/pci-versatile.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/drivers/pci/controller/pci-versatile.c b/drivers/pci/controller/pci-versatile.c index b911359b6d81..e90f0cc65c73 100644 --- a/drivers/pci/controller/pci-versatile.c +++ b/drivers/pci/controller/pci-versatile.c @@ -70,7 +70,6 @@ static int versatile_pci_probe(struct platform_device *pdev) int ret, i, myslot = -1, mem = 1; u32 val; void __iomem *local_pci_cfg_base; - struct pci_bus *bus, *child; struct pci_host_bridge *bridge; bridge = devm_pci_alloc_host_bridge(dev, 0); @@ -164,18 +163,7 @@ static int versatile_pci_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 versatile_pci_of_match[] = { From patchwork Fri May 22 23:48:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring (Arm)" X-Patchwork-Id: 11566445 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C030690 for ; Fri, 22 May 2020 23:52:20 +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 623DC206BE for ; Fri, 22 May 2020 23:52:20 +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 623DC206BE 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+patchwork-linux-arm=patchwork.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-W9; Fri, 22 May 2020 23:52:13 +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-Spam-Score: 0.8 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (0.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.166.68 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.166.68 listed in wl.mailspike.net] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [robherring2[at]gmail.com] 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [robherring2[at]gmail.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different 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 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.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[] = { From patchwork Fri May 22 23:48:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring (Arm)" X-Patchwork-Id: 11566447 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5BF2F912 for ; Fri, 22 May 2020 23:52:33 +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 2CE58206BE for ; Fri, 22 May 2020 23:52:33 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ZoaeU0Iq" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2CE58206BE 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+patchwork-linux-arm=patchwork.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=bRxCHZnqkYKNda01btbEGz8YJkvM2NPiyjynGeqS0P0=; b=ZoaeU0Iq8EzGQv Kv/BftvwH0X6fBa6x8ViHBIm53CJ3yGwUZSQng264MVKMkp3HxAMms3PX5Da+7xFUFmO0WOW+a3Jx tvQtgckwyjVQ07QzvpxcC46RicG0kyCsV9gh/VhF7NTnk2cPVSSkrzTXDfiUd4Fw1Nz3z8xGJ2jLR xrKZUgqVPsvQx/8DmoJ6+y16FNALULxjhug2EwLtJm3/F+i4AkpEe/ZuXVrn/Iy5x/dBO+GlEgJB0 z2MT6AFRqieHxTm2XCgMco/79nfHVbWd+DahIn6veBn7JhDbk5FyIcZEeP7kKzHWPxSlWJ2Xq8tzd yGVvS7jqZrAnjzW8J7dQ==; 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 1jcHSn-0000Fi-Nl; Fri, 22 May 2020 23:52:29 +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 1jcHPB-0003V7-PN for linux-arm-kernel@lists.infradead.org; Fri, 22 May 2020 23:48:47 +0000 Received: by mail-io1-f68.google.com with SMTP id q129so4206291iod.6 for ; Fri, 22 May 2020 16:48:45 -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=A2f+A+UJfY1PJTDNi0NFbPeTlvbbCc37QATxTjmUPVg=; b=XXkvl8PQ2E8ZDeU4o14MRelKo/gFYpP0lCGflNB/unGH6nyKXspcK9U1ttRrsqVvY1 kRbhVjU2wld6eNJ3KOEH7ElL+gsUZN8SSlmr8n7b9mRl5qPnvQgm+Yt+SeiqAZ1VbWTn 6/5pbyKkJCH8G9AUy5ckqIddrXWtR/o11ID0WGbfYblunk2lFAjSiMzixQ+CzgZZv0z8 yu729XN8unsym6JYVu78j1loHDHuGnWgh1ouI3w+cA9OyA+/2RfT/FmLkxyAsaCR/Rhc d7pDxI5IMkDfRHwLWbScDtYiV9pv12y/kWorEy3MFcF/dAFtNQfVHD6XV9USOsTX5lDV PEwA== X-Gm-Message-State: AOAM5337Fd7gVE2AIFqsgOBPF6yIRFHIa4jz9r3cvkEql/phnjmkZwtj Fj5z+R5NmNDRk6T5+Qtynw== X-Google-Smtp-Source: ABdhPJz0drAdXL8tOrdvka5OuWYdrXyPsukcMKwJDfVFN/ZlnqO01gwrcMTn1syXCMOnmaFNfmE11w== X-Received: by 2002:a5d:9e55:: with SMTP id i21mr3535285ioi.130.1590191324652; Fri, 22 May 2020 16:48:44 -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.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 May 2020 16:48:43 -0700 (PDT) From: Rob Herring To: Lorenzo Pieralisi Subject: [PATCH 10/15] PCI: altera: Use pci_host_probe() to register host Date: Fri, 22 May 2020 17:48:27 -0600 Message-Id: <20200522234832.954484-11-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_164846_109817_A424DDB0 X-CRM114-Status: GOOD ( 11.88 ) X-Spam-Score: 0.8 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (0.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.166.68 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.166.68 listed in wl.mailspike.net] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [robherring2[at]gmail.com] 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [robherring2[at]gmail.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different 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, Ley Foon Tan , linux-arm-kernel@lists.infradead.org, rfi@lists.rocketboards.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The altera 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: Ley Foon Tan Cc: rfi@lists.rocketboards.org Signed-off-by: Rob Herring Reviewed-by: Ley Foon Tan --- drivers/pci/controller/pcie-altera.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/drivers/pci/controller/pcie-altera.c b/drivers/pci/controller/pcie-altera.c index 24cb1c331058..26ac3ad81de0 100644 --- a/drivers/pci/controller/pcie-altera.c +++ b/drivers/pci/controller/pcie-altera.c @@ -773,8 +773,6 @@ static int altera_pcie_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct altera_pcie *pcie; - struct pci_bus *bus; - struct pci_bus *child; struct pci_host_bridge *bridge; int ret; const struct of_device_id *match; @@ -825,20 +823,7 @@ static int altera_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); - - /* Configure PCI Express setting. */ - list_for_each_entry(child, &bus->children, node) - pcie_bus_configure_settings(child); - - pci_bus_add_devices(bus); - return ret; + return pci_host_probe(bridge); } static int altera_pcie_remove(struct platform_device *pdev) From patchwork Fri May 22 23:48:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring (Arm)" X-Patchwork-Id: 11566441 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 867DC90 for ; Fri, 22 May 2020 23:51: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 19AA320738 for ; Fri, 22 May 2020 23:51: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="TBVdCQDW" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 19AA320738 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+patchwork-linux-arm=patchwork.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=Vij3gTpbeEx4mmgc+FaSF0L+C9AazhFCHMCwoCyHPYk=; b=TBVdCQDWBR8GS9 g7X1fCED2vrcV9d3AhGwDb1Z0BPEiuoPisqKialdvKaY+/v3zXbEYFUh2OrsZmwqoA1MOZz9DLDjL w7AisYxtZlCCXwqjKFvWNPtkt177rCmREFh3pAuLFsOL6YwiAyqfBCeRqkgyxdHMSsRJWE1NEogx3 L7WJMTMq4QI6+ESHewtYOjmExn8JjyefgY2QWLw3xVmwU/Udb4FRN6N2d6lY7/onNlT0sr2f5kOB2 lcRV8XfJplQrpCCQpIG8lek8B0KDBRWrcfVvU+YiG6yCnVJNbV33RfPC/XNN8PoPT7TPXR9jt/t3p IjLJZxfyZ94YZu7GUcZg==; 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 1jcHRz-0007tl-3f; Fri, 22 May 2020 23:51:39 +0000 Received: from mail-il1-f196.google.com ([209.85.166.196]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jcHPD-0003Wx-Ed for linux-arm-kernel@lists.infradead.org; Fri, 22 May 2020 23:48:48 +0000 Received: by mail-il1-f196.google.com with SMTP id l20so12457889ilj.10 for ; Fri, 22 May 2020 16:48:46 -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=I6AdS/TZXzVwZhaj3XeZ8pHwXrcTg21qPzTXuwbZXTY=; b=evDKJXr8H9L1QICOVa9w8rdad43/khlyTiO6ypxNeoVA9ecIPtTAZU3g9AbOyImVbp 0lH1lOAcSBvcCHAOhwXTgrSDiXWcsAawumoAjPYHNHVkxp7cbmauf3QqNdY49jbnAjql peYEdBNfn8WVIFLo6QkBETKIzDE005jsw1k6U2M9zIfofhDJFk4DFEM0cbbaXIwDMQZu eiDIqjG7j64FIAjNC0GqhUz+wPukRF81oeNvB1dFslpIIjH93qXhK8emQ766/DkQXeQg sybz3v8x7e9f0ik4K6UfVN4W9NxNMhTCZ/AMjg+ohgF9g1nG8WULYuqGrHO7bq06xULC UV/g== X-Gm-Message-State: AOAM530ZlEMuwQNwBKycUDyx0B2XuITqb5N2MXZcIPxVaGUQ0M4R9iwH qMJPTiOLciijeADD8PxmGg== X-Google-Smtp-Source: ABdhPJx+ueXcTjl20AOza8BrHvDbmua+rc9aHmFgQKv5RD1ZcW5dKvkYfx+vLS94kC3TUkSvYVHV9w== X-Received: by 2002:a92:aa53:: with SMTP id j80mr15676503ili.299.1590191325856; Fri, 22 May 2020 16:48:45 -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.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 May 2020 16:48:45 -0700 (PDT) From: Rob Herring To: Lorenzo Pieralisi Subject: [PATCH 11/15] PCI: iproc: Use pci_host_probe() to register host Date: Fri, 22 May 2020 17:48:28 -0600 Message-Id: <20200522234832.954484-12-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_164847_499185_4DA1EFD1 X-CRM114-Status: GOOD ( 14.00 ) X-Spam-Score: 0.8 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (0.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.166.196 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [robherring2[at]gmail.com] 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [robherring2[at]gmail.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.166.196 listed in wl.mailspike.net] 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different 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: Scott Branden , linux-pci@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, Ray Jui , Bjorn Helgaas , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The iproc 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: Lorenzo Pieralisi Cc: Ray Jui Cc: Scott Branden Cc: bcm-kernel-feedback-list@broadcom.com Signed-off-by: Rob Herring Acked-by: Scott Branden --- drivers/pci/controller/pcie-iproc.c | 18 +++++------------- drivers/pci/controller/pcie-iproc.h | 2 -- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/drivers/pci/controller/pcie-iproc.c b/drivers/pci/controller/pcie-iproc.c index 8c7f875acf7f..232fca0754e1 100644 --- a/drivers/pci/controller/pcie-iproc.c +++ b/drivers/pci/controller/pcie-iproc.c @@ -1470,7 +1470,6 @@ int iproc_pcie_setup(struct iproc_pcie *pcie, struct list_head *res) { struct device *dev; int ret; - struct pci_bus *child; struct pci_host_bridge *host = pci_host_bridge_from_priv(pcie); dev = pcie->dev; @@ -1531,21 +1530,12 @@ int iproc_pcie_setup(struct iproc_pcie *pcie, struct list_head *res) host->map_irq = pcie->map_irq; host->swizzle_irq = pci_common_swizzle; - ret = pci_scan_root_bus_bridge(host); + ret = pci_host_probe(host); if (ret < 0) { dev_err(dev, "failed to scan host: %d\n", ret); goto err_power_off_phy; } - pci_assign_unassigned_bus_resources(host->bus); - - pcie->root_bus = host->bus; - - list_for_each_entry(child, &host->bus->children, node) - pcie_bus_configure_settings(child); - - pci_bus_add_devices(host->bus); - return 0; err_power_off_phy: @@ -1558,8 +1548,10 @@ EXPORT_SYMBOL(iproc_pcie_setup); int iproc_pcie_remove(struct iproc_pcie *pcie) { - pci_stop_root_bus(pcie->root_bus); - pci_remove_root_bus(pcie->root_bus); + struct pci_host_bridge *host = pci_host_bridge_from_priv(pcie); + + pci_stop_root_bus(host->bus); + pci_remove_root_bus(host->bus); iproc_pcie_msi_disable(pcie); diff --git a/drivers/pci/controller/pcie-iproc.h b/drivers/pci/controller/pcie-iproc.h index 4f03ea539805..c2676e442f55 100644 --- a/drivers/pci/controller/pcie-iproc.h +++ b/drivers/pci/controller/pcie-iproc.h @@ -54,7 +54,6 @@ struct iproc_msi; * @reg_offsets: register offsets * @base: PCIe host controller I/O register base * @base_addr: PCIe host controller register base physical address - * @root_bus: pointer to root bus * @phy: optional PHY device that controls the Serdes * @map_irq: function callback to map interrupts * @ep_is_internal: indicates an internal emulated endpoint device is connected @@ -85,7 +84,6 @@ struct iproc_pcie { void __iomem *base; phys_addr_t base_addr; struct resource mem; - struct pci_bus *root_bus; struct phy *phy; int (*map_irq)(const struct pci_dev *, u8, u8); bool ep_is_internal; From patchwork Fri May 22 23:48:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring (Arm)" X-Patchwork-Id: 11566443 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 532F8912 for ; Fri, 22 May 2020 23:52:03 +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 31719206BE for ; Fri, 22 May 2020 23:52:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="nbXACJRM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 31719206BE 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+patchwork-linux-arm=patchwork.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=Dls4+SYq1ll3uGqhdEBA9qVAtXMZBd0pMk+4mGsLHNs=; b=nbXACJRMGGcZc9 L25VFj72XsZGFrjNBbzWOwfqy16h51frhq0tG/POy3a/WiC3BRH/+/+dYnVWqpE6t2taRW9f42GQL kwJ9+JM1mjzSuEXT535DuGl8HQnW2H1ceaNtM1pplR/E0GC1oWJEmFGABgcmqKc/lyutEO+R1iQuT a+G1Fp3ghZrtHjtezQQuLP17cAXHkvZ8AzZQ/iuspEKMKZo6TV8UnKFmX058Oh474zJ6oRGihT0Fj llqod/7u4wNjQjo1+bZAVyIOt3GirorRHMTKq8ATY+aFoFATTjgrU2kH/Snr5fJZ0+/JeGRbxxHti p8hHIuC56wrOFXlYZSGg==; 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 1jcHSF-00088b-68; Fri, 22 May 2020 23:51:55 +0000 Received: from mail-il1-f194.google.com ([209.85.166.194]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jcHPE-0003YS-Je for linux-arm-kernel@lists.infradead.org; Fri, 22 May 2020 23:48:50 +0000 Received: by mail-il1-f194.google.com with SMTP id w18so12437124ilm.13 for ; Fri, 22 May 2020 16:48:48 -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=l8MKWOkTFOUck/e3qV/n3PXjrwRqiBK3sTxqSf9d7+Q=; b=HgbkB55mmpZYNKsGblrBVlLbMVyWZbTfmqlx07/HoP0bamAmGzij5cgEEyN4J2S/wG W6v4RLg1KkNdAFQ3HRtqgm2Ec7ZLk55+4REMe8ROVGq8PZ2LYMytZzjcZsOJRUdfK6QG pl6kXFI1wXHBV4A6AUCcOP99RZBiKknEKX0TC5rhp5HM2x9iXlX/DeiZVA2WDuKgej+j 8Spaxu5MXmU63ZwNDH1pCcPiJ3UavN8+LiVNqvAF4shhsKGMg/9+WfPD1sJrqVq9QsQz 42nyHQuaMV+8jva3PGGZL3MbAK6nXLBoM6AssqmYiqTr1rnABpL/hwbdB0Hr3GfX85kc C9xg== X-Gm-Message-State: AOAM530WrtXE7hMXMYF4ra2meQPCz3qR5NGOou0v2fW/2xLQ1uqJxXtt 9PLjH3pnlryyOCs5vLUSnw== X-Google-Smtp-Source: ABdhPJxg5S2neYCB/6X3dzr3jwkcGSeZrpPJj0feTh/FWKaNYA2PpAUBHLVyiHOLA6yr38KykqSK5Q== X-Received: by 2002:a92:9e16:: with SMTP id q22mr15130162ili.17.1590191326864; Fri, 22 May 2020 16:48:46 -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.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 May 2020 16:48:46 -0700 (PDT) From: Rob Herring To: Lorenzo Pieralisi Subject: [PATCH 12/15] PCI: rcar: Use pci_host_probe() to register host Date: Fri, 22 May 2020 17:48:29 -0600 Message-Id: <20200522234832.954484-13-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_164848_662242_9894E0EF X-CRM114-Status: GOOD ( 11.30 ) X-Spam-Score: 0.8 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (0.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.166.194 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [robherring2[at]gmail.com] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.166.194 listed in wl.mailspike.net] 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [robherring2[at]gmail.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different 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: linux-pci@vger.kernel.org, Yoshihiro Shimoda , linux-renesas-soc@vger.kernel.org, Bjorn Helgaas , linux-arm-kernel@lists.infradead.org, Marek Vasut Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The rcar host driver does the same host registration and bus scanning calls as pci_host_probe, so let's use it instead. Cc: Marek Vasut Cc: Yoshihiro Shimoda Cc: linux-renesas-soc@vger.kernel.org Signed-off-by: Rob Herring Reviewed-by: Geert Uytterhoeven --- drivers/pci/controller/pcie-rcar-host.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/drivers/pci/controller/pcie-rcar-host.c b/drivers/pci/controller/pcie-rcar-host.c index d210a36561be..9069ad96fe95 100644 --- a/drivers/pci/controller/pcie-rcar-host.c +++ b/drivers/pci/controller/pcie-rcar-host.c @@ -330,8 +330,6 @@ static int rcar_pcie_enable(struct rcar_pcie_host *host) struct pci_host_bridge *bridge = pci_host_bridge_from_priv(host); struct rcar_pcie *pcie = &host->pcie; struct device *dev = pcie->dev; - struct pci_bus *bus, *child; - int ret; /* Try setting 5 GT/s link speed */ rcar_pcie_force_speedup(pcie); @@ -349,21 +347,7 @@ static int rcar_pcie_enable(struct rcar_pcie_host *host) if (IS_ENABLED(CONFIG_PCI_MSI)) bridge->msi = &host->msi.chip; - ret = pci_scan_root_bus_bridge(bridge); - if (ret < 0) - return ret; - - bus = bridge->bus; - - pci_bus_size_bridges(bus); - pci_bus_assign_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 int phy_wait_for_ack(struct rcar_pcie *pcie) From patchwork Fri May 22 23:48:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring (Arm)" X-Patchwork-Id: 11566451 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A9AB31391 for ; Fri, 22 May 2020 23:53:12 +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 86B8920738 for ; Fri, 22 May 2020 23:53:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="TKA0iKsL" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 86B8920738 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+patchwork-linux-arm=patchwork.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=pmrION8elVm/nCNrM0bmZvmbj4cxsy4Hu/DhV9rKkEc=; b=TKA0iKsLvzeZZp t6cd6SnTLUKDUfvL1ZesreBBzHvBlEuhKJHwBAEprgyFFPm/7/MQXdaoIWFVRXCNZT/Gm5y72xLpT znBFGwhcNBufcCpvRHtNxRu/7FuxsLtPd8Nhkbny+P+OK1X+FnBv9i7kRm20RIyw/0W5m0Lr6fbA7 ZSUU872RhKU+3LenfruEMrmM6NzCbWZP22ts22YkI1HniFsA4n/hylEDUFDRIo6Yj546k03ew3FUA 7dSY8HByeIMRizubWf+XiZctlkkJXW7oH251e6+NRAk58GX0u78JoXFbGaharkK6XhyztBzAiOfvf TST/eJtsCgm8u8Ls89IA==; 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 1jcHTM-0000k9-2V; Fri, 22 May 2020 23:53:04 +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-0003ZV-1f; Fri, 22 May 2020 23:48:52 +0000 Received: by mail-il1-f195.google.com with SMTP id 4so12533537ilg.1; Fri, 22 May 2020 16:48:48 -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=zH2C4ImO8nBnvyYQO4O7Y0tt8wrJ36q82CPBc6+58Gs=; b=iP7/Z03t/v6yn3bkrJE+7nmpL71uBKUP+0jZbJhpnp6gqJb6ASL/jktvzWUzsn2AYd cQidnR0bA8MT2r4kzU60PocZMmAdu6nBnWm4Bdeg6wEG0Rf74/2uZ5xkpLN5RZebPuc+ DBYua2Ohv3xYfpLkKJPWaVF3qBmke7zf8UIlEZKp5mh9kaJS0wBgwQu6/i5+mdSE/2/s jioM+iblxy36H5ArAsAnEQIKmIH2Zs4x2YXfLdb9qiNFs6ME9h80okqFtK+Ry7N6peTv wpadakcghMFr71xD8qFQh3g9NJoqe/Ng3HpyGhdxpYHXUkJ5i8Zuu7CbhbEnHREPW4Y2 W/sA== X-Gm-Message-State: AOAM533Nh1AH6DfuWfWS5JcLonsa/fYn28nRWx29QRXN7L3QQDnkt+YR INNf00DRtZvM1SAn7bfM+lcq73g= X-Google-Smtp-Source: ABdhPJybuB2O9NZz3pehcS6OOH6aSsjmBYbiZ8trb6adP3sKcXHHx5eDTRdxXxjc/F2eV1Dz4MmC9g== X-Received: by 2002:a92:c94f:: with SMTP id i15mr14637382ilq.185.1590191327879; Fri, 22 May 2020 16:48:47 -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.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 May 2020 16:48:47 -0700 (PDT) From: Rob Herring To: Lorenzo Pieralisi Subject: [PATCH 13/15] PCI: rockchip: Use pci_host_probe() to register host Date: Fri, 22 May 2020 17:48:30 -0600 Message-Id: <20200522234832.954484-14-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_354291_85D5606F X-CRM114-Status: GOOD ( 11.62 ) X-Spam-Score: 0.8 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (0.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.166.195 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.166.195 listed in wl.mailspike.net] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [robherring2[at]gmail.com] 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [robherring2[at]gmail.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different 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: Heiko Stuebner , linux-pci@vger.kernel.org, Shawn Lin , linux-rockchip@lists.infradead.org, Bjorn Helgaas , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The rockchip host driver does the same host registration and bus scanning calls as pci_host_probe, so let's use it instead. Cc: Shawn Lin Cc: Heiko Stuebner Cc: linux-rockchip@lists.infradead.org Signed-off-by: Rob Herring --- drivers/pci/controller/pcie-rockchip-host.c | 18 ++++-------------- drivers/pci/controller/pcie-rockchip.h | 1 - 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/drivers/pci/controller/pcie-rockchip-host.c b/drivers/pci/controller/pcie-rockchip-host.c index 94af6f5828a3..6a3c8442258b 100644 --- a/drivers/pci/controller/pcie-rockchip-host.c +++ b/drivers/pci/controller/pcie-rockchip-host.c @@ -949,7 +949,6 @@ static int rockchip_pcie_probe(struct platform_device *pdev) { struct rockchip_pcie *rockchip; struct device *dev = &pdev->dev; - struct pci_bus *bus, *child; struct pci_host_bridge *bridge; struct resource *bus_res; int err; @@ -1015,20 +1014,10 @@ static int rockchip_pcie_probe(struct platform_device *pdev) bridge->map_irq = of_irq_parse_and_map_pci; bridge->swizzle_irq = pci_common_swizzle; - err = pci_scan_root_bus_bridge(bridge); + err = pci_host_probe(bridge); if (err < 0) goto err_remove_irq_domain; - bus = bridge->bus; - - rockchip->root_bus = bus; - - pci_bus_size_bridges(bus); - pci_bus_assign_resources(bus); - list_for_each_entry(child, &bus->children, node) - pcie_bus_configure_settings(child); - - pci_bus_add_devices(bus); return 0; err_remove_irq_domain: @@ -1051,9 +1040,10 @@ static int rockchip_pcie_remove(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct rockchip_pcie *rockchip = dev_get_drvdata(dev); + struct pci_host_bridge *bridge = pci_host_bridge_from_priv(rockchip); - pci_stop_root_bus(rockchip->root_bus); - pci_remove_root_bus(rockchip->root_bus); + pci_stop_root_bus(bridge->bus); + pci_remove_root_bus(bridge->bus); irq_domain_remove(rockchip->irq_domain); rockchip_pcie_deinit_phys(rockchip); diff --git a/drivers/pci/controller/pcie-rockchip.h b/drivers/pci/controller/pcie-rockchip.h index d90dfb354573..4012543bafbe 100644 --- a/drivers/pci/controller/pcie-rockchip.h +++ b/drivers/pci/controller/pcie-rockchip.h @@ -303,7 +303,6 @@ struct rockchip_pcie { struct device *dev; struct irq_domain *irq_domain; int offset; - struct pci_bus *root_bus; void __iomem *msg_region; phys_addr_t msg_bus_addr; bool is_rc; From patchwork Fri May 22 23:48:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring (Arm)" X-Patchwork-Id: 11566449 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9AC4890 for ; Fri, 22 May 2020 23:52:54 +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 3A770206BE for ; Fri, 22 May 2020 23:52:54 +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 3A770206BE 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+patchwork-linux-arm=patchwork.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-VS; 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-Spam-Score: 0.8 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (0.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.166.195 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.166.195 listed in wl.mailspike.net] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [robherring2[at]gmail.com] 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [robherring2[at]gmail.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different 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 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.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 = { From patchwork Fri May 22 23:48:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring (Arm)" X-Patchwork-Id: 11566453 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3095A912 for ; Fri, 22 May 2020 23:53:25 +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 0EC1720738 for ; Fri, 22 May 2020 23:53:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="IM/qtQfC" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0EC1720738 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+patchwork-linux-arm=patchwork.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=o5gs5qW3OMjMNGNZfewldUsy4iVKhWFS0vDxuJjuunM=; b=IM/qtQfC3/AFhS Pffgla4BkdJuPUGZfkJHQmMMhb4wiWbs6GJDvzZglnVbFFQGIiw3hVco5dEWgVe8Xta+Nn4rpSh8T 0bh1GvZC+kaZfd7kMC5Qs6KmC4e2hRjQ+XbyN2bZj6h0A5vS789oxGwFqSW0Eul5ZaR1Vzyczj4rK shadS1Ded8D/bnaBcvTeXR7nzLkQsQXpRqgu2X/MK4Mee8YrnD/VAnqN7AlNDuhad5wTlobZi196+ O4HT5AIo7S+oMIwz9tBIbAgPiszXS0vnaXJ3zGVwV4evOQHMSFlO6eWi9EQwdwWCmX7ymz3yKVW53 IK+l6675Pgow00DeS8Qw==; 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 1jcHTb-0000x0-Bk; Fri, 22 May 2020 23:53:19 +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 1jcHPH-0003bF-6e for linux-arm-kernel@lists.infradead.org; Fri, 22 May 2020 23:48:52 +0000 Received: by mail-io1-f68.google.com with SMTP id h10so13310751iob.10 for ; Fri, 22 May 2020 16:48:50 -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=9jGQ2qLaDHXWpsTIu58oRNqkVRMoBCOunQH7NWW7la4=; b=SCKHza2R16DZN5h7j4XD90Fq1vqBJrR5jRyr4fUMnUcqgvw4dJdW1/ATB5G3pvcwUD 1EBJa4uzd8OXD2BS0W5Q4qIxBGAyT0qxSYTFbE2qRMNyKAUTXIIMAG8zvbBAChxPOKRO wW5sXVxkxm8ZngXE10xxVQMO8Ly/BGrSgtzJr9BS5eGuYJ3v4AlPyD2DlfNUcJ/DelT7 Odgy7YRstx2Kh46Mab1cPobQk+K9hLViFavw8Q3G7Km0dK196oYUvPOjHFy4/euR7ob4 ccUpWpH5k1nfNLAF08wJPI3SwO5kQSt9gcFtqd+lF6v35daS9weXU8gycagACoklzl6Q julw== X-Gm-Message-State: AOAM532sbTmVkimLOcuouAmXQ1jPct2eYq0RFMA/DP0Fu47ziPPmIlXx 7guS2dNEasRjlvw4TKBawA== X-Google-Smtp-Source: ABdhPJwZp9OVv7GaJiib7zatMqtlUftLOWe6s4BgpqKdDy0qd/frFOVmsmEYghU2qvA8+UlgAn3+0g== X-Received: by 2002:a05:6602:44b:: with SMTP id e11mr5183523iov.62.1590191329933; Fri, 22 May 2020 16:48:49 -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.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 May 2020 16:48:49 -0700 (PDT) From: Rob Herring To: Lorenzo Pieralisi Subject: [PATCH 15/15] PCI: xilinx: Use pci_host_probe() to register host Date: Fri, 22 May 2020 17:48:32 -0600 Message-Id: <20200522234832.954484-16-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_164851_377846_3DB98AB6 X-CRM114-Status: GOOD ( 12.34 ) X-Spam-Score: 0.8 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (0.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.166.68 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.166.68 listed in wl.mailspike.net] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [robherring2[at]gmail.com] 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit [robherring2[at]gmail.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different 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 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The xilinx 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.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/pci/controller/pcie-xilinx.c b/drivers/pci/controller/pcie-xilinx.c index 98e55297815b..05547497f391 100644 --- a/drivers/pci/controller/pcie-xilinx.c +++ b/drivers/pci/controller/pcie-xilinx.c @@ -616,7 +616,6 @@ static int xilinx_pcie_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct xilinx_pcie_port *port; - struct pci_bus *bus, *child; struct pci_host_bridge *bridge; int err; @@ -663,17 +662,7 @@ static int xilinx_pcie_probe(struct platform_device *pdev) xilinx_pcie_msi_chip.dev = dev; bridge->msi = &xilinx_pcie_msi_chip; #endif - err = pci_scan_root_bus_bridge(bridge); - if (err < 0) - 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 const struct of_device_id xilinx_pcie_of_match[] = {