Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

PCI: altera-msi: Allow building as module

Altera MSI IP is a soft IP and is only available after
an FPGA image (with design containing it) is programmed.

Make driver modulable to support use case FPGA image is programmed the
after kernel has booted, so that the driver can be loaded upon request.

Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>

authored by

Ley Foon Tan and committed by
Lorenzo Pieralisi
c7ddfd35 ec15c4d0

+11 -1
+1 -1
drivers/pci/controller/Kconfig
··· 181 181 FPGA. 182 182 183 183 config PCIE_ALTERA_MSI 184 - bool "Altera PCIe MSI feature" 184 + tristate "Altera PCIe MSI feature" 185 185 depends on PCIE_ALTERA 186 186 depends on PCI_MSI_IRQ_DOMAIN 187 187 help
+10
drivers/pci/controller/pcie-altera-msi.c
··· 10 10 #include <linux/interrupt.h> 11 11 #include <linux/irqchip/chained_irq.h> 12 12 #include <linux/init.h> 13 + #include <linux/module.h> 13 14 #include <linux/msi.h> 14 15 #include <linux/of_address.h> 15 16 #include <linux/of_irq.h> ··· 289 288 { 290 289 return platform_driver_register(&altera_msi_driver); 291 290 } 291 + 292 + static void __exit altera_msi_exit(void) 293 + { 294 + platform_driver_unregister(&altera_msi_driver); 295 + } 296 + 292 297 subsys_initcall(altera_msi_init); 298 + MODULE_DEVICE_TABLE(of, altera_msi_of_match); 299 + module_exit(altera_msi_exit); 300 + MODULE_LICENSE("GPL v2");