Skip to contentSkip to conversation

fpga: zynqmp: fix modular build

PATCH Applied Arnd Bergmann 2 participants 2 messages May 5, 2020 – May 9, 2020 FPGA manager framework

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fpga: zynqmp: fix modular build

Two symbols need to be exported to allow the zynqmp-fpga module to get loaded dynamically:

ERROR: modpost: "zynqmp_pm_fpga_load" [drivers/fpga/zynqmp-fpga.ko] undefined!
ERROR: modpost: "zynqmp_pm_fpga_get_status" [drivers/fpga/zynqmp-fpga.ko] undefined!

To ensure this is done correctly, also fix the Kconfig dependency to only allow building the fpga driver when the firmware driver is either disabled, or when it is reachable. With that, the dependency on the SoC itself can be removed, and there are no surprises when the fpga driver is built-in but the firmware a module.

Fixes 4db8180ffe7c ("firmware: xilinx: Remove eemi ops for fpga related APIs")
---
 drivers/fpga/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/fpga/Kconfig +1 -1
index b2408a710662..7cd5a29fc437 100644
@@ -208,7 +208,7 @@ config FPGA_DFL_PCI
 
 config FPGA_MGR_ZYNQMP_FPGA
 	tristate "Xilinx ZynqMP FPGA"
-	depends on ARCH_ZYNQMP || COMPILE_TEST
+	depends on ZYNQMP_FIRMWARE || (!ZYNQMP_FIRMWARE && COMPILE_TEST)
 	help
 	  FPGA manager driver support for Xilinx ZynqMP FPGAs.
 	  This driver uses the processor configuration port(PCAP)
Signature · 1 line
2.26.0
maintainer Applied
#1 lore raw
Quoted 34 lines · Arnd Bergmann

Two symbols need to be exported to allow the zynqmp-fpga module to get loaded dynamically:

ERROR: modpost: "zynqmp_pm_fpga_load" [drivers/fpga/zynqmp-fpga.ko] undefined!
ERROR: modpost: "zynqmp_pm_fpga_get_status" [drivers/fpga/zynqmp-fpga.ko] undefined!

To ensure this is done correctly, also fix the Kconfig dependency to only allow building the fpga driver when the firmware driver is either disabled, or when it is reachable. With that, the dependency on the SoC itself can be removed, and there are no surprises when the fpga driver is built-in but the firmware a module.

Fixes 4db8180ffe7c ("firmware: xilinx: Remove eemi ops for fpga related APIs")
---
 drivers/fpga/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/fpga/Kconfig +1 -1
index b2408a710662..7cd5a29fc437 100644
@@ -208,7 +208,7 @@ config FPGA_DFL_PCI
 
 config FPGA_MGR_ZYNQMP_FPGA
 	tristate "Xilinx ZynqMP FPGA"
-	depends on ARCH_ZYNQMP || COMPILE_TEST
+	depends on ZYNQMP_FIRMWARE || (!ZYNQMP_FIRMWARE && COMPILE_TEST)
 	help
 	  FPGA manager driver support for Xilinx ZynqMP FPGAs.
 	  This driver uses the processor configuration port(PCAP)
Signature · 1 line
2.26.0

Applied to fixes,

Thanks