diff options
| author | Bjorn Helgaas <bhelgaas@google.com> | 2026-04-13 12:50:23 -0500 |
|---|---|---|
| committer | Bjorn Helgaas <bhelgaas@google.com> | 2026-04-13 12:50:23 -0500 |
| commit | b94fd08746955623c5e7e95e3a0fcf858f125d60 (patch) | |
| tree | 857099c70f9c54eedf9349327f4ba9f24cbce347 | |
| parent | d33fae1754285fa7c2daac0a42a30e82030e68fb (diff) | |
| parent | e36262c5e6c25e19d7d082936f63b3a8e62739f9 (diff) | |
Merge branch 'pci/controller/dwc-layerscape'
- Allow Layerscape host controller driver to be build as a removable module
(Sascha Hauer)
* pci/controller/dwc-layerscape:
PCI: layerscape: Allow to compile as module
| -rw-r--r-- | drivers/pci/controller/dwc/Kconfig | 2 | ||||
| -rw-r--r-- | drivers/pci/controller/dwc/pci-layerscape.c | 16 |
2 files changed, 16 insertions, 2 deletions
diff --git a/drivers/pci/controller/dwc/Kconfig b/drivers/pci/controller/dwc/Kconfig index 0244e80eaf96..f2fde13107f2 100644 --- a/drivers/pci/controller/dwc/Kconfig +++ b/drivers/pci/controller/dwc/Kconfig @@ -133,7 +133,7 @@ config PCI_IMX6_EP DesignWare core functions to implement the driver. config PCI_LAYERSCAPE - bool "Freescale Layerscape PCIe controller (host mode)" + tristate "Freescale Layerscape PCIe controller (host mode)" depends on OF && (ARM || ARCH_LAYERSCAPE || COMPILE_TEST) depends on PCI_MSI select PCIE_DW_HOST diff --git a/drivers/pci/controller/dwc/pci-layerscape.c b/drivers/pci/controller/dwc/pci-layerscape.c index a44b5c256d6e..14d6ac4fc53f 100644 --- a/drivers/pci/controller/dwc/pci-layerscape.c +++ b/drivers/pci/controller/dwc/pci-layerscape.c @@ -13,6 +13,7 @@ #include <linux/interrupt.h> #include <linux/init.h> #include <linux/iopoll.h> +#include <linux/module.h> #include <linux/of_pci.h> #include <linux/of_platform.h> #include <linux/of_address.h> @@ -403,8 +404,16 @@ static const struct dev_pm_ops ls_pcie_pm_ops = { NOIRQ_SYSTEM_SLEEP_PM_OPS(ls_pcie_suspend_noirq, ls_pcie_resume_noirq) }; +static void ls_pcie_remove(struct platform_device *pdev) +{ + struct ls_pcie *pcie = platform_get_drvdata(pdev); + + dw_pcie_host_deinit(&pcie->pci->pp); +} + static struct platform_driver ls_pcie_driver = { .probe = ls_pcie_probe, + .remove = ls_pcie_remove, .driver = { .name = "layerscape-pcie", .of_match_table = ls_pcie_of_match, @@ -412,4 +421,9 @@ static struct platform_driver ls_pcie_driver = { .pm = &ls_pcie_pm_ops, }, }; -builtin_platform_driver(ls_pcie_driver); +module_platform_driver(ls_pcie_driver); + +MODULE_AUTHOR("Minghuan Lian <Minghuan.Lian@freescale.com>"); +MODULE_DESCRIPTION("Layerscape PCIe host controller driver"); +MODULE_LICENSE("GPL"); +MODULE_DEVICE_TABLE(of, ls_pcie_of_match); |
