* [PATCH 1/2] PCI: dwc: armada-8k driver needs OF support @ 2020-10-01 7:42 Thomas Petazzoni 2020-10-01 7:42 ` [PATCH 2/2] PCI: dwc: spear13xx driver needs OF Thomas Petazzoni 2020-10-01 11:17 ` [PATCH 1/2] PCI: dwc: armada-8k driver needs OF support Lorenzo Pieralisi 0 siblings, 2 replies; 6+ messages in thread From: Thomas Petazzoni @ 2020-10-01 7:42 UTC (permalink / raw) To: Lorenzo Pieralisi, Rob Herring, Bjorn Helgaas Cc: linux-pci, linux-kernel, Pratyush Anand, Thomas Petazzoni, Bjorn Helgaas Fixes the following build warning when CONFIG_OF is disabled: drivers/pci/controller/dwc/pcie-armada8k.c:344:34: warning: ‘armada8k_pcie_of_match’ defined but not used [-Wunused-const-variable=] 344 | static const struct of_device_id armada8k_pcie_of_match[] = { | ^~~~~~~~~~~~~~~~~~~~~~ Reported-by: Bjorn Helgaas <helgaas@kernel.org> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> --- drivers/pci/controller/dwc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/controller/dwc/Kconfig b/drivers/pci/controller/dwc/Kconfig index 044a3761c44f..96994b715f26 100644 --- a/drivers/pci/controller/dwc/Kconfig +++ b/drivers/pci/controller/dwc/Kconfig @@ -176,7 +176,7 @@ config PCIE_QCOM config PCIE_ARMADA_8K bool "Marvell Armada-8K PCIe controller" - depends on ARCH_MVEBU || COMPILE_TEST + depends on OF && (ARCH_MVEBU || COMPILE_TEST) depends on PCI_MSI_IRQ_DOMAIN select PCIE_DW_HOST help -- 2.26.2 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] PCI: dwc: spear13xx driver needs OF 2020-10-01 7:42 [PATCH 1/2] PCI: dwc: armada-8k driver needs OF support Thomas Petazzoni @ 2020-10-01 7:42 ` Thomas Petazzoni 2020-10-01 11:17 ` [PATCH 1/2] PCI: dwc: armada-8k driver needs OF support Lorenzo Pieralisi 1 sibling, 0 replies; 6+ messages in thread From: Thomas Petazzoni @ 2020-10-01 7:42 UTC (permalink / raw) To: Lorenzo Pieralisi, Rob Herring, Bjorn Helgaas Cc: linux-pci, linux-kernel, Pratyush Anand, Thomas Petazzoni, Bjorn Helgaas Fixes the following build warning when CONFIG_OF is disabled: drivers/pci/controller/dwc/pcie-spear13xx.c:297:34: warning: ‘spear13xx_pcie_of_match’ defined but not used [-Wunused-const-variable=] 297 | static const struct of_device_id spear13xx_pcie_of_match[] = { | ^~~~~~~~~~~~~~~~~~~~~~~ Reported-by: Bjorn Helgaas <helgaas@kernel.org> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> --- drivers/pci/controller/dwc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/controller/dwc/Kconfig b/drivers/pci/controller/dwc/Kconfig index 96994b715f26..62f6671d7e12 100644 --- a/drivers/pci/controller/dwc/Kconfig +++ b/drivers/pci/controller/dwc/Kconfig @@ -96,7 +96,7 @@ config PCI_IMX6 config PCIE_SPEAR13XX bool "STMicroelectronics SPEAr PCIe controller" - depends on ARCH_SPEAR13XX || COMPILE_TEST + depends on OF && (ARCH_SPEAR13XX || COMPILE_TEST) depends on PCI_MSI_IRQ_DOMAIN select PCIE_DW_HOST help -- 2.26.2 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] PCI: dwc: armada-8k driver needs OF support 2020-10-01 7:42 [PATCH 1/2] PCI: dwc: armada-8k driver needs OF support Thomas Petazzoni 2020-10-01 7:42 ` [PATCH 2/2] PCI: dwc: spear13xx driver needs OF Thomas Petazzoni @ 2020-10-01 11:17 ` Lorenzo Pieralisi 2020-10-05 21:58 ` Bjorn Helgaas 1 sibling, 1 reply; 6+ messages in thread From: Lorenzo Pieralisi @ 2020-10-01 11:17 UTC (permalink / raw) To: Thomas Petazzoni Cc: Rob Herring, Bjorn Helgaas, linux-pci, linux-kernel, Pratyush Anand, Bjorn Helgaas On Thu, Oct 01, 2020 at 09:42:43AM +0200, Thomas Petazzoni wrote: > Fixes the following build warning when CONFIG_OF is disabled: > > drivers/pci/controller/dwc/pcie-armada8k.c:344:34: warning: ‘armada8k_pcie_of_match’ defined but not used [-Wunused-const-variable=] > 344 | static const struct of_device_id armada8k_pcie_of_match[] = { > | ^~~~~~~~~~~~~~~~~~~~~~ > > Reported-by: Bjorn Helgaas <helgaas@kernel.org> > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> > --- > drivers/pci/controller/dwc/Kconfig | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Merged both patches into pci/dwc, thanks. Lorenzo > diff --git a/drivers/pci/controller/dwc/Kconfig b/drivers/pci/controller/dwc/Kconfig > index 044a3761c44f..96994b715f26 100644 > --- a/drivers/pci/controller/dwc/Kconfig > +++ b/drivers/pci/controller/dwc/Kconfig > @@ -176,7 +176,7 @@ config PCIE_QCOM > > config PCIE_ARMADA_8K > bool "Marvell Armada-8K PCIe controller" > - depends on ARCH_MVEBU || COMPILE_TEST > + depends on OF && (ARCH_MVEBU || COMPILE_TEST) > depends on PCI_MSI_IRQ_DOMAIN > select PCIE_DW_HOST > help > -- > 2.26.2 > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] PCI: dwc: armada-8k driver needs OF support 2020-10-01 11:17 ` [PATCH 1/2] PCI: dwc: armada-8k driver needs OF support Lorenzo Pieralisi @ 2020-10-05 21:58 ` Bjorn Helgaas 2021-12-02 11:06 ` [PATCH] PCI: Improve compile-test coverage Fan Fei 0 siblings, 1 reply; 6+ messages in thread From: Bjorn Helgaas @ 2020-10-05 21:58 UTC (permalink / raw) To: Lorenzo Pieralisi Cc: Thomas Petazzoni, Rob Herring, Bjorn Helgaas, linux-pci, linux-kernel, Pratyush Anand On Thu, Oct 01, 2020 at 12:17:30PM +0100, Lorenzo Pieralisi wrote: > On Thu, Oct 01, 2020 at 09:42:43AM +0200, Thomas Petazzoni wrote: > > Fixes the following build warning when CONFIG_OF is disabled: > > > > drivers/pci/controller/dwc/pcie-armada8k.c:344:34: warning: ‘armada8k_pcie_of_match’ defined but not used [-Wunused-const-variable=] > > 344 | static const struct of_device_id armada8k_pcie_of_match[] = { > > | ^~~~~~~~~~~~~~~~~~~~~~ > > > > Reported-by: Bjorn Helgaas <helgaas@kernel.org> > > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> > > --- > > drivers/pci/controller/dwc/Kconfig | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > Merged both patches into pci/dwc, thanks. Can we do something like the following instead? Untested other than building for x86 64-bit. It's a little bit of a mix of of_match_ptr() changes, a gpio/consumer.h change, and a bunch of Kconfig changes. I didn't bother to sort or split them apart. Also handy for historians to include the $ make W=1 drivers/pci/controller/dwc/pcie-armada8k.o that generated the warning. diff --git a/drivers/pci/controller/Kconfig b/drivers/pci/controller/Kconfig index f18c3725ef80..c74581b0e4ec 100644 --- a/drivers/pci/controller/Kconfig +++ b/drivers/pci/controller/Kconfig @@ -8,13 +8,11 @@ config PCI_MVEBU depends on ARCH_MVEBU || ARCH_DOVE || COMPILE_TEST depends on MVEBU_MBUS depends on ARM - depends on OF select PCI_BRIDGE_EMUL config PCI_AARDVARK bool "Aardvark PCIe controller" depends on (ARCH_MVEBU && ARM64) || COMPILE_TEST - depends on OF depends on PCI_MSI_IRQ_DOMAIN select PCI_BRIDGE_EMUL help @@ -34,7 +32,6 @@ config PCIE_XILINX_NWL config PCI_FTPCI100 bool "Faraday Technology FTPCI100 PCI controller" - depends on OF default ARCH_GEMINI config PCI_TEGRA @@ -85,7 +82,6 @@ config PCI_HOST_COMMON config PCI_HOST_GENERIC tristate "Generic PCI host controller" - depends on OF select PCI_HOST_COMMON select IRQ_DOMAIN help @@ -94,7 +90,6 @@ config PCI_HOST_GENERIC config PCIE_XILINX bool "Xilinx AXI PCIe host bridge support" - depends on OF || COMPILE_TEST help Say 'Y' here if you want kernel to support the Xilinx AXI PCIe Host Bridge driver. @@ -110,7 +105,7 @@ config PCIE_XILINX_CPM config PCI_XGENE bool "X-Gene PCIe controller" depends on ARM64 || COMPILE_TEST - depends on OF || (ACPI && PCI_QUIRKS) + depends on ACPI && PCI_QUIRKS help Say Y here if you want internal PCI support on APM X-Gene SoC. There are 5 internal PCIe ports available. Each port is GEN3 capable @@ -127,7 +122,6 @@ config PCI_XGENE_MSI config PCI_V3_SEMI bool "V3 Semiconductor PCI controller" - depends on OF depends on ARM || COMPILE_TEST default ARCH_INTEGRATOR_AP @@ -145,7 +139,6 @@ config PCIE_IPROC config PCIE_IPROC_PLATFORM tristate "Broadcom iProc PCIe platform bus driver" depends on ARCH_BCM_IPROC || (ARM && COMPILE_TEST) - depends on OF select PCIE_IPROC default ARCH_BCM_IPROC help @@ -189,7 +182,7 @@ config PCIE_ALTERA_MSI config PCI_HOST_THUNDER_PEM bool "Cavium Thunder PCIe controller to off-chip devices" depends on ARM64 || COMPILE_TEST - depends on OF || (ACPI && PCI_QUIRKS) + depends on ACPI && PCI_QUIRKS select PCI_HOST_COMMON help Say Y here if you want PCIe support for CN88XX Cavium Thunder SoCs. @@ -197,7 +190,7 @@ config PCI_HOST_THUNDER_PEM config PCI_HOST_THUNDER_ECAM bool "Cavium Thunder ECAM controller to on-chip devices on pass-1.x silicon" depends on ARM64 || COMPILE_TEST - depends on OF || (ACPI && PCI_QUIRKS) + depends on ACPI && PCI_QUIRKS select PCI_HOST_COMMON help Say Y here if you want ECAM support for CN88XX-Pass-1.x Cavium Thunder SoCs. @@ -209,7 +202,6 @@ config PCIE_ROCKCHIP config PCIE_ROCKCHIP_HOST tristate "Rockchip PCIe host controller" depends on ARCH_ROCKCHIP || COMPILE_TEST - depends on OF depends on PCI_MSI_IRQ_DOMAIN select MFD_SYSCON select PCIE_ROCKCHIP @@ -221,7 +213,6 @@ config PCIE_ROCKCHIP_HOST config PCIE_ROCKCHIP_EP bool "Rockchip PCIe endpoint controller" depends on ARCH_ROCKCHIP || COMPILE_TEST - depends on OF depends on PCI_ENDPOINT select MFD_SYSCON select PCIE_ROCKCHIP @@ -233,7 +224,6 @@ config PCIE_ROCKCHIP_EP config PCIE_MEDIATEK tristate "MediaTek PCIe controller" depends on ARCH_MEDIATEK || COMPILE_TEST - depends on OF depends on PCI_MSI_IRQ_DOMAIN help Say Y here if you want to enable PCIe controller support on @@ -241,7 +231,7 @@ config PCIE_MEDIATEK config PCIE_TANGO_SMP8759 bool "Tango SMP8759 PCIe controller (DANGEROUS)" - depends on ARCH_TANGO && PCI_MSI && OF + depends on ARCH_TANGO && PCI_MSI depends on BROKEN select PCI_HOST_COMMON help @@ -271,7 +261,6 @@ config VMD config PCIE_BRCMSTB tristate "Broadcom Brcmstb PCIe host controller" depends on ARCH_BCM2835 || COMPILE_TEST - depends on OF depends on PCI_MSI_IRQ_DOMAIN help Say Y here to enable PCIe host controller support for @@ -287,7 +276,6 @@ config PCI_HYPERV_INTERFACE config PCI_LOONGSON bool "LOONGSON PCI Controller" depends on MACH_LOONGSON64 || COMPILE_TEST - depends on OF depends on PCI_QUIRKS default MACH_LOONGSON64 help diff --git a/drivers/pci/controller/cadence/Kconfig b/drivers/pci/controller/cadence/Kconfig index 5d30564190e1..cb3b19f801a2 100644 --- a/drivers/pci/controller/cadence/Kconfig +++ b/drivers/pci/controller/cadence/Kconfig @@ -8,13 +8,11 @@ config PCIE_CADENCE config PCIE_CADENCE_HOST bool - depends on OF select IRQ_DOMAIN select PCIE_CADENCE config PCIE_CADENCE_EP bool - depends on OF depends on PCI_ENDPOINT select PCIE_CADENCE @@ -23,7 +21,6 @@ config PCIE_CADENCE_PLAT config PCIE_CADENCE_PLAT_HOST bool "Cadence PCIe platform host controller" - depends on OF select PCIE_CADENCE_HOST select PCIE_CADENCE_PLAT help @@ -33,7 +30,6 @@ config PCIE_CADENCE_PLAT_HOST config PCIE_CADENCE_PLAT_EP bool "Cadence PCIe platform endpoint controller" - depends on OF depends on PCI_ENDPOINT select PCIE_CADENCE_EP select PCIE_CADENCE_PLAT @@ -47,7 +43,6 @@ config PCI_J721E config PCI_J721E_HOST bool "TI J721E PCIe platform host controller" - depends on OF select PCIE_CADENCE_HOST select PCI_J721E help @@ -57,7 +52,6 @@ config PCI_J721E_HOST config PCI_J721E_EP bool "TI J721E PCIe platform endpoint controller" - depends on OF depends on PCI_ENDPOINT select PCIE_CADENCE_EP select PCI_J721E diff --git a/drivers/pci/controller/dwc/Kconfig b/drivers/pci/controller/dwc/Kconfig index 044a3761c44f..ab55cd76680e 100644 --- a/drivers/pci/controller/dwc/Kconfig +++ b/drivers/pci/controller/dwc/Kconfig @@ -23,7 +23,7 @@ config PCI_DRA7XX_HOST bool "TI DRA7xx PCIe controller Host Mode" depends on SOC_DRA7XX || COMPILE_TEST depends on PCI_MSI_IRQ_DOMAIN - depends on OF && HAS_IOMEM && TI_PIPE3 + depends on HAS_IOMEM && TI_PIPE3 select PCIE_DW_HOST select PCI_DRA7XX default y if SOC_DRA7XX @@ -39,7 +39,7 @@ config PCI_DRA7XX_EP bool "TI DRA7xx PCIe controller Endpoint Mode" depends on SOC_DRA7XX || COMPILE_TEST depends on PCI_ENDPOINT - depends on OF && HAS_IOMEM && TI_PIPE3 + depends on HAS_IOMEM && TI_PIPE3 select PCIE_DW_EP select PCI_DRA7XX help @@ -131,7 +131,7 @@ config PCI_KEYSTONE_EP config PCI_LAYERSCAPE bool "Freescale Layerscape PCIe controller - Host mode" - depends on OF && (ARM || ARCH_LAYERSCAPE || COMPILE_TEST) + depends on ARM || ARCH_LAYERSCAPE || COMPILE_TEST depends on PCI_MSI_IRQ_DOMAIN select MFD_SYSCON select PCIE_DW_HOST @@ -144,7 +144,7 @@ config PCI_LAYERSCAPE config PCI_LAYERSCAPE_EP bool "Freescale Layerscape PCIe controller - Endpoint mode" - depends on OF && (ARM || ARCH_LAYERSCAPE || COMPILE_TEST) + depends on ARM || ARCH_LAYERSCAPE || COMPILE_TEST depends on PCI_ENDPOINT select PCIE_DW_EP help @@ -155,7 +155,7 @@ config PCI_LAYERSCAPE_EP controller works in RC mode. config PCI_HISI - depends on OF && (ARM64 || COMPILE_TEST) + depends on ARM64 || COMPILE_TEST bool "HiSilicon Hip05 and Hip06 SoCs PCIe controllers" depends on PCI_MSI_IRQ_DOMAIN select PCIE_DW_HOST @@ -166,7 +166,7 @@ config PCI_HISI config PCIE_QCOM bool "Qualcomm PCIe controller" - depends on OF && (ARCH_QCOM || COMPILE_TEST) + depends on ARCH_QCOM || COMPILE_TEST depends on PCI_MSI_IRQ_DOMAIN select PCIE_DW_HOST help @@ -210,7 +210,7 @@ config PCIE_ARTPEC6_EP config PCIE_INTEL_GW bool "Intel Gateway PCIe host controller support" - depends on OF && (X86 || COMPILE_TEST) + depends on X86 || COMPILE_TEST depends on PCI_MSI_IRQ_DOMAIN select PCIE_DW_HOST help @@ -220,7 +220,7 @@ config PCIE_INTEL_GW hardware wrappers. config PCIE_KIRIN - depends on OF && (ARM64 || COMPILE_TEST) + depends on ARM64 || COMPILE_TEST bool "HiSilicon Kirin series SoCs PCIe controllers" depends on PCI_MSI_IRQ_DOMAIN select PCIE_DW_HOST @@ -282,7 +282,7 @@ config PCIE_TEGRA194_EP config PCIE_UNIPHIER bool "Socionext UniPhier PCIe host controllers" depends on ARCH_UNIPHIER || COMPILE_TEST - depends on OF && HAS_IOMEM + depends on HAS_IOMEM depends on PCI_MSI_IRQ_DOMAIN select PCIE_DW_HOST help @@ -292,7 +292,7 @@ config PCIE_UNIPHIER config PCIE_UNIPHIER_EP bool "Socionext UniPhier PCIe endpoint controllers" depends on ARCH_UNIPHIER || COMPILE_TEST - depends on OF && HAS_IOMEM + depends on HAS_IOMEM depends on PCI_ENDPOINT select PCIE_DW_EP help @@ -301,7 +301,7 @@ config PCIE_UNIPHIER_EP config PCIE_AL bool "Amazon Annapurna Labs PCIe controller" - depends on OF && (ARM64 || COMPILE_TEST) + depends on ARM64 || COMPILE_TEST depends on PCI_MSI_IRQ_DOMAIN select PCIE_DW_HOST help diff --git a/drivers/pci/controller/dwc/pcie-armada8k.c b/drivers/pci/controller/dwc/pcie-armada8k.c index 13901f359a41..f02dcbab0041 100644 --- a/drivers/pci/controller/dwc/pcie-armada8k.c +++ b/drivers/pci/controller/dwc/pcie-armada8k.c @@ -350,7 +350,7 @@ static struct platform_driver armada8k_pcie_driver = { .probe = armada8k_pcie_probe, .driver = { .name = "armada8k-pcie", - .of_match_table = of_match_ptr(armada8k_pcie_of_match), + .of_match_table = armada8k_pcie_of_match, .suppress_bind_attrs = true, }, }; diff --git a/drivers/pci/controller/dwc/pcie-spear13xx.c b/drivers/pci/controller/dwc/pcie-spear13xx.c index 62846562da0b..b2ef8ffde79e 100644 --- a/drivers/pci/controller/dwc/pcie-spear13xx.c +++ b/drivers/pci/controller/dwc/pcie-spear13xx.c @@ -303,7 +303,7 @@ static struct platform_driver spear13xx_pcie_driver = { .probe = spear13xx_pcie_probe, .driver = { .name = "spear-pcie", - .of_match_table = of_match_ptr(spear13xx_pcie_of_match), + .of_match_table = spear13xx_pcie_of_match, .suppress_bind_attrs = true, }, }; diff --git a/drivers/pci/controller/mobiveil/Kconfig b/drivers/pci/controller/mobiveil/Kconfig index a62d247018cf..c6529955bc56 100644 --- a/drivers/pci/controller/mobiveil/Kconfig +++ b/drivers/pci/controller/mobiveil/Kconfig @@ -14,7 +14,6 @@ config PCIE_MOBIVEIL_HOST config PCIE_MOBIVEIL_PLAT bool "Mobiveil AXI PCIe controller" depends on ARCH_ZYNQMP || COMPILE_TEST - depends on OF depends on PCI_MSI_IRQ_DOMAIN select PCIE_MOBIVEIL_HOST help @@ -25,7 +24,7 @@ config PCIE_MOBIVEIL_PLAT config PCIE_LAYERSCAPE_GEN4 bool "Freescale Layerscape PCIe Gen4 controller" depends on PCI - depends on OF && (ARM64 || ARCH_LAYERSCAPE) + depends on ARM64 || ARCH_LAYERSCAPE depends on PCI_MSI_IRQ_DOMAIN select PCIE_MOBIVEIL_HOST help diff --git a/drivers/pci/controller/pci-aardvark.c b/drivers/pci/controller/pci-aardvark.c index 1559f79e63b6..1c5f2fd47c51 100644 --- a/drivers/pci/controller/pci-aardvark.c +++ b/drivers/pci/controller/pci-aardvark.c @@ -9,7 +9,7 @@ */ #include <linux/delay.h> -#include <linux/gpio.h> +#include <linux/gpio/consumer.h> #include <linux/interrupt.h> #include <linux/irq.h> #include <linux/irqdomain.h> diff --git a/drivers/pci/controller/pci-ftpci100.c b/drivers/pci/controller/pci-ftpci100.c index da3cd216da00..9a50698abffd 100644 --- a/drivers/pci/controller/pci-ftpci100.c +++ b/drivers/pci/controller/pci-ftpci100.c @@ -566,7 +566,7 @@ static const struct of_device_id faraday_pci_of_match[] = { static struct platform_driver faraday_pci_driver = { .driver = { .name = "ftpci100", - .of_match_table = of_match_ptr(faraday_pci_of_match), + .of_match_table = faraday_pci_of_match, .suppress_bind_attrs = true, }, .probe = faraday_pci_probe, diff --git a/drivers/pci/controller/pci-v3-semi.c b/drivers/pci/controller/pci-v3-semi.c index 1f54334f09f7..c91dec10440f 100644 --- a/drivers/pci/controller/pci-v3-semi.c +++ b/drivers/pci/controller/pci-v3-semi.c @@ -903,7 +903,7 @@ static const struct of_device_id v3_pci_of_match[] = { static struct platform_driver v3_pci_driver = { .driver = { .name = "pci-v3-semi", - .of_match_table = of_match_ptr(v3_pci_of_match), + .of_match_table = v3_pci_of_match, .suppress_bind_attrs = true, }, .probe = v3_pci_probe, ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] PCI: Improve compile-test coverage 2020-10-05 21:58 ` Bjorn Helgaas @ 2021-12-02 11:06 ` Fan Fei 2021-12-02 17:31 ` Rob Herring 0 siblings, 1 reply; 6+ messages in thread From: Fan Fei @ 2021-12-02 11:06 UTC (permalink / raw) To: helgaas, bjorn Cc: bhelgaas, linux-kernel, linux-pci, lorenzo.pieralisi, pratyush.anand, robh, thomas.petazzoni, Fan Fei Remove the "depends on OF" in Kconfig of PCI controllers. These drivers depends on CONFIG_OF because they use interface in of.h file, e.g. "of_match_ptr()". But these interface are defined as stub if CONFIG_OF is not set. Thus we can compile them without CONFIG_OF, instead just with COMPILE_TEST. Signed-off-by: Fan Fei <ffclaire1224@gmail.com> --- Hi, Bjorn, I just did as what you suggested, remove the "depends on OF" in Konfig, and compile it. It seems to work well. On the thread https://lore.kernel.org/all/20201005215817.GA3063223@bjorn-Precision-5520/ mentioned by the task excel, there are some replacement of "of_match_ptr()", but this function seems to be defined even CONFIG_OF is not set. Is it correct to reply in this thread or shall I send it to mail list directly? Kind regards Fan drivers/pci/controller/Kconfig | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/drivers/pci/controller/Kconfig b/drivers/pci/controller/Kconfig index 93b141110537..6e988420f900 100644 --- a/drivers/pci/controller/Kconfig +++ b/drivers/pci/controller/Kconfig @@ -8,13 +8,11 @@ config PCI_MVEBU depends on ARCH_MVEBU || ARCH_DOVE || COMPILE_TEST depends on MVEBU_MBUS depends on ARM - depends on OF select PCI_BRIDGE_EMUL config PCI_AARDVARK tristate "Aardvark PCIe controller" depends on (ARCH_MVEBU && ARM64) || COMPILE_TEST - depends on OF depends on PCI_MSI_IRQ_DOMAIN select PCI_BRIDGE_EMUL help @@ -34,12 +32,11 @@ config PCIE_XILINX_NWL config PCI_FTPCI100 bool "Faraday Technology FTPCI100 PCI controller" - depends on OF default ARCH_GEMINI config PCI_IXP4XX bool "Intel IXP4xx PCI controller" - depends on ARM && OF + depends on ARM depends on ARCH_IXP4XX || COMPILE_TEST default ARCH_IXP4XX help @@ -85,7 +82,6 @@ config PCI_HOST_COMMON config PCI_HOST_GENERIC tristate "Generic PCI host controller" - depends on OF select PCI_HOST_COMMON select IRQ_DOMAIN help @@ -94,7 +90,7 @@ config PCI_HOST_GENERIC config PCIE_XILINX bool "Xilinx AXI PCIe host bridge support" - depends on OF || COMPILE_TEST + depends on COMPILE_TEST depends on PCI_MSI_IRQ_DOMAIN help Say 'Y' here if you want kernel to support the Xilinx AXI PCIe @@ -111,7 +107,7 @@ config PCIE_XILINX_CPM config PCI_XGENE bool "X-Gene PCIe controller" depends on ARM64 || COMPILE_TEST - depends on OF || (ACPI && PCI_QUIRKS) + depends on ACPI && PCI_QUIRKS help Say Y here if you want internal PCI support on APM X-Gene SoC. There are 5 internal PCIe ports available. Each port is GEN3 capable @@ -128,7 +124,6 @@ config PCI_XGENE_MSI config PCI_V3_SEMI bool "V3 Semiconductor PCI controller" - depends on OF depends on ARM || COMPILE_TEST default ARCH_INTEGRATOR_AP @@ -146,7 +141,6 @@ config PCIE_IPROC config PCIE_IPROC_PLATFORM tristate "Broadcom iProc PCIe platform bus driver" depends on ARCH_BCM_IPROC || (ARM && COMPILE_TEST) - depends on OF select PCIE_IPROC default ARCH_BCM_IPROC help @@ -190,7 +184,7 @@ config PCIE_ALTERA_MSI config PCI_HOST_THUNDER_PEM bool "Cavium Thunder PCIe controller to off-chip devices" depends on ARM64 || COMPILE_TEST - depends on OF || (ACPI && PCI_QUIRKS) + depends on ACPI && PCI_QUIRKS select PCI_HOST_COMMON help Say Y here if you want PCIe support for CN88XX Cavium Thunder SoCs. @@ -198,7 +192,7 @@ config PCI_HOST_THUNDER_PEM config PCI_HOST_THUNDER_ECAM bool "Cavium Thunder ECAM controller to on-chip devices on pass-1.x silicon" depends on ARM64 || COMPILE_TEST - depends on OF || (ACPI && PCI_QUIRKS) + depends on ACPI && PCI_QUIRKS select PCI_HOST_COMMON help Say Y here if you want ECAM support for CN88XX-Pass-1.x Cavium Thunder SoCs. @@ -210,7 +204,6 @@ config PCIE_ROCKCHIP config PCIE_ROCKCHIP_HOST tristate "Rockchip PCIe host controller" depends on ARCH_ROCKCHIP || COMPILE_TEST - depends on OF depends on PCI_MSI_IRQ_DOMAIN select MFD_SYSCON select PCIE_ROCKCHIP @@ -222,7 +215,6 @@ config PCIE_ROCKCHIP_HOST config PCIE_ROCKCHIP_EP bool "Rockchip PCIe endpoint controller" depends on ARCH_ROCKCHIP || COMPILE_TEST - depends on OF depends on PCI_ENDPOINT select MFD_SYSCON select PCIE_ROCKCHIP @@ -234,7 +226,6 @@ config PCIE_ROCKCHIP_EP config PCIE_MEDIATEK tristate "MediaTek PCIe controller" depends on ARCH_MEDIATEK || COMPILE_TEST - depends on OF depends on PCI_MSI_IRQ_DOMAIN help Say Y here if you want to enable PCIe controller support on @@ -272,7 +263,6 @@ config PCIE_BRCMSTB tristate "Broadcom Brcmstb PCIe host controller" depends on ARCH_BRCMSTB || ARCH_BCM2835 || ARCH_BCM4908 || \ BMIPS_GENERIC || COMPILE_TEST - depends on OF depends on PCI_MSI_IRQ_DOMAIN default ARCH_BRCMSTB help @@ -289,7 +279,6 @@ config PCI_HYPERV_INTERFACE config PCI_LOONGSON bool "LOONGSON PCI Controller" depends on MACH_LOONGSON64 || COMPILE_TEST - depends on OF depends on PCI_QUIRKS default MACH_LOONGSON64 help @@ -298,7 +287,7 @@ config PCI_LOONGSON config PCIE_MICROCHIP_HOST bool "Microchip AXI PCIe host bridge support" - depends on PCI_MSI && OF + depends on PCI_MSI select PCI_MSI_IRQ_DOMAIN select GENERIC_MSI_IRQ_DOMAIN select PCI_HOST_COMMON @@ -321,7 +310,6 @@ config PCIE_APPLE_MSI_DOORBELL_ADDR config PCIE_APPLE tristate "Apple PCIe controller" depends on ARCH_APPLE || COMPILE_TEST - depends on OF depends on PCI_MSI_IRQ_DOMAIN select PCI_HOST_COMMON help -- 2.25.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] PCI: Improve compile-test coverage 2021-12-02 11:06 ` [PATCH] PCI: Improve compile-test coverage Fan Fei @ 2021-12-02 17:31 ` Rob Herring 0 siblings, 0 replies; 6+ messages in thread From: Rob Herring @ 2021-12-02 17:31 UTC (permalink / raw) To: Fan Fei Cc: helgaas, bjorn, bhelgaas, linux-kernel, linux-pci, lorenzo.pieralisi, pratyush.anand, thomas.petazzoni On Thu, Dec 2, 2021 at 5:06 AM Fan Fei <ffclaire1224@gmail.com> wrote: > > Remove the "depends on OF" in Kconfig of PCI controllers. These drivers > depends on CONFIG_OF because they use interface in of.h file, e.g. > "of_match_ptr()". But these interface are defined as stub if CONFIG_OF is > not set. Thus we can compile them without CONFIG_OF, instead just with > COMPILE_TEST. > > Signed-off-by: Fan Fei <ffclaire1224@gmail.com> > --- > Hi, Bjorn, > > I just did as what you suggested, remove the "depends on OF" in Konfig, and > compile it. It seems to work well. On the thread > https://lore.kernel.org/all/20201005215817.GA3063223@bjorn-Precision-5520/ > mentioned by the task excel, there are some replacement of "of_match_ptr()", > but this function seems to be defined even CONFIG_OF is not set. Is it > correct to reply in this thread or shall I send it to mail list directly? > > Kind regards > Fan > > drivers/pci/controller/Kconfig | 24 ++++++------------------ > 1 file changed, 6 insertions(+), 18 deletions(-) > > diff --git a/drivers/pci/controller/Kconfig b/drivers/pci/controller/Kconfig > index 93b141110537..6e988420f900 100644 > --- a/drivers/pci/controller/Kconfig > +++ b/drivers/pci/controller/Kconfig > @@ -8,13 +8,11 @@ config PCI_MVEBU > depends on ARCH_MVEBU || ARCH_DOVE || COMPILE_TEST > depends on MVEBU_MBUS > depends on ARM > - depends on OF > select PCI_BRIDGE_EMUL > > config PCI_AARDVARK > tristate "Aardvark PCIe controller" > depends on (ARCH_MVEBU && ARM64) || COMPILE_TEST > - depends on OF > depends on PCI_MSI_IRQ_DOMAIN > select PCI_BRIDGE_EMUL > help > @@ -34,12 +32,11 @@ config PCIE_XILINX_NWL > > config PCI_FTPCI100 > bool "Faraday Technology FTPCI100 PCI controller" > - depends on OF > default ARCH_GEMINI > > config PCI_IXP4XX > bool "Intel IXP4xx PCI controller" > - depends on ARM && OF > + depends on ARM > depends on ARCH_IXP4XX || COMPILE_TEST > default ARCH_IXP4XX > help > @@ -85,7 +82,6 @@ config PCI_HOST_COMMON > > config PCI_HOST_GENERIC > tristate "Generic PCI host controller" > - depends on OF > select PCI_HOST_COMMON > select IRQ_DOMAIN > help > @@ -94,7 +90,7 @@ config PCI_HOST_GENERIC > > config PCIE_XILINX > bool "Xilinx AXI PCIe host bridge support" > - depends on OF || COMPILE_TEST > + depends on COMPILE_TEST > depends on PCI_MSI_IRQ_DOMAIN > help > Say 'Y' here if you want kernel to support the Xilinx AXI PCIe > @@ -111,7 +107,7 @@ config PCIE_XILINX_CPM > config PCI_XGENE > bool "X-Gene PCIe controller" > depends on ARM64 || COMPILE_TEST > - depends on OF || (ACPI && PCI_QUIRKS) > + depends on ACPI && PCI_QUIRKS This is wrong because now it will only build if ACPI && PCI_QUIRKS. Maybe that condition can be dropped too. > help > Say Y here if you want internal PCI support on APM X-Gene SoC. > There are 5 internal PCIe ports available. Each port is GEN3 capable > @@ -128,7 +124,6 @@ config PCI_XGENE_MSI > > config PCI_V3_SEMI > bool "V3 Semiconductor PCI controller" > - depends on OF > depends on ARM || COMPILE_TEST > default ARCH_INTEGRATOR_AP > > @@ -146,7 +141,6 @@ config PCIE_IPROC > config PCIE_IPROC_PLATFORM > tristate "Broadcom iProc PCIe platform bus driver" > depends on ARCH_BCM_IPROC || (ARM && COMPILE_TEST) > - depends on OF > select PCIE_IPROC > default ARCH_BCM_IPROC > help > @@ -190,7 +184,7 @@ config PCIE_ALTERA_MSI > config PCI_HOST_THUNDER_PEM > bool "Cavium Thunder PCIe controller to off-chip devices" > depends on ARM64 || COMPILE_TEST > - depends on OF || (ACPI && PCI_QUIRKS) > + depends on ACPI && PCI_QUIRKS Same here > select PCI_HOST_COMMON > help > Say Y here if you want PCIe support for CN88XX Cavium Thunder SoCs. > @@ -198,7 +192,7 @@ config PCI_HOST_THUNDER_PEM > config PCI_HOST_THUNDER_ECAM > bool "Cavium Thunder ECAM controller to on-chip devices on pass-1.x silicon" > depends on ARM64 || COMPILE_TEST > - depends on OF || (ACPI && PCI_QUIRKS) > + depends on ACPI && PCI_QUIRKS And here. > select PCI_HOST_COMMON > help > Say Y here if you want ECAM support for CN88XX-Pass-1.x Cavium Thunder SoCs. > @@ -210,7 +204,6 @@ config PCIE_ROCKCHIP > config PCIE_ROCKCHIP_HOST > tristate "Rockchip PCIe host controller" > depends on ARCH_ROCKCHIP || COMPILE_TEST > - depends on OF > depends on PCI_MSI_IRQ_DOMAIN > select MFD_SYSCON > select PCIE_ROCKCHIP > @@ -222,7 +215,6 @@ config PCIE_ROCKCHIP_HOST > config PCIE_ROCKCHIP_EP > bool "Rockchip PCIe endpoint controller" > depends on ARCH_ROCKCHIP || COMPILE_TEST > - depends on OF > depends on PCI_ENDPOINT > select MFD_SYSCON > select PCIE_ROCKCHIP > @@ -234,7 +226,6 @@ config PCIE_ROCKCHIP_EP > config PCIE_MEDIATEK > tristate "MediaTek PCIe controller" > depends on ARCH_MEDIATEK || COMPILE_TEST > - depends on OF > depends on PCI_MSI_IRQ_DOMAIN > help > Say Y here if you want to enable PCIe controller support on > @@ -272,7 +263,6 @@ config PCIE_BRCMSTB > tristate "Broadcom Brcmstb PCIe host controller" > depends on ARCH_BRCMSTB || ARCH_BCM2835 || ARCH_BCM4908 || \ > BMIPS_GENERIC || COMPILE_TEST > - depends on OF > depends on PCI_MSI_IRQ_DOMAIN > default ARCH_BRCMSTB > help > @@ -289,7 +279,6 @@ config PCI_HYPERV_INTERFACE > config PCI_LOONGSON > bool "LOONGSON PCI Controller" > depends on MACH_LOONGSON64 || COMPILE_TEST > - depends on OF > depends on PCI_QUIRKS > default MACH_LOONGSON64 > help > @@ -298,7 +287,7 @@ config PCI_LOONGSON > > config PCIE_MICROCHIP_HOST > bool "Microchip AXI PCIe host bridge support" > - depends on PCI_MSI && OF > + depends on PCI_MSI > select PCI_MSI_IRQ_DOMAIN > select GENERIC_MSI_IRQ_DOMAIN > select PCI_HOST_COMMON > @@ -321,7 +310,6 @@ config PCIE_APPLE_MSI_DOORBELL_ADDR > config PCIE_APPLE > tristate "Apple PCIe controller" > depends on ARCH_APPLE || COMPILE_TEST > - depends on OF > depends on PCI_MSI_IRQ_DOMAIN > select PCI_HOST_COMMON > help > -- > 2.25.1 > ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-12-02 17:32 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-10-01 7:42 [PATCH 1/2] PCI: dwc: armada-8k driver needs OF support Thomas Petazzoni 2020-10-01 7:42 ` [PATCH 2/2] PCI: dwc: spear13xx driver needs OF Thomas Petazzoni 2020-10-01 11:17 ` [PATCH 1/2] PCI: dwc: armada-8k driver needs OF support Lorenzo Pieralisi 2020-10-05 21:58 ` Bjorn Helgaas 2021-12-02 11:06 ` [PATCH] PCI: Improve compile-test coverage Fan Fei 2021-12-02 17:31 ` Rob Herring
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).