Message ID | 8dbdde3eda0e5d22020f6a8bf153d7cfb775c980.1626862458.git.mchehab+huawei@kernel.org (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Lorenzo Pieralisi |
Headers | show |
Series | Add support for Hikey 970 PCIe | expand |
On Wed, Jul 21, 2021 at 12:15 PM Mauro Carvalho Chehab <mchehab+huawei@kernel.org> wrote: > > There's nothing preventing this driver to be loaded as a > module. So, change its config from bool to tristate. > > Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> No objections from me, but I wonder if you would also consider making the module removable. It's currently marked as 'builtin_platform_driver', so you can load but not remove it. Rob has done some bug fixes that make it possible to remove similar drivers, so it's probably not much work here either. Arnd
Em Wed, 21 Jul 2021 13:55:07 +0200 Arnd Bergmann <arnd@arndb.de> escreveu: > On Wed, Jul 21, 2021 at 12:15 PM Mauro Carvalho Chehab > <mchehab+huawei@kernel.org> wrote: > > > > There's nothing preventing this driver to be loaded as a > > module. So, change its config from bool to tristate. > > > > Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> > > No objections from me, but I wonder if you would also consider making the > module removable. It's currently marked as 'builtin_platform_driver', > so you can load but not remove it. Rob has done some bug fixes that make > it possible to remove similar drivers, so it's probably not much work > here either. Yeah, I can probably work on a patch to unbind/remove this driver. Never actually tried to write a patch removing the PCIe BUS, so no idea if the refcounts for the in-board Ethernet NIC, M.2 and mini-PCIe slots will be properly handled. If refcount is handled properly, I guess a patch like that won't be hard, at least for Kirin 970 PHY. The Kirin 960 PHY will require a small change at the current version, as it currently misses the power_off logic. I also need to double-check if devm resources will be freed at the driver removal time, as, with some past tests with media devices, we had some issues with that. Thanks, Mauro
diff --git a/drivers/pci/controller/dwc/Kconfig b/drivers/pci/controller/dwc/Kconfig index 423d35872ce4..e0091bfae5b5 100644 --- a/drivers/pci/controller/dwc/Kconfig +++ b/drivers/pci/controller/dwc/Kconfig @@ -227,7 +227,7 @@ config PCIE_INTEL_GW config PCIE_KIRIN depends on OF && (ARM64 || COMPILE_TEST) - bool "HiSilicon Kirin series SoCs PCIe controllers" + tristate "HiSilicon Kirin series SoCs PCIe controllers" depends on PCI_MSI_IRQ_DOMAIN select PCIE_DW_HOST help
There's nothing preventing this driver to be loaded as a module. So, change its config from bool to tristate. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> --- drivers/pci/controller/dwc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)