]> Gentwo Git Trees - linux/.git/commitdiff
PCI: cadence: Add module support for platform controller driver
authorManikandan K Pillai <mpillai@cadence.com>
Sat, 8 Nov 2025 14:02:56 +0000 (22:02 +0800)
committerManivannan Sadhasivam <mani@kernel.org>
Fri, 14 Nov 2025 17:27:48 +0000 (22:57 +0530)
Add support for building PCI cadence platforms as a module.

Signed-off-by: Manikandan K Pillai <mpillai@cadence.com>
Signed-off-by: Manivannan Sadhasivam <mani@kernel.org>
Link: https://patch.msgid.link/20251108140305.1120117-2-hans.zhang@cixtech.com
drivers/pci/controller/cadence/Kconfig
drivers/pci/controller/cadence/pcie-cadence-plat.c
drivers/pci/controller/cadence/pcie-cadence.c

index 02a639e55fd8cfa0ec4c59c3bece30d83447d2ac..0b96499ae354e799697e2f0fc4d1a7688391495e 100644 (file)
@@ -19,10 +19,10 @@ config PCIE_CADENCE_EP
        select PCIE_CADENCE
 
 config PCIE_CADENCE_PLAT
-       bool
+       tristate
 
 config PCIE_CADENCE_PLAT_HOST
-       bool "Cadence platform PCIe controller (host mode)"
+       tristate "Cadence platform PCIe controller (host mode)"
        depends on OF
        select PCIE_CADENCE_HOST
        select PCIE_CADENCE_PLAT
@@ -32,7 +32,7 @@ config PCIE_CADENCE_PLAT_HOST
          vendors SoCs.
 
 config PCIE_CADENCE_PLAT_EP
-       bool "Cadence platform PCIe controller (endpoint mode)"
+       tristate "Cadence platform PCIe controller (endpoint mode)"
        depends on OF
        depends on PCI_ENDPOINT
        select PCIE_CADENCE_EP
index 0456845dabb96499b6aac9a1b91d3ee3e1d81256..ebd5c3afdfcdc497464595f386ae329851a2c1fb 100644 (file)
@@ -177,4 +177,7 @@ static struct platform_driver cdns_plat_pcie_driver = {
        .probe = cdns_plat_pcie_probe,
        .shutdown = cdns_plat_pcie_shutdown,
 };
-builtin_platform_driver(cdns_plat_pcie_driver);
+module_platform_driver(cdns_plat_pcie_driver);
+
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("Cadence PCIe controller platform driver");
index bd683d0fecb225f2134893faa7199d659157b3f1..8186947134d64dcf11e6f38ed411d947659172ea 100644 (file)
@@ -293,6 +293,7 @@ const struct dev_pm_ops cdns_pcie_pm_ops = {
        NOIRQ_SYSTEM_SLEEP_PM_OPS(cdns_pcie_suspend_noirq,
                                  cdns_pcie_resume_noirq)
 };
+EXPORT_SYMBOL_GPL(cdns_pcie_pm_ops);
 
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("Cadence PCIe controller driver");