linux-fpga.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 3/3] add debugfs interface for fpga config complete timeout
@ 2022-05-17  8:41 adrian.ho.yin.ng
  0 siblings, 0 replies; only message in thread
From: adrian.ho.yin.ng @ 2022-05-17  8:41 UTC (permalink / raw)
  To: Moritz Fischer, Wu Hao, Xu Yilun, Tom Rix, Jonathan Corbet
  Cc: linux-fpga, linux-doc, Matthew Gerlach, Matthew Gerlach

From: Matthew Gerlach <matthew.gerlach@intel.com>

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@linux.intel.com>
---
 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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-05-17  8:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-17  8:41 [PATCH 3/3] add debugfs interface for fpga config complete timeout adrian.ho.yin.ng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).