Thread (21 messages) 21 messages, 10 authors, 2015-04-09

[PATCH v2 3/5] PCI: st: Provide support for the sti PCIe controller

From: Gabriel Fernandez <hidden>
Date: 2015-03-17 07:53:08
Also in: linux-devicetree, linux-pci, lkml

Thanks Paul for reviewing.

I'll check to be modular.

BR

Gabriel

On 16 March 2015 at 16:11, Paul Bolle [off-list ref] wrote:
On Mon, 2015-03-16 at 15:20 +0100, Gabriel FERNANDEZ wrote:
quoted
--- a/drivers/pci/host/Kconfig
+++ b/drivers/pci/host/Kconfig
quoted
+config PCI_ST
+     bool "ST PCIe controller"
You add a bool Kconfig symbol. A week or two ago I saw some patches fly
by that - I think - allowed PCIe controllers to be built modular.
quoted
+     depends on ARCH_STI || (ARM && COMPILE_TEST)
+     select PCIE_DW
+     help
+       Enable PCIe controller support on ST Socs. This controller is based
+       on Designware hardware and therefore the driver re-uses the
+       Designware core functions to implement the driver.
quoted
--- a/drivers/pci/host/Makefile
+++ b/drivers/pci/host/Makefile
quoted
+obj-$(CONFIG_PCI_ST) += pci-st.o
If you keep that symbol bool this objectfile will never be part of a
module.
quoted
diff --git a/drivers/pci/host/pci-st.c b/drivers/pci/host/pci-st.c
new file mode 100644
index 0000000..470000d
--- /dev/null
+++ b/drivers/pci/host/pci-st.c
quoted
+#include <linux/module.h>
For built-in code this include is, probably, not needed.
quoted
+MODULE_DEVICE_TABLE(of, st_pcie_of_match);
For built-in code that macro will always be preprocessed away.
quoted
+/* ST PCIe driver does not allow module unload */
+static int __init pcie_init(void)
+{
+     return platform_driver_probe(&st_pcie_driver, st_pcie_probe);
+}
+device_initcall(pcie_init);
I think the module unload comment is a bit odd for built-in only code.
quoted
+MODULE_AUTHOR("Fabrice Gasnier [off-list ref]");
+MODULE_DESCRIPTION("PCI express Driver for ST SoCs");
+MODULE_LICENSE("GPL v2");
These three macros will be, basically, always preprocessed away as long
as this code can't be built to be modular.


Paul Bolle
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help