From patchwork Tue Feb 27 10:35:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Minda Chen X-Patchwork-Id: 13573512 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id D362AC54E41 for ; Tue, 27 Feb 2024 10:35:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=EyS5ce2eYrJgfHa4AntnvUWcfzqOWCCFE7TbdmRzzog=; b=NYZbG0czns33j4 7leeke+3y55KdyXtVm1PrMLLuH2DZI68PW00lEUSj/00WKcwkxYys/KcoZK3kFiy7pkcu/BOnWcAb vVR9rnMuPzEpUGSgSrUeu3+a10AUnPWzmmCpVbVJnP9febeqeNq/nSHDQafhk4eFT8cZzKjA8u/z5 5xMYK5kH2Grfun6dhTX81GYF4yB6gLM7Y3aV8GEOl7N5ATnL7AeM7pTgv0ZwiPF0VGcvozE/fxYAg o+Z1SSmrU8ymBIj8jjioq4XDBGC3QSEVjjKcUUnYZzusrEHcITrzFeMOJkSraNQJIVfq2Rlcym3bB bwfJsmR4FL2mtwKak+aw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1reuoK-00000004lGy-0vhZ; Tue, 27 Feb 2024 10:35:44 +0000 Received: from mail-sh0chn02on2070a.outbound.protection.partner.outlook.cn ([2406:e500:4420:2::70a] helo=CHN02-SH0-obe.outbound.protection.partner.outlook.cn) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1reuoG-00000004lEG-2KSP for linux-riscv@lists.infradead.org; Tue, 27 Feb 2024 10:35:41 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WD8WZQyaYoYwgUWFOtlDxb2jk449fd7QOhWgBxfDpYkNPYQ3gIQN9fnzjiI1L++05ZSiXY/sSZEWjkcdFgonzyg+AkCbb9FjKKYlVArafxwBB30UGUH6ZBEunB00e6pnXmB7OsMUrKGSNrPoKatwIcW0HseWwA5Y7OH8Gmy8jh5JRsVyofcw6baEUxRy4Ltxd0sYRS9zdRX+XA0uxbLK9J2TgwE98hp08+JiXakAixmLkAmWCEx2KHQODbnZ5U9abDxig0cY31cQuK0gEFWKia8yIigp4tVTSGYYZMZAXefQt//804W9xRLbiOnjt9tKHtB+yx6JMgbgF3KG+Vw+NA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=8u7rdsaomMzM+dZFYx1cmmLgLtXul9EWiXfeKTQVofQ=; b=EsVo1FDtFH3BYo+W2+r5qRJSgMyhK1is+xipKH5P/USyCE3ehx6DQgOcVoh3x8FjSxY1AKplaoXlU4nEGCqnv2CS0v0U8/jifpSIHXCVz423UQPjkFxBVAgivzd/WSQO6Ck3lfxDE0VVTzhKGXMcTzRU0SIeRCi2jJ1lst8eOmUuaiA+j6ipv0x4/d+MtNFJcUC1c8auDiHAjQ+HDC3ZApae+gs2F9Ycb2+Uvd1xf34ffoYQsTz5D4qbGT7oS1a5rm+Q3ocezph92vGO5Qh1YAgCf/y97weTNtwIwp2SpKaJMqLU0EihMGqtUQVRNmK/tkohV2Mwx6ytvijHJfp9KA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=starfivetech.com; dmarc=pass action=none header.from=starfivetech.com; dkim=pass header.d=starfivetech.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=starfivetech.com; Received: from SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn (2406:e500:c311:25::15) by SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn (2406:e500:c311:25::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7270.47; Tue, 27 Feb 2024 10:35:31 +0000 Received: from SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn ([fe80::5a5a:fa59:15fd:63dc]) by SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn ([fe80::5a5a:fa59:15fd:63dc%3]) with mapi id 15.20.7270.047; Tue, 27 Feb 2024 10:35:31 +0000 From: Minda Chen To: Conor Dooley , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , Lorenzo Pieralisi , Thomas Gleixner , Daire McNamara , Emil Renner Berthing , Krzysztof Kozlowski Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org, linux-pci@vger.kernel.org, Paul Walmsley , Palmer Dabbelt , Albert Ou , Philipp Zabel , Mason Huo , Leyfoon Tan , Kevin Xie , Minda Chen Subject: [PATCH v15,RESEND 02/23] PCI: microchip: Move pcie-microchip-host.c to plda directory Date: Tue, 27 Feb 2024 18:35:01 +0800 Message-Id: <20240227103522.80915-3-minda.chen@starfivetech.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240227103522.80915-1-minda.chen@starfivetech.com> References: <20240227103522.80915-1-minda.chen@starfivetech.com> X-ClientProxiedBy: NT0PR01CA0003.CHNPR01.prod.partner.outlook.cn (2406:e500:c510::15) To SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn (2406:e500:c311:25::15) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SHXPR01MB0863:EE_ X-MS-Office365-Filtering-Correlation-Id: e4d539c1-7d02-4b64-56ac-08dc377fd2e0 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +IKcrFNVUE7tDQamkX+H8OSL8BzjYuTHAQUspnkC+1qYjUJ/J0Nnucaix44IDXPe3RP0HRQgSWspQ7qSPmv2msW6nNLEcMjvmjlCBtRxWu8BFpP4bkUUjvpnZH4i7CJdGvtTBQ18iBnZGYEwfiAmgvZn7TLIdmsfLtcMJFS1xu7Hy3aL0vs2wKqWNzOzoV8BSmOJoQZ5leMuQh3aY8TbnlDKFA+zbw1Q38QoJ5snUiWD+uTYf3x445y7WtZP4xtilAFNeuoFp6kWL4L6gVTqw4B7EA8YhpooMUvbNlzEqsDRv5xhgxJVrx/Q9fgIMYgs846zms7d8zvJL4PCn5ov93w1M5N3+ZAFS5NrAJ/aMFLkI+vGE+ti8457eeBQbFRhTB44wBEZotMp1USlvDvAuHWP95Hp1LL8tBdhXg47cud5S3wRGnvDOmLfNMsUHjl0G9EQbd1ReO1En3gmvtojG2+vwdgclshUcIMaER2DB16VIte5nJ50tZpM/joLpJbqxrMhn+VtMU4KhOoiHDZ7GUwoW+aPJe0xscYO8apPFSWHTtjrfNwS1FcjEfKa3tpipeyhvWOA8nBlX5NQn4XByUJz88A9OuMjY7l9m2/MFBzFbajL2iZIs30gaejxhygf X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn;PTR:;CAT:NONE;SFS:(13230031)(38350700005);DIR:OUT;SFP:1102; X-M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VIGRxAE52jWn4ItuTXpMHmG2L4vNrJx87yEniofvec+2ZXY6F0dvoL1a1LyIOoIpsuOsDdFrk3JtB7fiN7RJkk3rcqpGHWwWtlO8Udt1YCZurSV0ezZseQkskmOd+hjnAjbfuDHz9FaLLNEE1edZEx2NeLEJE9lyAWFbO6PINieq/GXY25Oj3AvoJi9XZexepfND6jlJZq8DT46iymyYdAxL83Wv+lXDyp9s5Kck7Or3NDwWROiRsbI5blsKDzNfRjyPVX9riAAUcJLVbg5zJfCq4FS2NWJ90bQCzQtwESZrIzqnT6vK7A1LJT3N/yg2ObxBNYdOt60PEmqEIEP0HoucxkXCtMtE+AMRGQbFeABsyIBynKjz0yZL6evuhRzvdp8FQ8QXNTa/zdxaZ/DtTwS7ONaotjdofdrqSuugfu8/lGbV02U7uBLmPBNgBcsutCYoNNz5KKO15wyMyrvqr6mfNb/CDpWIVlPaodakDLGGC1JhY1SvG3h+FQYaIp2xqZP4Njq+hSNYtg6HUB4j1n2S/OR0Kp6/SlfVPqKc+3VWhad9gK1w9K+jSPkayQOI9rGahwCsCrigJcecWLUg== X-OriginatorOrg: starfivetech.com X-MS-Exchange-CrossTenant-Network-Message-Id: e4d539c1-7d02-4b64-56ac-08dc377fd2e0 X-MS-Exchange-CrossTenant-AuthSource: SHXPR01MB0863.CHNPR01.prod.partner.outlook.cn X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Feb 2024 10:35:31.9049 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 06fe3fa3-1221-43d3-861b-5a4ee687a85c X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: K0O9Xzb7MMEZlcXjItEeTmNaa5CiRLA3iGxMIB6UNEU0E7xc8ysM+O6lZqT7Q7TpAOwxNjyR8gzIi+WjJcEeClPvUzjCPeHVJFgcKPD5Feg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SHXPR01MB0863 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240227_023540_626042_F16F2C79 X-CRM114-Status: GOOD ( 15.41 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org For Microchip Polarfire PCIe host is PLDA XpressRich IP, move to plda directory. Prepare for refactoring the codes. Signed-off-by: Minda Chen Reviewed-by: Conor Dooley --- MAINTAINERS | 4 ++-- drivers/pci/controller/Kconfig | 9 +-------- drivers/pci/controller/Makefile | 2 +- drivers/pci/controller/plda/Kconfig | 14 ++++++++++++++ drivers/pci/controller/plda/Makefile | 2 ++ .../controller/{ => plda}/pcie-microchip-host.c | 2 +- 6 files changed, 21 insertions(+), 12 deletions(-) create mode 100644 drivers/pci/controller/plda/Kconfig create mode 100644 drivers/pci/controller/plda/Makefile rename drivers/pci/controller/{ => plda}/pcie-microchip-host.c (99%) diff --git a/MAINTAINERS b/MAINTAINERS index 2ecaaec6a6bf..9f7e907c8749 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -17046,7 +17046,7 @@ M: Daire McNamara L: linux-pci@vger.kernel.org S: Supported F: Documentation/devicetree/bindings/pci/microchip* -F: drivers/pci/controller/*microchip* +F: drivers/pci/controller/plda/*microchip* PCIE DRIVER FOR QUALCOMM MSM M: Manivannan Sadhasivam @@ -18838,7 +18838,7 @@ F: drivers/clk/microchip/clk-mpfs*.c F: drivers/firmware/microchip/mpfs-auto-update.c F: drivers/i2c/busses/i2c-microchip-corei2c.c F: drivers/mailbox/mailbox-mpfs.c -F: drivers/pci/controller/pcie-microchip-host.c +F: drivers/pci/controller/plda/pcie-microchip-host.c F: drivers/pwm/pwm-microchip-core.c F: drivers/reset/reset-mpfs.c F: drivers/rtc/rtc-mpfs.c diff --git a/drivers/pci/controller/Kconfig b/drivers/pci/controller/Kconfig index e534c02ee34f..4d2c188f5835 100644 --- a/drivers/pci/controller/Kconfig +++ b/drivers/pci/controller/Kconfig @@ -215,14 +215,6 @@ config PCIE_MT7621 help This selects a driver for the MediaTek MT7621 PCIe Controller. -config PCIE_MICROCHIP_HOST - tristate "Microchip AXI PCIe controller" - depends on PCI_MSI && OF - select PCI_HOST_COMMON - help - Say Y here if you want kernel to support the Microchip AXI PCIe - Host Bridge driver. - config PCI_HYPERV_INTERFACE tristate "Microsoft Hyper-V PCI Interface" depends on ((X86 && X86_64) || ARM64) && HYPERV && PCI_MSI @@ -356,4 +348,5 @@ config PCIE_XILINX_CPM source "drivers/pci/controller/cadence/Kconfig" source "drivers/pci/controller/dwc/Kconfig" source "drivers/pci/controller/mobiveil/Kconfig" +source "drivers/pci/controller/plda/Kconfig" endmenu diff --git a/drivers/pci/controller/Makefile b/drivers/pci/controller/Makefile index f2b19e6174af..038ccbd9e3ba 100644 --- a/drivers/pci/controller/Makefile +++ b/drivers/pci/controller/Makefile @@ -33,7 +33,6 @@ obj-$(CONFIG_PCIE_ROCKCHIP_EP) += pcie-rockchip-ep.o obj-$(CONFIG_PCIE_ROCKCHIP_HOST) += pcie-rockchip-host.o obj-$(CONFIG_PCIE_MEDIATEK) += pcie-mediatek.o obj-$(CONFIG_PCIE_MEDIATEK_GEN3) += pcie-mediatek-gen3.o -obj-$(CONFIG_PCIE_MICROCHIP_HOST) += pcie-microchip-host.o obj-$(CONFIG_VMD) += vmd.o obj-$(CONFIG_PCIE_BRCMSTB) += pcie-brcmstb.o obj-$(CONFIG_PCI_LOONGSON) += pci-loongson.o @@ -44,6 +43,7 @@ obj-$(CONFIG_PCIE_MT7621) += pcie-mt7621.o # pcie-hisi.o quirks are needed even without CONFIG_PCIE_DW obj-y += dwc/ obj-y += mobiveil/ +obj-y += plda/ # The following drivers are for devices that use the generic ACPI diff --git a/drivers/pci/controller/plda/Kconfig b/drivers/pci/controller/plda/Kconfig new file mode 100644 index 000000000000..5cb3be4fc98c --- /dev/null +++ b/drivers/pci/controller/plda/Kconfig @@ -0,0 +1,14 @@ +# SPDX-License-Identifier: GPL-2.0 + +menu "PLDA-based PCIe controllers" + depends on PCI + +config PCIE_MICROCHIP_HOST + tristate "Microchip AXI PCIe controller" + depends on PCI_MSI && OF + select PCI_HOST_COMMON + help + Say Y here if you want kernel to support the Microchip AXI PCIe + Host Bridge driver. + +endmenu diff --git a/drivers/pci/controller/plda/Makefile b/drivers/pci/controller/plda/Makefile new file mode 100644 index 000000000000..e1a265cbf91c --- /dev/null +++ b/drivers/pci/controller/plda/Makefile @@ -0,0 +1,2 @@ +# SPDX-License-Identifier: GPL-2.0 +obj-$(CONFIG_PCIE_MICROCHIP_HOST) += pcie-microchip-host.o diff --git a/drivers/pci/controller/pcie-microchip-host.c b/drivers/pci/controller/plda/pcie-microchip-host.c similarity index 99% rename from drivers/pci/controller/pcie-microchip-host.c rename to drivers/pci/controller/plda/pcie-microchip-host.c index 137fb8570ba2..cb09a8137e25 100644 --- a/drivers/pci/controller/pcie-microchip-host.c +++ b/drivers/pci/controller/plda/pcie-microchip-host.c @@ -18,7 +18,7 @@ #include #include -#include "../pci.h" +#include "../../pci.h" /* Number of MSI IRQs */ #define MC_MAX_NUM_MSI_IRQS 32