Skip to content

Commit 42d5ec9

Browse files
Alan Tullgregkh
authored andcommitted
fpga: add config complete timeout
Adding timeout for maximum allowed time for FPGA to go to operating mode after a FPGA region has been programmed. Signed-off-by: Alan Tull <atull@opensource.altera.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 061c97d commit 42d5ec9

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

‎drivers/fpga/fpga-region.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,9 @@ static int fpga_region_notify_pre_apply(struct fpga_region *region,
385385
of_property_read_u32(nd->overlay, "region-freeze-timeout-us",
386386
&info->disable_timeout_us);
387387

388+
of_property_read_u32(nd->overlay, "config-complete-timeout-us",
389+
&info->config_complete_timeout_us);
390+
388391
/* If FPGA was externally programmed, don't specify firmware */
389392
if ((info->flags & FPGA_MGR_EXTERNAL_CONFIG) && firmware_name) {
390393
pr_err("error: specified firmware and external-fpga-config");

‎include/linux/fpga/fpga-mgr.h‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,14 @@ enum fpga_mgr_states {
7777
* @flags: boolean flags as defined above
7878
* @enable_timeout_us: maximum time to enable traffic through bridge (uSec)
7979
* @disable_timeout_us: maximum time to disable traffic through bridge (uSec)
80+
* @config_complete_timeout_us: maximum time for FPGA to switch to operating
81+
* status in the write_complete op.
8082
*/
8183
struct fpga_image_info {
8284
u32 flags;
8385
u32 enable_timeout_us;
8486
u32 disable_timeout_us;
87+
u32 config_complete_timeout_us;
8588
};
8689

8790
/**

0 commit comments

Comments
 (0)