Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1598051 > unrolled thread

[PATCH v5 1/4] fpga: add config complete timeout

Started bymatthew.gerlach@linux.intel.com
First post2017-03-10 20:50 +0100
Last post2017-03-13 21:50 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v5 1/4] fpga: add config complete timeout matthew.gerlach@linux.intel.com - 2017-03-10 20:50 +0100
    Re: [PATCH v5 1/4] fpga: add config complete timeout Moritz Fischer <mdf@kernel.org> - 2017-03-13 21:50 +0100

#1598051 — [PATCH v5 1/4] fpga: add config complete timeout

Frommatthew.gerlach@linux.intel.com
Date2017-03-10 20:50 +0100
Subject[PATCH v5 1/4] fpga: add config complete timeout
Message-ID<tjyI1-6Y-1@gated-at.bofh.it>
From: Alan Tull <atull@opensource.altera.com>

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>
---
 drivers/fpga/fpga-region.c    | 3 +++
 include/linux/fpga/fpga-mgr.h | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/drivers/fpga/fpga-region.c b/drivers/fpga/fpga-region.c
index 3222fdb..28401cb 100644
--- a/drivers/fpga/fpga-region.c
+++ b/drivers/fpga/fpga-region.c
@@ -381,6 +381,9 @@ static int fpga_region_notify_pre_apply(struct fpga_region *region,
 	of_property_read_u32(nd->overlay, "region-freeze-timeout-us",
 			     &info->disable_timeout_us);
 
+	of_property_read_u32(nd->overlay, "config-complete-timeout-us",
+			     &info->config_complete_timeout_us);
+
 	/* If FPGA was externally programmed, don't specify firmware */
 	if ((info->flags & FPGA_MGR_EXTERNAL_CONFIG) && firmware_name) {
 		pr_err("error: specified firmware and external-fpga-config");
diff --git a/include/linux/fpga/fpga-mgr.h b/include/linux/fpga/fpga-mgr.h
index 57beb5d..fd3f083 100644
--- a/include/linux/fpga/fpga-mgr.h
+++ b/include/linux/fpga/fpga-mgr.h
@@ -76,11 +76,14 @@ enum fpga_mgr_states {
  * @flags: boolean flags as defined above
  * @enable_timeout_us: maximum time to enable traffic through bridge (uSec)
  * @disable_timeout_us: maximum time to disable traffic through bridge (uSec)
+ * @config_complete_timeout_us: maximum time for FPGA to switch to operating
+ *	   status in the write_complete op.
  */
 struct fpga_image_info {
 	u32 flags;
 	u32 enable_timeout_us;
 	u32 disable_timeout_us;
+	u32 config_complete_timeout_us;
 };
 
 /**
-- 
2.7.4

[toc] | [next] | [standalone]


#1599788

FromMoritz Fischer <mdf@kernel.org>
Date2017-03-13 21:50 +0100
Message-ID<tkF4J-5ZL-1@gated-at.bofh.it>
In reply to#1598051
On Fri, Mar 10, 2017 at 11:40 AM,  <matthew.gerlach@linux.intel.com> wrote:
> From: Alan Tull <atull@opensource.altera.com>
>
> 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>
Acked-by: Moritz Fischer <mdf@kernel.org>
> ---
>  drivers/fpga/fpga-region.c    | 3 +++
>  include/linux/fpga/fpga-mgr.h | 3 +++
>  2 files changed, 6 insertions(+)
>
> diff --git a/drivers/fpga/fpga-region.c b/drivers/fpga/fpga-region.c
> index 3222fdb..28401cb 100644
> --- a/drivers/fpga/fpga-region.c
> +++ b/drivers/fpga/fpga-region.c
> @@ -381,6 +381,9 @@ static int fpga_region_notify_pre_apply(struct fpga_region *region,
>         of_property_read_u32(nd->overlay, "region-freeze-timeout-us",
>                              &info->disable_timeout_us);
>
> +       of_property_read_u32(nd->overlay, "config-complete-timeout-us",
> +                            &info->config_complete_timeout_us);
> +
>         /* If FPGA was externally programmed, don't specify firmware */
>         if ((info->flags & FPGA_MGR_EXTERNAL_CONFIG) && firmware_name) {
>                 pr_err("error: specified firmware and external-fpga-config");
> diff --git a/include/linux/fpga/fpga-mgr.h b/include/linux/fpga/fpga-mgr.h
> index 57beb5d..fd3f083 100644
> --- a/include/linux/fpga/fpga-mgr.h
> +++ b/include/linux/fpga/fpga-mgr.h
> @@ -76,11 +76,14 @@ enum fpga_mgr_states {
>   * @flags: boolean flags as defined above
>   * @enable_timeout_us: maximum time to enable traffic through bridge (uSec)
>   * @disable_timeout_us: maximum time to disable traffic through bridge (uSec)
> + * @config_complete_timeout_us: maximum time for FPGA to switch to operating
> + *        status in the write_complete op.
>   */
>  struct fpga_image_info {
>         u32 flags;
>         u32 enable_timeout_us;
>         u32 disable_timeout_us;
> +       u32 config_complete_timeout_us;
>  };
>
>  /**
> --
> 2.7.4
>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web