summaryrefslogtreecommitdiff
path: root/drivers/base/firmware_loader/Kconfig
diff options
context:
space:
mode:
authorRuss Weight <russell.h.weight@intel.com>2022-04-21 14:22:00 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-04-26 12:34:28 +0200
commit97730bbb242cde22b7140acd202ffd88823886c9 (patch)
treeb09e50663744488f3b91ed37a764837a06355bb2 /drivers/base/firmware_loader/Kconfig
parente0c11a8b985137aebf4bcd07cd957b80ac23924d (diff)
downloadlwn-97730bbb242cde22b7140acd202ffd88823886c9.tar.gz
lwn-97730bbb242cde22b7140acd202ffd88823886c9.zip
firmware_loader: Add firmware-upload support
Extend the firmware subsystem to support a persistent sysfs interface that userspace may use to initiate a firmware update. For example, FPGA based PCIe cards load firmware and FPGA images from local FLASH when the card boots. The images in FLASH may be updated with new images provided by the user at his/her convenience. A device driver may call firmware_upload_register() to expose persistent "loading" and "data" sysfs files. These files are used in the same way as the fallback sysfs "loading" and "data" files. When 0 is written to "loading" to complete the write of firmware data, the data is transferred to the lower-level driver using pre-registered call-back functions. The data transfer is done in the context of a kernel worker thread. Reviewed-by: Luis Chamberlain <mcgrof@kernel.org> Reviewed-by: Tianfei zhang <tianfei.zhang@intel.com> Tested-by: Matthew Gerlach <matthew.gerlach@linux.intel.com> Signed-off-by: Russ Weight <russell.h.weight@intel.com> Link: https://lore.kernel.org/r/20220421212204.36052-5-russell.h.weight@intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base/firmware_loader/Kconfig')
-rw-r--r--drivers/base/firmware_loader/Kconfig14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/base/firmware_loader/Kconfig b/drivers/base/firmware_loader/Kconfig
index d13e4383ea0c..7e663dd972a7 100644
--- a/drivers/base/firmware_loader/Kconfig
+++ b/drivers/base/firmware_loader/Kconfig
@@ -202,5 +202,19 @@ config FW_CACHE
If unsure, say Y.
+config FW_UPLOAD
+ bool "Enable users to initiate firmware updates using sysfs"
+ select FW_LOADER_SYSFS
+ select FW_LOADER_PAGED_BUF
+ help
+ Enabling this option will allow device drivers to expose a persistent
+ sysfs interface that allows firmware updates to be initiated from
+ userspace. For example, FPGA based PCIe cards load firmware and FPGA
+ images from local FLASH when the card boots. The images in FLASH may
+ be updated with new images provided by the user. Enable this device
+ to support cards that rely on user-initiated updates for firmware files.
+
+ If unsure, say N.
+
endif # FW_LOADER
endmenu