提交 3b868d15 编写于 作者: L Luca Ceresoli 提交者: Lorenzo Pieralisi

PCI: dra7xx: Make it a kernel module

Enable building the driver as a loadable kernel module.

Link: https://lore.kernel.org/r/20210531085934.2662457-3-luca@lucaceresoli.netSigned-off-by: NLuca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: NLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: NKishon Vijay Abraham I <kishon@ti.com>
上级 3a7fb867
...@@ -17,10 +17,10 @@ config PCIE_DW_EP ...@@ -17,10 +17,10 @@ config PCIE_DW_EP
select PCIE_DW select PCIE_DW
config PCI_DRA7XX config PCI_DRA7XX
bool tristate
config PCI_DRA7XX_HOST config PCI_DRA7XX_HOST
bool "TI DRA7xx PCIe controller Host Mode" tristate "TI DRA7xx PCIe controller Host Mode"
depends on SOC_DRA7XX || COMPILE_TEST depends on SOC_DRA7XX || COMPILE_TEST
depends on PCI_MSI_IRQ_DOMAIN depends on PCI_MSI_IRQ_DOMAIN
depends on OF && HAS_IOMEM && TI_PIPE3 depends on OF && HAS_IOMEM && TI_PIPE3
...@@ -36,7 +36,7 @@ config PCI_DRA7XX_HOST ...@@ -36,7 +36,7 @@ config PCI_DRA7XX_HOST
This uses the DesignWare core. This uses the DesignWare core.
config PCI_DRA7XX_EP config PCI_DRA7XX_EP
bool "TI DRA7xx PCIe controller Endpoint Mode" tristate "TI DRA7xx PCIe controller Endpoint Mode"
depends on SOC_DRA7XX || COMPILE_TEST depends on SOC_DRA7XX || COMPILE_TEST
depends on PCI_ENDPOINT depends on PCI_ENDPOINT
depends on OF && HAS_IOMEM && TI_PIPE3 depends on OF && HAS_IOMEM && TI_PIPE3
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include <linux/irqdomain.h> #include <linux/irqdomain.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/module.h>
#include <linux/of_device.h> #include <linux/of_device.h>
#include <linux/of_gpio.h> #include <linux/of_gpio.h>
#include <linux/of_pci.h> #include <linux/of_pci.h>
...@@ -607,6 +608,7 @@ static const struct of_device_id of_dra7xx_pcie_match[] = { ...@@ -607,6 +608,7 @@ static const struct of_device_id of_dra7xx_pcie_match[] = {
}, },
{}, {},
}; };
MODULE_DEVICE_TABLE(of, of_dra7xx_pcie_match);
/* /*
* dra7xx_pcie_unaligned_memaccess: workaround for AM572x/AM571x Errata i870 * dra7xx_pcie_unaligned_memaccess: workaround for AM572x/AM571x Errata i870
...@@ -943,4 +945,8 @@ static struct platform_driver dra7xx_pcie_driver = { ...@@ -943,4 +945,8 @@ static struct platform_driver dra7xx_pcie_driver = {
}, },
.shutdown = dra7xx_pcie_shutdown, .shutdown = dra7xx_pcie_shutdown,
}; };
builtin_platform_driver(dra7xx_pcie_driver); module_platform_driver(dra7xx_pcie_driver);
MODULE_AUTHOR("Kishon Vijay Abraham I <kishon@ti.com>");
MODULE_DESCRIPTION("PCIe controller driver for TI DRA7xx SoCs");
MODULE_LICENSE("GPL v2");
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册