aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/fpga/fpga-mgr.h
diff options
context:
space:
mode:
authorJason Gunthorpe <jgunthorpe@obsidianresearch.com>2016-11-22 13:22:09 -0500
committerAlan Tull <atull@opensource.altera.com>2016-11-29 16:51:49 -0500
commit1d7f1589d341344c0c598b00de44891a7968c6a0 (patch)
treef1fd0d74131222096b584ebe16a11a9c0e476d34 /include/linux/fpga/fpga-mgr.h
parent340c0c53ea3073107d5bb7a61f3158e50bf189e0 (diff)
fpga: Clarify how write_init works streaming modes
This interface was designed for streaming, but write_init's buf argument has an unclear purpose. Define it to be the first bytes of the bitstream. Each driver gets to set how many bytes (at most) it wants to see. Short bitstreams will be passed through as-is, while long ones will be truncated. The intent is to allow drivers to peek at the header before the transfer actually starts. Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> Acked-by: Alan Tull <atull@opensource.altera.com>
Diffstat (limited to 'include/linux/fpga/fpga-mgr.h')
-rw-r--r--include/linux/fpga/fpga-mgr.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/fpga/fpga-mgr.h b/include/linux/fpga/fpga-mgr.h
index 96a1a3311649..16551d5eac36 100644
--- a/include/linux/fpga/fpga-mgr.h
+++ b/include/linux/fpga/fpga-mgr.h
@@ -84,6 +84,7 @@ struct fpga_image_info {
84 84
85/** 85/**
86 * struct fpga_manager_ops - ops for low level fpga manager drivers 86 * struct fpga_manager_ops - ops for low level fpga manager drivers
87 * @initial_header_size: Maximum number of bytes that should be passed into write_init
87 * @state: returns an enum value of the FPGA's state 88 * @state: returns an enum value of the FPGA's state
88 * @write_init: prepare the FPGA to receive confuration data 89 * @write_init: prepare the FPGA to receive confuration data
89 * @write: write count bytes of configuration data to the FPGA 90 * @write: write count bytes of configuration data to the FPGA
@@ -95,6 +96,7 @@ struct fpga_image_info {
95 * called, so leaving them out is fine. 96 * called, so leaving them out is fine.
96 */ 97 */
97struct fpga_manager_ops { 98struct fpga_manager_ops {
99 size_t initial_header_size;
98 enum fpga_mgr_states (*state)(struct fpga_manager *mgr); 100 enum fpga_mgr_states (*state)(struct fpga_manager *mgr);
99 int (*write_init)(struct fpga_manager *mgr, 101 int (*write_init)(struct fpga_manager *mgr,
100 struct fpga_image_info *info, 102 struct fpga_image_info *info,