From patchwork Thu Apr 10 10:44:22 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siddharth Vadapalli X-Patchwork-Id: 14046406 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 D8196C369A6 for ; Thu, 10 Apr 2025 11:23:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type: Content-Transfer-Encoding:MIME-Version: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:In-Reply-To:References:List-Owner; bh=yBwjCE/ol9udunO14kPmHxK0DtgJno2/PYAg0Wha9Xo=; b=d6nBSmNe0a2RsT1B1DNbTulGxI nfpO6ieErb08W9Pa18fsmMgbHIs9dCZX8FiMFriradwTASTZmTGgqxw2UOQvlYpObjaQIBWjVqG9B ulWZ8LRUyXDn5F5D0Dz2nTKSJ5NCo0kDz2ivhZaACaXRz0s+DQs+mTiDlzyxsn2UuErzZoshGcHQX pD9wvFk0hiwf4k5kaPP3LfuZaUwLygiaQUIFNy+PT+8FXBlsbLytqMjWHCzMlgzpW70q/aHVE8CmV e0K7sHgZqI4jtWFzl9abgNLu7r4IDPOZTe0hjG21wTEkuqTiwVHXsEodHSw7mXYzNKYdW+dXwFEnh 45xbYhOA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1u2q09-0000000AHs6-1l2E; Thu, 10 Apr 2025 11:23:21 +0000 Received: from lelvem-ot01.ext.ti.com ([198.47.23.234]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1u2pOu-0000000A83G-2TA8 for linux-arm-kernel@lists.infradead.org; Thu, 10 Apr 2025 10:44:54 +0000 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelvem-ot01.ext.ti.com (8.15.2/8.15.2) with ESMTPS id 53AAiXbE1262907 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 10 Apr 2025 05:44:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1744281873; bh=yBwjCE/ol9udunO14kPmHxK0DtgJno2/PYAg0Wha9Xo=; h=From:To:CC:Subject:Date; b=AtAy2HqWLz8qefBuGawfiptxV1cSHk5gL+zMPGPy7kElG1XcLhdftKlVfKncABt5G AuC7YMe8s21r7YN82e/ub1L7htCnLBjCjm1ESDasVzgdG/YOs8axofs8Rqzx17fp7n uZPefPGqob4EXfqKywMZKgM3RhfvBu6UQQwNsORA= Received: from DLEE113.ent.ti.com (dlee113.ent.ti.com [157.170.170.24]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 53AAiWLB109020 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 10 Apr 2025 05:44:32 -0500 Received: from DLEE102.ent.ti.com (157.170.170.32) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Thu, 10 Apr 2025 05:44:32 -0500 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) by DLEE102.ent.ti.com (157.170.170.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Thu, 10 Apr 2025 05:44:32 -0500 Received: from uda0492258.dhcp.ti.com (uda0492258.dhcp.ti.com [10.24.72.113]) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 53AAiRfb029210; Thu, 10 Apr 2025 05:44:27 -0500 From: Siddharth Vadapalli To: , , , , , , , <18255117159@163.com>, , , , CC: , , , , , Subject: [PATCH v3 0/4] Loadable Module support for PCIe Cadence and J721E Date: Thu, 10 Apr 2025 16:14:22 +0530 Message-ID: <20250410104426.463453-1-s-vadapalli@ti.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-C2ProcessedOrg: 333ef613-75bf-4e12-a4b1-8e3623f5dcea X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250410_034452_724913_0ADD0CBD X-CRM114-Status: GOOD ( 14.31 ) X-BeenThere: linux-arm-kernel@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-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hello, This series enables support to build the PCIe Cadence Controller drivers and the PCI J721E Application/Wrapper/Glue driver as Loadable Kernel Modules. The motivation for this series is that PCIe is not a necessity for booting the SoC, due to which it doesn't have to be a built-in module. Additionally, the defconfig doesn't enable the PCIe Cadence Controller drivers and the PCI J721E driver, due to which PCIe is not supported by default. Enabling the configs as of now (i.e. without this series) will result in built-in drivers i.e. a bloated Linux Image for everyone who doesn't have the PCIe Controller. Therefore, with this series, after enabling support for building the drivers as loadable modules, the driver configs can be enabled in the defconfig to build the drivers as loadable modules, thereby enabling PCIe. Series is based on linux-next tagged next-20250410. v2 of this series is at: https://lore.kernel.org/r/20250330083914.529222-1-s-vadapalli@ti.com/ Changes since v2: - Collected "Reviewed-by" tag from: Manivannan Sadhasivam for the third patches in this series. - Dropped a delay before PERST assertion in the driver's remove callback in the fourth patch of this series based on Mani's feedback at: https://lore.kernel.org/r/zsxnx7biwogov5dw5yiafkgk6tsrtspac75bjbrca5uevweaim@ly67hwfyk7qh/ v1 of this series is at: https://lore.kernel.org/r/20250307103128.3287497-1-s-vadapalli@ti.com/ Changes since v1: - Collected "Reviewed-by" tags from: Manivannan Sadhasivam for the first two patches in this series. - Based on feedback from Mani on the third patch of the v1 series at: https://lore.kernel.org/r/20250318080304.jsmrxqil6pn74nzh@thinkpad/ pci_epc_deinit_notify() has been included in cdns_pcie_ep_disable(). - Based on feedback from Thomas on the fourth patch of the v1 series at: https://lore.kernel.org/r/88b3ecbe-32b6-4310-afb9-da19a2d0506a@bootlin.com/ the "check" for a non-NULL "pcie-refclk" in j721e_pcie_remove() has been dropped. Regards, Siddharth. Kishon Vijay Abraham I (1): PCI: cadence: Add support to build pcie-cadence library as a kernel module Siddharth Vadapalli (3): PCI: cadence-host: Introduce cdns_pcie_host_disable helper for cleanup PCI: cadence-ep: Introduce cdns_pcie_ep_disable helper for cleanup PCI: j721e: Add support to build as a loadable module drivers/pci/controller/cadence/Kconfig | 12 +- drivers/pci/controller/cadence/pci-j721e.c | 31 ++++- .../pci/controller/cadence/pcie-cadence-ep.c | 17 +++ .../controller/cadence/pcie-cadence-host.c | 113 ++++++++++++++++++ drivers/pci/controller/cadence/pcie-cadence.c | 12 ++ drivers/pci/controller/cadence/pcie-cadence.h | 14 ++- 6 files changed, 190 insertions(+), 9 deletions(-)