* [PATCH] fpga: zynq-fpga: Ensure proper xCAP interface switch
@ 2023-05-19 10:32 Nava kishore Manne
2023-05-22 10:17 ` Xu Yilun
0 siblings, 1 reply; 2+ messages in thread
From: Nava kishore Manne @ 2023-05-19 10:32 UTC (permalink / raw)
To: mdf, hao.wu, yilun.xu, trix, michal.simek, linux-fpga,
linux-arm-kernel, linux-kernel
Cc: Alfonso Rodriguez
From: Alfonso Rodriguez <alfonso.rodriguezm@upm.es>
Ensure that the low-level fpga-manager driver for Zynq-7000 devices
switches between reconfiguration interfaces as specified in the TRM
(section 6.5.1: "Ensure that all outstanding transactions are completed
before changing interfaces"); device (re)configuration may fail otherwise
Signed-off-by: Alfonso Rodriguez <alfonso.rodriguezm@upm.es>
Tested-by: Nava kishore Manne <nava.kishore.manne@amd.com>
---
drivers/fpga/zynq-fpga.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/fpga/zynq-fpga.c b/drivers/fpga/zynq-fpga.c
index ae0da361e6c6..88db9ac36887 100644
--- a/drivers/fpga/zynq-fpga.c
+++ b/drivers/fpga/zynq-fpga.c
@@ -493,15 +493,16 @@ static int zynq_fpga_ops_write_complete(struct fpga_manager *mgr,
if (err)
return err;
- /* Release 'PR' control back to the ICAP */
- zynq_fpga_write(priv, CTRL_OFFSET,
- zynq_fpga_read(priv, CTRL_OFFSET) & ~CTRL_PCAP_PR_MASK);
-
err = zynq_fpga_poll_timeout(priv, INT_STS_OFFSET, intr_status,
intr_status & IXR_PCFG_DONE_MASK,
INIT_POLL_DELAY,
INIT_POLL_TIMEOUT);
+ /* Release 'PR' control back to the ICAP */
+ zynq_fpga_write(priv, CTRL_OFFSET,
+ zynq_fpga_read(priv, CTRL_OFFSET)
+ & ~CTRL_PCAP_PR_MASK);
+
clk_disable(priv->clk);
if (err)
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] fpga: zynq-fpga: Ensure proper xCAP interface switch
2023-05-19 10:32 [PATCH] fpga: zynq-fpga: Ensure proper xCAP interface switch Nava kishore Manne
@ 2023-05-22 10:17 ` Xu Yilun
0 siblings, 0 replies; 2+ messages in thread
From: Xu Yilun @ 2023-05-22 10:17 UTC (permalink / raw)
To: Nava kishore Manne
Cc: mdf, hao.wu, trix, michal.simek, linux-fpga, linux-arm-kernel,
linux-kernel, Alfonso Rodriguez
On 2023-05-19 at 16:02:32 +0530, Nava kishore Manne wrote:
> From: Alfonso Rodriguez <alfonso.rodriguezm@upm.es>
>
> Ensure that the low-level fpga-manager driver for Zynq-7000 devices
> switches between reconfiguration interfaces as specified in the TRM
> (section 6.5.1: "Ensure that all outstanding transactions are completed
> before changing interfaces"); device (re)configuration may fail otherwise
Please briefly describe how the change conforms to the Doc in changelog,
rather than just leave the Doc for reviewers.
And please provide the Link to documentation.
>
> Signed-off-by: Alfonso Rodriguez <alfonso.rodriguezm@upm.es>
> Tested-by: Nava kishore Manne <nava.kishore.manne@amd.com>
Please add your own SOB as you are handling the patch.
Thanks,
Yilun
> ---
> drivers/fpga/zynq-fpga.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/fpga/zynq-fpga.c b/drivers/fpga/zynq-fpga.c
> index ae0da361e6c6..88db9ac36887 100644
> --- a/drivers/fpga/zynq-fpga.c
> +++ b/drivers/fpga/zynq-fpga.c
> @@ -493,15 +493,16 @@ static int zynq_fpga_ops_write_complete(struct fpga_manager *mgr,
> if (err)
> return err;
>
> - /* Release 'PR' control back to the ICAP */
> - zynq_fpga_write(priv, CTRL_OFFSET,
> - zynq_fpga_read(priv, CTRL_OFFSET) & ~CTRL_PCAP_PR_MASK);
> -
> err = zynq_fpga_poll_timeout(priv, INT_STS_OFFSET, intr_status,
> intr_status & IXR_PCFG_DONE_MASK,
> INIT_POLL_DELAY,
> INIT_POLL_TIMEOUT);
>
> + /* Release 'PR' control back to the ICAP */
> + zynq_fpga_write(priv, CTRL_OFFSET,
> + zynq_fpga_read(priv, CTRL_OFFSET)
> + & ~CTRL_PCAP_PR_MASK);
> +
> clk_disable(priv->clk);
>
> if (err)
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-05-22 2:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-19 10:32 [PATCH] fpga: zynq-fpga: Ensure proper xCAP interface switch Nava kishore Manne
2023-05-22 10:17 ` Xu Yilun
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).