Skip to contentSkip to conversation

fpga: m10bmc-sec: Fix kconfig dependencies

PATCH Applied Russ Weight 3 participants 3 messages Nov 15, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fpga: m10bmc-sec: Fix kconfig dependencies

The secure update driver depends on the firmware-upload functionality of the firmware-loader. The firmware-loader is carried in the firmware-class driver which is enabled with the tristate CONFIG_FW_LOADER option. The firmware-upload functionality is included in the firmware-class driver if the bool FW_UPLOAD config is set.

The current dependency statement, "depends on FW_UPLOAD", is not adequate because it does not implicitly turn on FW_LOADER. Instead of adding a dependency, follow the convention used by drivers that require the FW_LOADER_USER_HELPER functionality of the firmware-loader by using select for both FW_LOADER and FW_UPLOAD.

Fixes bdf86d0e6ca3 ("fpga: m10bmc-sec: create max10 bmc secure update")
---
 drivers/fpga/Kconfig | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/fpga/Kconfig +3 -1
index d1a8107fdcb3..6ce143dafd04 100644
@@ -246,7 +246,9 @@ config FPGA_MGR_VERSAL_FPGA
 
 config FPGA_M10_BMC_SEC_UPDATE
 	tristate "Intel MAX10 BMC Secure Update driver"
-	depends on MFD_INTEL_M10_BMC && FW_UPLOAD
+	depends on MFD_INTEL_M10_BMC
+	select FW_LOADER
+	select FW_UPLOAD
 	help
 	  Secure update support for the Intel MAX10 board management
 	  controller.
Signature · 1 line
2.25.1
Acked-by on v1 1/1
#1 lore raw
Quoted 12 lines · Russ Weight

The secure update driver depends on the firmware-upload functionality of the firmware-loader. The firmware-loader is carried in the firmware-class driver which is enabled with the tristate CONFIG_FW_LOADER option. The firmware-upload functionality is included in the firmware-class driver if the bool FW_UPLOAD config is set.

The current dependency statement, "depends on FW_UPLOAD", is not adequate because it does not implicitly turn on FW_LOADER. Instead of adding a dependency, follow the convention used by drivers that require the FW_LOADER_USER_HELPER functionality of the firmware-loader by using select for both FW_LOADER and FW_UPLOAD.

Quoted 4 lines
Fixes bdf86d0e6ca3 ("fpga: m10bmc-sec: create max10 bmc secure update")

Thanks.

Quoted 19 lines
---
 drivers/fpga/Kconfig | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/fpga/Kconfig +3 -1
index d1a8107fdcb3..6ce143dafd04 100644
@@ -246,7 +246,9 @@ config FPGA_MGR_VERSAL_FPGA
 
 config FPGA_M10_BMC_SEC_UPDATE
 	tristate "Intel MAX10 BMC Secure Update driver"
-	depends on MFD_INTEL_M10_BMC && FW_UPLOAD
+	depends on MFD_INTEL_M10_BMC
+	select FW_LOADER
+	select FW_UPLOAD
 	help
 	  Secure update support for the Intel MAX10 board management
 	  controller.
Signature · 1 line
~Randy
maintainer Acked-by Applied
#2 lore raw
Quoted 15 lines · Randy Dunlap
Quoted 12 lines · Russ Weight

The secure update driver depends on the firmware-upload functionality of the firmware-loader. The firmware-loader is carried in the firmware-class driver which is enabled with the tristate CONFIG_FW_LOADER option. The firmware-upload functionality is included in the firmware-class driver if the bool FW_UPLOAD config is set.

The current dependency statement, "depends on FW_UPLOAD", is not adequate because it does not implicitly turn on FW_LOADER. Instead of adding a dependency, follow the convention used by drivers that require the FW_LOADER_USER_HELPER functionality of the firmware-loader by using select for both FW_LOADER and FW_UPLOAD.

Quoted 6 lines
Quoted 4 lines
Fixes bdf86d0e6ca3 ("fpga: m10bmc-sec: create max10 bmc secure update")

Applied to for-6.1

Quoted 25 lines

Thanks.

Quoted 19 lines
---
 drivers/fpga/Kconfig | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/fpga/Kconfig +3 -1
index d1a8107fdcb3..6ce143dafd04 100644
@@ -246,7 +246,9 @@ config FPGA_MGR_VERSAL_FPGA
 
 config FPGA_M10_BMC_SEC_UPDATE
 	tristate "Intel MAX10 BMC Secure Update driver"
-	depends on MFD_INTEL_M10_BMC && FW_UPLOAD
+	depends on MFD_INTEL_M10_BMC
+	select FW_LOADER
+	select FW_UPLOAD
 	help
 	  Secure update support for the Intel MAX10 board management
 	  controller.
Signature · 1 line
~Randy