[PATCH 3/3] add debugfs interface for fpga config complete timeout

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Matthew Gerlach <matthew.gerlach@xxxxxxxxx>

Add debugfs interface and documentation for setting the maximum
time in microseconds for the FPGA to go to the operating
state after the region has been programmed.

Signed-off-by: Matthew Gerlach <matthew.gerlach@xxxxxxxxxxxxxxx>
---
 Documentation/fpga/debugfs.txt  | 6 ++++++
 drivers/fpga/fpga-mgr-debugfs.c | 5 +++++
 2 files changed, 11 insertions(+)

diff --git a/Documentation/fpga/debugfs.txt b/Documentation/fpga/debugfs.txt
index 1b34d5460d5d..b01950f76e20 100644
--- a/Documentation/fpga/debugfs.txt
+++ b/Documentation/fpga/debugfs.txt
@@ -9,6 +9,12 @@ three files:
 
    $ echo 1 > /sys/kernel/debug/fpga_manager/fpga0/flags
 
+ - [RW] config_complete_timeout_us:	time out in microseconds to wait for
+					FPGA to go to operating state after
+					region has been programmed.
+
+   $ echo 4 > /sys/kernel/debug/fpga_manager/fpga0/config_complete_timeout_us
+
  - [RW] firmware_name:  Name of an FPGA image firmware file.  Writing initiates
                         a complete FPGA programming cycle.  Note that the image
                         file must be in a directory on the firmware search path
diff --git a/drivers/fpga/fpga-mgr-debugfs.c b/drivers/fpga/fpga-mgr-debugfs.c
index 30af59b92bf3..83b712d4eb14 100644
--- a/drivers/fpga/fpga-mgr-debugfs.c
+++ b/drivers/fpga/fpga-mgr-debugfs.c
@@ -153,8 +153,13 @@ void fpga_mgr_debugfs_add(struct fpga_manager *mgr)
 			    &fpga_mgr_image_fops);
 
 	info = &debugfs->info;
+
 	debugfs_create_u32("flags", 0600, debugfs->debugfs_dir, &info->flags);
 
+	debugfs_create_u32("config_complete_timeout_us", 0600,
+			   debugfs->debugfs_dir,
+			   &info->config_complete_timeout_us);
+
 	mgr->debugfs = debugfs;
 }
 
-- 
2.26.2




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux