mbox series

[v4,0/4] Loadable Module support for PCIe Cadence and J721E

Message ID 20250417124408.2752248-1-s-vadapalli@ti.com
Headers show
Series Loadable Module support for PCIe Cadence and J721E | expand

Message

Siddharth Vadapalli April 17, 2025, 12:44 p.m. UTC
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-20250417.

v3 of this series is at:
https://lore.kernel.org/r/20250410104426.463453-1-s-vadapalli@ti.com/
Changes since v3:
- In the fourth patch of this series, the polarity for PERST# assert in
  the driver's .remove callback has been fixed based on Mani's feedback at
  https://lore.kernel.org/r/6bi5gul3sqvycmkf6cwokkvownjffaf2tkonjlefo2d7cautwx@uhfexzgz3okp/

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 <manivannan.sadhasivam@linaro.org>
  for the third patch 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 <manivannan.sadhasivam@linaro.org>
  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(-)

Comments

Manivannan Sadhasivam April 21, 2025, 9 a.m. UTC | #1
On Thu, 17 Apr 2025 18:14:04 +0530, Siddharth Vadapalli wrote:
> 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.
> 
> [...]

Applied, thanks!

[1/4] PCI: cadence: Add support to build pcie-cadence library as a kernel module
      commit: b51c6fee0a06b71e9bf610f4b294426d0a1f1b51
[2/4] PCI: cadence-host: Introduce cdns_pcie_host_disable helper for cleanup
      commit: 23c498ea9abd7bed7d0f8c1c5f63459100b01028
[3/4] PCI: cadence-ep: Introduce cdns_pcie_ep_disable helper for cleanup
      commit: 5f8c840aa407588a7eae89af1301ba19c307aab7
[4/4] PCI: j721e: Add support to build as a loadable module
      commit: 7a68d4ab59fa66ebbd9b8abdbffcaf748e109ad7

Best regards,