From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C1F95C43445 for ; Mon, 3 Aug 2020 21:01:37 +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 BAA4822C9F for ; Mon, 3 Aug 2020 21:01:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="CVPi2dQU" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BAA4822C9F 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-amlogic-bounces+linux-amlogic=archiver.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=hALB0b5YusCoXXaIa5zQqeko5e55PQtDuLjAReYFI04=; b=CVPi2dQU0i0hd5JgEp4hs8Pn+r DhWtZenNoALWn+zvOuJYuKmVk2Bh8y1YnwOIrQtSjEmNucKQpocJ5LGlZE8EjekQ3Vz8sPXtvNOQh uZqHpPdwJEVkHEqn9gxFSuoAUR9Noaty+ax+m8dOb3kqmpABtdl+aTVrU36xaKsU6QrA2TF+J0Ux3 UN+fpMgBUSXFLZh4lojLM6V4rIS6dNQNO5nDlPhGOmPHoO7w0zzYw2eHEVK480LXutgSjK2IqQ4VD BxXTQGIfn7PN6hzARiyt2pTLTr07lbXmU/sNX/bTOz4QtEuPYEwqUYBSB3yxZ9IIknGgqvDmi6+qn drHRcPNQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2haF-0008MW-6f; Mon, 03 Aug 2020 21:01:23 +0000 Received: from mail-io1-f53.google.com ([209.85.166.53]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2haC-0008Lj-Ab; Mon, 03 Aug 2020 21:01:21 +0000 Received: by mail-io1-f53.google.com with SMTP id l17so39997629iok.7; Mon, 03 Aug 2020 14:01:19 -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=caU68Vks0Qq0qRNr1RcbbJo83bu5SQyVcphbC7uR/pw=; b=pKNryIduFtcz7qXkBQY5jxQtC/s73yD9v5o5rGvfvW8QcPpMNGONgbqN/JX56cJ9Yk fKA6Xqv9XpfATc/Z7xvKK5yAJvhPwBVziHijsTfB/R9f4Zk0tNdcoIOsWVlv4OLVMw/e QZxe4AoKkOr8FbUrObWO57IKqApVe0IDJRCbuhD0p6/yRgqjfO+q6ou3zF40M+CIrZHa pWnTcYA16dSSUfHCbqs1+A5xoeY3tqXNM42wGmhWurLnZkUIKnfMtKch5C5zXKQpkwYb 9axqib4uPm+kdBLbcTx20VZR6fUGnxeKIHQsrVCo3MbV3+W8MzAzjDDolT8JNFaNbQs2 fr/A== X-Gm-Message-State: AOAM530kimZK2KwN8OgnVmx3MiRPVS0ovPKEmLxe7PKIuJs7b/DvftvC jL1Gs6ALRwE2bRt0+ciEPg== X-Google-Smtp-Source: ABdhPJwLvkQ8nLiW6KyvJ0FE/ZZBxba/47A0nMcMogCK9MlyD6FPHyseUZgrOPhESgV+UWpEU2XPBA== X-Received: by 2002:a5d:9b96:: with SMTP id r22mr1872679iom.66.1596488479389; Mon, 03 Aug 2020 14:01:19 -0700 (PDT) Received: from xps15.herring.priv ([64.188.179.252]) by smtp.googlemail.com with ESMTPSA id r6sm9292280iod.7.2020.08.03.14.01.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Aug 2020 14:01:18 -0700 (PDT) From: Rob Herring To: Bjorn Helgaas , Gustavo Pimentel , Jingoo Han , Lorenzo Pieralisi Subject: [RFC 00/27] PCI: dwc: Driver clean-ups Date: Mon, 3 Aug 2020 15:00:49 -0600 Message-Id: <20200803210116.3132633-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-20200803_170120_406368_8BE743A0 X-CRM114-Status: GOOD ( 12.44 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kunihiko Hayashi , linux-pci@vger.kernel.org, Binghui Wang , Bjorn Andersson , Masahiro Yamada , Thierry Reding , linux-arm-kernel@axis.com, Jonathan Chocron , Jonathan Hunter , Fabio Estevam , Jesper Nilsson , linux-samsung-soc@vger.kernel.org, Kevin Hilman , Pratyush Anand , Krzysztof Kozlowski , Kishon Vijay Abraham I , Murali Karicheri , NXP Linux Team , Xiaowei Song , Richard Zhu , linux-arm-msm@vger.kernel.org, Sascha Hauer , Yue Wang , linux-tegra@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Stanimir Varbanov , Kukjin Kim , Pengutronix Kernel Team , Shawn Guo , Lucas Stach Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org This is a series of clean-ups for the Designware PCI driver. The series primarily reworks the config space accessors to use the existing pci_ops struct and removes various private data that's also present in the pci_host_bridge struct. There's also some duplicated common (PCI and DWC) register defines which I converted to use the common defines. This is compile tested only as I don't have any DWC based h/w, so any testing would be helpful. This is an RFC as it will need to be rebased on 5.9-rc1 and my previous clean-up series. Rob Rob Herring (27): PCI: Allow root and child buses to have different pci_ops PCI: dwc: Use DBI accessors instead of own config accessors PCI: dwc: Allow overriding bridge pci_ops PCI: dwc: Add a default pci_ops.map_bus for root port PCI: dwc: al: Use pci_ops for child config space accessors PCI: dwc: keystone: Use pci_ops for config space accessors PCI: dwc: tegra: Use pci_ops for root config space accessors PCI: dwc: meson: Use pci_ops for root config space accessors PCI: dwc: kirin: Use pci_ops for root config space accessors PCI: dwc: exynos: Use pci_ops for root config space accessors PCI: dwc: histb: Use pci_ops for root config space accessors PCI: dwc: Remove dwc specific config accessor ops PCI: dwc: Use generic config accessors PCI: Also call .add_bus() callback for root bus PCI: dwc: keystone: Convert .scan_bus() callback to use add_bus PCI: dwc: Convert to use pci_host_probe() PCI: dwc: Remove root_bus pointer PCI: dwc: Remove storing of PCI resources PCI: dwc: Simplify config space handling PCI: dwc/keystone: Drop duplicated 'num-viewport' PCI: dwc: Check CONFIG_PCI_MSI inside dw_pcie_msi_init() PCI: dwc/imx6: Remove duplicate define PCIE_LINK_WIDTH_SPEED_CONTROL PCI: dwc/meson: Drop unnecessary RC config space initialization PCI: dwc/meson: Rework PCI config and DW port logic register accesses PCI: dwc/qcom: Use common PCI register definitions PCI: dwc: Remove hardcoded PCI_CAP_ID_EXP offset PCI: dwc/tegra: Use common Designware port logic register definitions drivers/pci/controller/dwc/pci-dra7xx.c | 4 +- drivers/pci/controller/dwc/pci-exynos.c | 45 +-- drivers/pci/controller/dwc/pci-imx6.c | 6 +- drivers/pci/controller/dwc/pci-keystone.c | 90 +++-- drivers/pci/controller/dwc/pci-meson.c | 164 +++------ drivers/pci/controller/dwc/pcie-al.c | 70 +--- drivers/pci/controller/dwc/pcie-artpec6.c | 11 +- .../pci/controller/dwc/pcie-designware-host.c | 319 ++++++------------ .../pci/controller/dwc/pcie-designware-plat.c | 4 +- drivers/pci/controller/dwc/pcie-designware.h | 28 +- drivers/pci/controller/dwc/pcie-histb.c | 45 +-- drivers/pci/controller/dwc/pcie-kirin.c | 43 +-- drivers/pci/controller/dwc/pcie-qcom.c | 31 +- drivers/pci/controller/dwc/pcie-spear13xx.c | 4 +- drivers/pci/controller/dwc/pcie-tegra194.c | 90 +++-- drivers/pci/controller/dwc/pcie-uniphier.c | 3 +- drivers/pci/probe.c | 14 +- include/linux/pci.h | 1 + 18 files changed, 368 insertions(+), 604 deletions(-) -- 2.25.1 _______________________________________________ linux-amlogic mailing list linux-amlogic@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-amlogic From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 62999C433E0 for ; Mon, 3 Aug 2020 21:01:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 70CB122CAD for ; Mon, 3 Aug 2020 21:01:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596488482; bh=oN1wga6oDPnA3bltstYlRjnDl8QsPIAZBDEUhwkxmfU=; h=From:To:Cc:Subject:Date:List-ID:From; b=WL4FoqJzLazSBlIsSW8GDISNCbQlqSubaGBzkm+5Er/lYvQyeMPsOhZOHLONDDJ62 tmeJoVGGj1t/6X4lB2YGS5k7rdA+EaQQKWPxyb/91E+RshiDpKu9k5G6pPKdwiZdNE J9JX0FfUg0U5AXflYEP5QJpjeu4+G+nUSQQpsH8o= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728897AbgHCVBV (ORCPT ); Mon, 3 Aug 2020 17:01:21 -0400 Received: from mail-io1-f46.google.com ([209.85.166.46]:44953 "EHLO mail-io1-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728889AbgHCVBU (ORCPT ); Mon, 3 Aug 2020 17:01:20 -0400 Received: by mail-io1-f46.google.com with SMTP id v6so24749093iow.11; Mon, 03 Aug 2020 14:01:19 -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=caU68Vks0Qq0qRNr1RcbbJo83bu5SQyVcphbC7uR/pw=; b=eLf7LczPFnRjHgztRiF/SzIF4maOualtTBucdu4jKPARDpvweRK/8Ikey/hZ9uKHmW q3ulkz9TB+0gsZyhMRRGV+RT0JScLW6eiRuVdy0h6Cs9wI3YAXyt530hyDYwClmvIrnF PBSgvTeMUe4FM2Ri+r6Cu8rwmmPGbQ5HmLOvi3dURAioxjNXCSC6As/uyiRkpax9kg+I MwVRonkBibAPH3Vqigm4NoLUZj9BsEoJF8P8u54s07kI5vpFnti4NApiVsjTXwetrzfw Q7LbHWkLqRJaqwsn0wJl+urSidxjXe6DKTZ4jczt8GbdHlu8z0UQK1m9LWCB9sRnQUv+ icrQ== X-Gm-Message-State: AOAM530Wwp4vl3i/+A3lSiRwqAzCAJpP9Q+vPMGfTU/d18C2iXNGfuqi 1l7FTE3qx6SK7JIOdqNsdg== X-Google-Smtp-Source: ABdhPJwLvkQ8nLiW6KyvJ0FE/ZZBxba/47A0nMcMogCK9MlyD6FPHyseUZgrOPhESgV+UWpEU2XPBA== X-Received: by 2002:a5d:9b96:: with SMTP id r22mr1872679iom.66.1596488479389; Mon, 03 Aug 2020 14:01:19 -0700 (PDT) Received: from xps15.herring.priv ([64.188.179.252]) by smtp.googlemail.com with ESMTPSA id r6sm9292280iod.7.2020.08.03.14.01.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Aug 2020 14:01:18 -0700 (PDT) From: Rob Herring To: Bjorn Helgaas , Gustavo Pimentel , Jingoo Han , Lorenzo Pieralisi Cc: Binghui Wang , Bjorn Andersson , Fabio Estevam , Jesper Nilsson , Jonathan Chocron , Jonathan Hunter , Kevin Hilman , Kishon Vijay Abraham I , Krzysztof Kozlowski , Kukjin Kim , Kunihiko Hayashi , linux-amlogic@lists.infradead.org, linux-arm-kernel@axis.com, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-omap@vger.kernel.org, linux-pci@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-tegra@vger.kernel.org, Lucas Stach , Masahiro Yamada , Murali Karicheri , NXP Linux Team , Pengutronix Kernel Team , Pratyush Anand , Richard Zhu , Sascha Hauer , Shawn Guo , Stanimir Varbanov , Thierry Reding , Xiaowei Song , Yue Wang Subject: [RFC 00/27] PCI: dwc: Driver clean-ups Date: Mon, 3 Aug 2020 15:00:49 -0600 Message-Id: <20200803210116.3132633-1-robh@kernel.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org This is a series of clean-ups for the Designware PCI driver. The series primarily reworks the config space accessors to use the existing pci_ops struct and removes various private data that's also present in the pci_host_bridge struct. There's also some duplicated common (PCI and DWC) register defines which I converted to use the common defines. This is compile tested only as I don't have any DWC based h/w, so any testing would be helpful. This is an RFC as it will need to be rebased on 5.9-rc1 and my previous clean-up series. Rob Rob Herring (27): PCI: Allow root and child buses to have different pci_ops PCI: dwc: Use DBI accessors instead of own config accessors PCI: dwc: Allow overriding bridge pci_ops PCI: dwc: Add a default pci_ops.map_bus for root port PCI: dwc: al: Use pci_ops for child config space accessors PCI: dwc: keystone: Use pci_ops for config space accessors PCI: dwc: tegra: Use pci_ops for root config space accessors PCI: dwc: meson: Use pci_ops for root config space accessors PCI: dwc: kirin: Use pci_ops for root config space accessors PCI: dwc: exynos: Use pci_ops for root config space accessors PCI: dwc: histb: Use pci_ops for root config space accessors PCI: dwc: Remove dwc specific config accessor ops PCI: dwc: Use generic config accessors PCI: Also call .add_bus() callback for root bus PCI: dwc: keystone: Convert .scan_bus() callback to use add_bus PCI: dwc: Convert to use pci_host_probe() PCI: dwc: Remove root_bus pointer PCI: dwc: Remove storing of PCI resources PCI: dwc: Simplify config space handling PCI: dwc/keystone: Drop duplicated 'num-viewport' PCI: dwc: Check CONFIG_PCI_MSI inside dw_pcie_msi_init() PCI: dwc/imx6: Remove duplicate define PCIE_LINK_WIDTH_SPEED_CONTROL PCI: dwc/meson: Drop unnecessary RC config space initialization PCI: dwc/meson: Rework PCI config and DW port logic register accesses PCI: dwc/qcom: Use common PCI register definitions PCI: dwc: Remove hardcoded PCI_CAP_ID_EXP offset PCI: dwc/tegra: Use common Designware port logic register definitions drivers/pci/controller/dwc/pci-dra7xx.c | 4 +- drivers/pci/controller/dwc/pci-exynos.c | 45 +-- drivers/pci/controller/dwc/pci-imx6.c | 6 +- drivers/pci/controller/dwc/pci-keystone.c | 90 +++-- drivers/pci/controller/dwc/pci-meson.c | 164 +++------ drivers/pci/controller/dwc/pcie-al.c | 70 +--- drivers/pci/controller/dwc/pcie-artpec6.c | 11 +- .../pci/controller/dwc/pcie-designware-host.c | 319 ++++++------------ .../pci/controller/dwc/pcie-designware-plat.c | 4 +- drivers/pci/controller/dwc/pcie-designware.h | 28 +- drivers/pci/controller/dwc/pcie-histb.c | 45 +-- drivers/pci/controller/dwc/pcie-kirin.c | 43 +-- drivers/pci/controller/dwc/pcie-qcom.c | 31 +- drivers/pci/controller/dwc/pcie-spear13xx.c | 4 +- drivers/pci/controller/dwc/pcie-tegra194.c | 90 +++-- drivers/pci/controller/dwc/pcie-uniphier.c | 3 +- drivers/pci/probe.c | 14 +- include/linux/pci.h | 1 + 18 files changed, 368 insertions(+), 604 deletions(-) -- 2.25.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 89C3EC433E0 for ; Mon, 3 Aug 2020 21:03:21 +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 8A69222BED for ; Mon, 3 Aug 2020 21:03:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="3a7t4bbD" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8A69222BED 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+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=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=0g5CynyH4u+F7LZ/X6HyPZYb7m5OZbimlQIlI7F8R18=; b=3a7t4bbDTa9+PbRNuJ00Op9sPo Ox9+PXgApTY4/H6koU3PN7txKyvYGKenpFh8lQZu6rWGj0nNo2jVyYeGBYdbF3tTbAmvcEfOfVnmU gM4KG408dFV5tN4EIUrSKR+JEL/DPuFIvCfuaSYza1CIRzidPdx8cxYXaozgglmdfejASWEEH0qda 4yg9Q27mkz7LjmwESzB55bOFahqZTSqh6JXzKskd93uVir/J/phSlTL/Ew1M1qZ1CaNKiHACbQbe+ J+J7Mmn/gzw7KAXzD+x//13bl1+i5ThQ4be11ivS/Gq8Lfb+oTDL2ST8Zd0YWFzqXiTWOdBFeq+em MAtB1UzQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2haF-0008Mk-Te; Mon, 03 Aug 2020 21:01:23 +0000 Received: from mail-io1-f53.google.com ([209.85.166.53]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2haC-0008Lj-Ab; Mon, 03 Aug 2020 21:01:21 +0000 Received: by mail-io1-f53.google.com with SMTP id l17so39997629iok.7; Mon, 03 Aug 2020 14:01:19 -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=caU68Vks0Qq0qRNr1RcbbJo83bu5SQyVcphbC7uR/pw=; b=pKNryIduFtcz7qXkBQY5jxQtC/s73yD9v5o5rGvfvW8QcPpMNGONgbqN/JX56cJ9Yk fKA6Xqv9XpfATc/Z7xvKK5yAJvhPwBVziHijsTfB/R9f4Zk0tNdcoIOsWVlv4OLVMw/e QZxe4AoKkOr8FbUrObWO57IKqApVe0IDJRCbuhD0p6/yRgqjfO+q6ou3zF40M+CIrZHa pWnTcYA16dSSUfHCbqs1+A5xoeY3tqXNM42wGmhWurLnZkUIKnfMtKch5C5zXKQpkwYb 9axqib4uPm+kdBLbcTx20VZR6fUGnxeKIHQsrVCo3MbV3+W8MzAzjDDolT8JNFaNbQs2 fr/A== X-Gm-Message-State: AOAM530kimZK2KwN8OgnVmx3MiRPVS0ovPKEmLxe7PKIuJs7b/DvftvC jL1Gs6ALRwE2bRt0+ciEPg== X-Google-Smtp-Source: ABdhPJwLvkQ8nLiW6KyvJ0FE/ZZBxba/47A0nMcMogCK9MlyD6FPHyseUZgrOPhESgV+UWpEU2XPBA== X-Received: by 2002:a5d:9b96:: with SMTP id r22mr1872679iom.66.1596488479389; Mon, 03 Aug 2020 14:01:19 -0700 (PDT) Received: from xps15.herring.priv ([64.188.179.252]) by smtp.googlemail.com with ESMTPSA id r6sm9292280iod.7.2020.08.03.14.01.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Aug 2020 14:01:18 -0700 (PDT) From: Rob Herring To: Bjorn Helgaas , Gustavo Pimentel , Jingoo Han , Lorenzo Pieralisi Subject: [RFC 00/27] PCI: dwc: Driver clean-ups Date: Mon, 3 Aug 2020 15:00:49 -0600 Message-Id: <20200803210116.3132633-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-20200803_170120_406368_8BE743A0 X-CRM114-Status: GOOD ( 12.44 ) 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: Kunihiko Hayashi , linux-pci@vger.kernel.org, Binghui Wang , Bjorn Andersson , Masahiro Yamada , Thierry Reding , linux-arm-kernel@axis.com, Jonathan Chocron , Jonathan Hunter , Fabio Estevam , Jesper Nilsson , linux-samsung-soc@vger.kernel.org, Kevin Hilman , Pratyush Anand , Krzysztof Kozlowski , Kishon Vijay Abraham I , Murali Karicheri , NXP Linux Team , Xiaowei Song , Richard Zhu , linux-arm-msm@vger.kernel.org, Sascha Hauer , Yue Wang , linux-tegra@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Stanimir Varbanov , Kukjin Kim , Pengutronix Kernel Team , Shawn Guo , Lucas Stach Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This is a series of clean-ups for the Designware PCI driver. The series primarily reworks the config space accessors to use the existing pci_ops struct and removes various private data that's also present in the pci_host_bridge struct. There's also some duplicated common (PCI and DWC) register defines which I converted to use the common defines. This is compile tested only as I don't have any DWC based h/w, so any testing would be helpful. This is an RFC as it will need to be rebased on 5.9-rc1 and my previous clean-up series. Rob Rob Herring (27): PCI: Allow root and child buses to have different pci_ops PCI: dwc: Use DBI accessors instead of own config accessors PCI: dwc: Allow overriding bridge pci_ops PCI: dwc: Add a default pci_ops.map_bus for root port PCI: dwc: al: Use pci_ops for child config space accessors PCI: dwc: keystone: Use pci_ops for config space accessors PCI: dwc: tegra: Use pci_ops for root config space accessors PCI: dwc: meson: Use pci_ops for root config space accessors PCI: dwc: kirin: Use pci_ops for root config space accessors PCI: dwc: exynos: Use pci_ops for root config space accessors PCI: dwc: histb: Use pci_ops for root config space accessors PCI: dwc: Remove dwc specific config accessor ops PCI: dwc: Use generic config accessors PCI: Also call .add_bus() callback for root bus PCI: dwc: keystone: Convert .scan_bus() callback to use add_bus PCI: dwc: Convert to use pci_host_probe() PCI: dwc: Remove root_bus pointer PCI: dwc: Remove storing of PCI resources PCI: dwc: Simplify config space handling PCI: dwc/keystone: Drop duplicated 'num-viewport' PCI: dwc: Check CONFIG_PCI_MSI inside dw_pcie_msi_init() PCI: dwc/imx6: Remove duplicate define PCIE_LINK_WIDTH_SPEED_CONTROL PCI: dwc/meson: Drop unnecessary RC config space initialization PCI: dwc/meson: Rework PCI config and DW port logic register accesses PCI: dwc/qcom: Use common PCI register definitions PCI: dwc: Remove hardcoded PCI_CAP_ID_EXP offset PCI: dwc/tegra: Use common Designware port logic register definitions drivers/pci/controller/dwc/pci-dra7xx.c | 4 +- drivers/pci/controller/dwc/pci-exynos.c | 45 +-- drivers/pci/controller/dwc/pci-imx6.c | 6 +- drivers/pci/controller/dwc/pci-keystone.c | 90 +++-- drivers/pci/controller/dwc/pci-meson.c | 164 +++------ drivers/pci/controller/dwc/pcie-al.c | 70 +--- drivers/pci/controller/dwc/pcie-artpec6.c | 11 +- .../pci/controller/dwc/pcie-designware-host.c | 319 ++++++------------ .../pci/controller/dwc/pcie-designware-plat.c | 4 +- drivers/pci/controller/dwc/pcie-designware.h | 28 +- drivers/pci/controller/dwc/pcie-histb.c | 45 +-- drivers/pci/controller/dwc/pcie-kirin.c | 43 +-- drivers/pci/controller/dwc/pcie-qcom.c | 31 +- drivers/pci/controller/dwc/pcie-spear13xx.c | 4 +- drivers/pci/controller/dwc/pcie-tegra194.c | 90 +++-- drivers/pci/controller/dwc/pcie-uniphier.c | 3 +- drivers/pci/probe.c | 14 +- include/linux/pci.h | 1 + 18 files changed, 368 insertions(+), 604 deletions(-) -- 2.25.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel