97730bbb24
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>
13 lines
462 B
Makefile
13 lines
462 B
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
# Makefile for the Linux firmware loader
|
|
|
|
obj-$(CONFIG_FW_LOADER_USER_HELPER) += fallback_table.o
|
|
obj-$(CONFIG_FW_LOADER) += firmware_class.o
|
|
firmware_class-objs := main.o
|
|
firmware_class-$(CONFIG_FW_LOADER_USER_HELPER) += fallback.o
|
|
firmware_class-$(CONFIG_EFI_EMBEDDED_FIRMWARE) += fallback_platform.o
|
|
firmware_class-$(CONFIG_FW_LOADER_SYSFS) += sysfs.o
|
|
firmware_class-$(CONFIG_FW_UPLOAD) += sysfs_upload.o
|
|
|
|
obj-y += builtin/
|