Skip to content

Commit 611627a

Browse files
mpillai-cadenceMani-Sadhasivam
authored andcommitted
PCI: cadence: Add module support for platform controller driver
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
1 parent 3a86608 commit 611627a

3 files changed

Lines changed: 8 additions & 4 deletions

File tree

drivers/pci/controller/cadence/Kconfig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ config PCIE_CADENCE_EP
1919
select PCIE_CADENCE
2020

2121
config PCIE_CADENCE_PLAT
22-
bool
22+
tristate
2323

2424
config PCIE_CADENCE_PLAT_HOST
25-
bool "Cadence platform PCIe controller (host mode)"
25+
tristate "Cadence platform PCIe controller (host mode)"
2626
depends on OF
2727
select PCIE_CADENCE_HOST
2828
select PCIE_CADENCE_PLAT
@@ -32,7 +32,7 @@ config PCIE_CADENCE_PLAT_HOST
3232
vendors SoCs.
3333

3434
config PCIE_CADENCE_PLAT_EP
35-
bool "Cadence platform PCIe controller (endpoint mode)"
35+
tristate "Cadence platform PCIe controller (endpoint mode)"
3636
depends on OF
3737
depends on PCI_ENDPOINT
3838
select PCIE_CADENCE_EP

drivers/pci/controller/cadence/pcie-cadence-plat.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,4 +177,7 @@ static struct platform_driver cdns_plat_pcie_driver = {
177177
.probe = cdns_plat_pcie_probe,
178178
.shutdown = cdns_plat_pcie_shutdown,
179179
};
180-
builtin_platform_driver(cdns_plat_pcie_driver);
180+
module_platform_driver(cdns_plat_pcie_driver);
181+
182+
MODULE_LICENSE("GPL");
183+
MODULE_DESCRIPTION("Cadence PCIe controller platform driver");

drivers/pci/controller/cadence/pcie-cadence.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,7 @@ const struct dev_pm_ops cdns_pcie_pm_ops = {
293293
NOIRQ_SYSTEM_SLEEP_PM_OPS(cdns_pcie_suspend_noirq,
294294
cdns_pcie_resume_noirq)
295295
};
296+
EXPORT_SYMBOL_GPL(cdns_pcie_pm_ops);
296297

297298
MODULE_LICENSE("GPL");
298299
MODULE_DESCRIPTION("Cadence PCIe controller driver");

0 commit comments

Comments
 (0)