[PATCH v4 2/4] PCI: cadence-host: Introduce cdns_pcie_host_disable helper for cleanup

Siddharth Vadapalli s-vadapalli at ti.com
Tue Apr 22 22:03:53 PDT 2025


On Tue, Apr 22, 2025 at 11:49:34AM -0500, Bjorn Helgaas wrote:

Hello Bjorn,

> On Thu, Apr 17, 2025 at 06:14:06PM +0530, Siddharth Vadapalli wrote:
> > Introduce the helper function cdns_pcie_host_disable() which will undo
> > the configuration performed by cdns_pcie_host_setup(). Also, export it
> > for use by existing callers of cdns_pcie_host_setup(), thereby allowing
> > them to cleanup on their exit path.
> 
> For the merge commit log and eventual pull request, can you give me a
> hint about the motivation for this?  Based on the other patches in
> this series, my guess is that this is required for making the j721e
> driver buildable as a module and removable?

I have described the motivation in the cover-letter of this series in
detail. I am sharing the same below for your reference:

"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."

In brief, in order to enable the driver configs, the driver needs to be
a loadable module. Else, the patch for the configs will be rejected:
https://lore.kernel.org/linux-arm-kernel/20250122145822.4ewsmkk6ztbeejzf@slashing/

Regards,
Siddharth.



More information about the linux-arm-kernel mailing list