From patchwork Wed Jul 22 02:24:55 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: 11676969 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 053AE1510 for ; Wed, 22 Jul 2020 02:25:31 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 D1DDF20714 for ; Wed, 22 Jul 2020 02:25:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="tf2Ezkc2" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D1DDF20714 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-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version: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:In-Reply-To:References:List-Owner; bh=uiAfHssKpnh/WPh51TE4uIwBjI1ncSfG3cbZmGy1gBk=; b=tf2Ezkc2eQv/Tl7nyY/c87cPe2 kywrKMLwTbCkrkvQPFMQLvo9hoaPjtAMxZaIPs+N9OWL2MRebF7oo05Umiurc1GugBhJUkNnS8dZZ xYlXxtanp1X5xjU+CBNUZ1QFOEPlZ5C95lLC67OniuScYdYKZKNk+qNq+XFFgUBBrGR2+8VvvFB29 ZOXUNCAiklZQOKvVCDcvAm4AfAyazc6F5ZFuCCqG130fPxh4huivDy4hF6dYOKr/AKuxiZdKQIr7d mO3/qeccz78aq/rRa1UiU3wQRWZxx1zd8mA+BFmy1GhM+XynymRQu/vea/O4KV5Yiv7v+SsGTyvz8 qH3EK67A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jy4Ri-0003dh-Ag; Wed, 22 Jul 2020 02:25:26 +0000 Received: from mail-io1-f66.google.com ([209.85.166.66]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jy4Rc-0003cB-CZ; Wed, 22 Jul 2020 02:25:21 +0000 Received: by mail-io1-f66.google.com with SMTP id l1so841155ioh.5; Tue, 21 Jul 2020 19:25:18 -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:mime-version :content-transfer-encoding; bh=nVpjM+3Lpbcp75I5v0XW5iZgm+Uzzh+ISqSP/EdqLAY=; b=k0xNGEw9c9oMwi02jgzjaxooktwa4BNAS+E5apiHG5YqefVP5AcIdA4tQXfyiC8hgn skLqJ81ZmqqvlXkZ2o01yxKGlH7Y8JYgHutY5hsnQquPSz9jWJ1CObe98RZCrhaFQjgi J4ZY+JUAhnQLcmsnHz7M/5Jf+jQmsENtrFPWfaWbFPyAd8rU1uufhwb6/WHG79BdCPjh zSGI3Viw+9FYpf23GcXlmyTr4mgguYNExmjmw6F9BUaaT4G72sDIV8ZsTYHmoMJgZfN9 ZMxI5P1IM+4gu9aXevm/dFFjhmLLXu9WU/KqxcDbxJ9R3WldtdFI5vAT0YBYMQr83Y3f FZBg== X-Gm-Message-State: AOAM530yRGMczt91+omhRrVrZlXJBPA4i2L45UycOcSIPPMtg3TK1qV6 OpI9DR2pxBDPSyJZ7KJyng== X-Google-Smtp-Source: ABdhPJxr05rMMRsQFoBitzl6yB3DcYcw69YY56hOTSjh7VzNAqLbMzXVJl4H+CDkJ9g9oe8zU/qUjQ== X-Received: by 2002:a92:5a56:: with SMTP id o83mr31477790ilb.71.1595384717721; Tue, 21 Jul 2020 19:25:17 -0700 (PDT) Received: from xps15.herring.priv ([64.188.179.252]) by smtp.googlemail.com with ESMTPSA id y2sm11687981iox.22.2020.07.21.19.25.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jul 2020 19:25:16 -0700 (PDT) From: Rob Herring To: Bjorn Helgaas , Lorenzo Pieralisi Subject: [PATCH 00/19] PCI: Another round of host clean-ups Date: Tue, 21 Jul 2020 20:24:55 -0600 Message-Id: <20200722022514.1283916-1-robh@kernel.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200721_222520_452318_D4550B0A X-CRM114-Status: GOOD ( 12.87 ) X-Spam-Score: 0.3 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (0.3 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.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 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [robherring2[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom freemail headers are different X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Heiko Stuebner , Karthikeyan Mitran , linux-pci@vger.kernel.org, Shawn Lin , Thierry Reding , Thomas Petazzoni , Fabio Estevam , Marek Vasut , Linus Walleij , Ryder Lee , Will Deacon , Michal Simek , Jonathan Hunter , linux-rockchip@lists.infradead.org, Murali Karicheri , NXP Linux Team , Hou Zhiqiang , Richard Zhu , Sascha Hauer , linux-mediatek@lists.infradead.org, linux-tegra@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Gustavo Pimentel , Yoshihiro Shimoda , linux-renesas-soc@vger.kernel.org, Tom Joseph , Pengutronix Kernel Team , Jingoo Han , Shawn Guo , Lucas Stach Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org Here's another round PCI host bridge clean-ups. This one aims to reduce the amount of duplication in host probe functions by providing more default initialization of the pci_host_bridge. With the prior clean-ups, it's now possible to alloc and initialize the pci_host_bridge struct from DT in one step. Patches 2 and 3 drop some pci_host_bridge init. Patches 4-11 clean-up handling of root bus number and bus ranges. Patches 12 and 13 are cleanups for Cadence driver. Patches 14 and 15 are clean-ups for rCar driver. Patch 16 makes missing non-prefetchable region just a warning instead of an error in order to work with rcar-gen2. Patch 17 converts rcar-gen2 to not use the arm32 specific PCI setup. Patch 18 updates how the DT resource parsing is done for all the controller drivers. Any other new controller drivers will need updating. Patch 19 moves the default IRQ mapping to the bridge init core code. This is based on my previous series of clean-ups[1]. Compile tested only. Any testing would be appreciated as I don't have any of this h/w (well, I have a rock960c, but have not gotten PCIe to work on it). Rob [1] https://lore.kernel.org/linux-pci/20200522234832.954484-1-robh@kernel.org/ Rob Herring (19): PCI: versatile: Drop flag PCI_ENABLE_PROC_DOMAINS PCI: Set default bridge parent device PCI: Drop unnecessary zeroing of bridge fields PCI: aardvark: Use pci_is_root_bus() to check if bus is root bus PCI: designware: Use pci_is_root_bus() to check if bus is root bus PCI: mobiveil: Use pci_is_root_bus() to check if bus is root bus PCI: xilinx-nwl: Use pci_is_root_bus() to check if bus is root bus PCI: xilinx: Use pci_is_root_bus() to check if bus is root bus PCI: rockchip: Use pci_is_root_bus() to check if bus is root bus PCI: rcar: Use pci_is_root_bus() to check if bus is root bus PCI: Move setting pci_host_bridge.busnr out of host drivers PCI: cadence: Use bridge resources for outbound window setup PCI: cadence: Remove private bus number and range storage PCI: rcar: Use devm_pci_alloc_host_bridge() PCI: rcar: Use struct pci_host_bridge.windows list directly PCI: of: Reduce missing non-prefetchable memory region to a warning PCI: rcar-gen2: Convert to use modern host bridge probe functions PCI: Move DT resource setup into devm_pci_alloc_host_bridge() PCI: Set bridge map_irq and swizzle_irq to default functions .../pci/controller/cadence/pcie-cadence-ep.c | 6 +- .../controller/cadence/pcie-cadence-host.c | 65 +++---- drivers/pci/controller/cadence/pcie-cadence.c | 9 +- drivers/pci/controller/cadence/pcie-cadence.h | 8 +- drivers/pci/controller/dwc/pci-imx6.c | 2 +- drivers/pci/controller/dwc/pci-keystone.c | 4 +- .../pci/controller/dwc/pcie-designware-host.c | 28 +-- drivers/pci/controller/dwc/pcie-designware.h | 2 - .../controller/mobiveil/pcie-mobiveil-host.c | 21 +-- .../pci/controller/mobiveil/pcie-mobiveil.h | 1 - drivers/pci/controller/pci-aardvark.c | 25 +-- drivers/pci/controller/pci-ftpci100.c | 10 -- drivers/pci/controller/pci-host-common.c | 17 +- drivers/pci/controller/pci-loongson.c | 8 - drivers/pci/controller/pci-mvebu.c | 4 - drivers/pci/controller/pci-rcar-gen2.c | 162 +++++------------- drivers/pci/controller/pci-tegra.c | 10 -- drivers/pci/controller/pci-v3-semi.c | 12 -- drivers/pci/controller/pci-versatile.c | 13 +- drivers/pci/controller/pci-xgene.c | 9 - drivers/pci/controller/pcie-altera.c | 10 -- drivers/pci/controller/pcie-brcmstb.c | 9 - drivers/pci/controller/pcie-iproc-platform.c | 10 +- drivers/pci/controller/pcie-iproc.c | 3 - drivers/pci/controller/pcie-mediatek.c | 16 -- drivers/pci/controller/pcie-rcar-host.c | 73 +------- drivers/pci/controller/pcie-rockchip-host.c | 24 +-- drivers/pci/controller/pcie-rockchip.h | 1 - drivers/pci/controller/pcie-xilinx-nwl.c | 20 +-- drivers/pci/controller/pcie-xilinx.c | 22 +-- drivers/pci/of.c | 45 +++-- drivers/pci/pci.h | 8 + drivers/pci/probe.c | 7 + include/linux/pci.h | 12 -- 34 files changed, 160 insertions(+), 516 deletions(-) Acked-by: Bjorn Helgaas --- 2.25.1