fpga: mgr: API change to replace fpga load functions with single function
fpga-mgr has three methods for programming FPGAs, depending on whether the image is in a scatter gather list, a contiguous buffer, or a firmware file. This makes it difficult to write upper layers as the caller has to assume whether the FPGA image is in a sg table, as a single buffer, or a firmware file. This commit moves these parameters to struct fpga_image_info and adds a single function for programming fpgas. New functions: * fpga_mgr_load - given fpga manager and struct fpga_image_info, program the fpga. * fpga_image_info_alloc - alloc a struct fpga_image_info. * fpga_image_info_free - free a struct fpga_image_info. These three functions are unexported: * fpga_mgr_buf_load_sg * fpga_mgr_buf_load * fpga_mgr_firmware_load Also use devm_kstrdup to copy firmware_name so we aren't making assumptions about where it comes from when allocing/freeing the struct fpga_image_info. API documentation has been updated and a new document for FPGA region has been added. Signed-off-by:Alan Tull <atull@kernel.org> Acked-by:
Moritz Fischer <mdf@kernel.org> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Showing
- Documentation/fpga/fpga-mgr.txt 51 additions, 68 deletionsDocumentation/fpga/fpga-mgr.txt
- Documentation/fpga/fpga-region.txt 95 additions, 0 deletionsDocumentation/fpga/fpga-region.txt
- Documentation/fpga/overview.txt 23 additions, 0 deletionsDocumentation/fpga/overview.txt
- drivers/fpga/fpga-mgr.c 57 additions, 11 deletionsdrivers/fpga/fpga-mgr.c
- drivers/fpga/fpga-region.c 28 additions, 15 deletionsdrivers/fpga/fpga-region.c
- include/linux/fpga/fpga-mgr.h 19 additions, 11 deletionsinclude/linux/fpga/fpga-mgr.h
Documentation/fpga/fpga-region.txt
0 → 100644
Documentation/fpga/overview.txt
0 → 100644
Please register or sign in to comment