Skip to content

RFC Add streaming API for firmware and FPGA manager

[email protected] lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest2 patches 14 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2firmware class: Add stream_firmware API.drivers/base/firmware_class.c include/linux/firmware.h+130 -011 replies
2/2fpga manager: Add fpga_mgr_firmware_stream APIdrivers/fpga/fpga-mgr.c include/linux/fpga/fpga-mgr.h+81 -02 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC 0/2] Add streaming API for firmware and FPGA manager

From: Yi Li <[email protected]>

As the FPGA hardware advances, the firmware image size grows (hundres of MBs or more). It could be an issue for kernel to allocate a big buffer to load the whole firmware file.
Here is an attempt to read the firmware file into a small buffer and program the FPGA in a loop (or so call the streaming mode). It should not be a performance hit for FPGA programing since the majority of time spend is with the FPGA CvP/PR-IP interface.

pseudo code in fpga manager:

while (size > 0) {
	ret = stream_firmware(&fw, image_name, dev, offset, streamsize);
	ret = mgr->mops->write(mgr, fw->data, fw->size);
	offset += fw->size;
	size -= fw->size;
}

Thanks,
Yi

Yi Li (2):
firmware class: Add stream_firmware API.
fpga manager: Add fpga_mgr_firmware_stream API

 drivers/base/firmware_class.c | 128 ++++++++++++++++++++++++++++++++++++++++++
 drivers/fpga/fpga-mgr.c       |  77 +++++++++++++++++++++++++
 include/linux/firmware.h      |   2 +
 include/linux/fpga/fpga-mgr.h |   4 ++
 4 files changed, 211 insertions(+)
Signature · 1 line
2.7.4