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
#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>
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,
.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);