linux-fpga.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Koen Beel <koen.beel@b-kalm.com>
To: Moritz Fischer <mdf@kernel.org>, Xu Yilun <yilun.xu@intel.com>,
	Tom Rix <trix@redhat.com>, Michal Simek <michal.simek@amd.com>,
	linux-fpga@vger.kernel.org
Subject: [PATCH] fpga: zynq-fpga: fix setting pcap to max speed
Date: Thu, 2 Oct 2025 14:41:59 +0200	[thread overview]
Message-ID: <aN5zF8iaKlPqL9pZ@nuc> (raw)

The PCAP interface should be set to max speed if the bitstream is not
encrypted.
The code comments mention this should be done, but it wasn't the case.
On my board, this fixes failure of programming the (non-encrypted)
bitstream.

Signed-off-by: Koen Beel <koen.beel@b-kalm.com>
---
 drivers/fpga/zynq-fpga.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/fpga/zynq-fpga.c b/drivers/fpga/zynq-fpga.c
index b7629a0e4813..1872ce05b566 100644
--- a/drivers/fpga/zynq-fpga.c
+++ b/drivers/fpga/zynq-fpga.c
@@ -354,8 +354,8 @@ static int zynq_fpga_ops_write_init(struct fpga_manager *mgr,
 				 | CTRL_PCAP_RATE_EN_MASK | ctrl));
 	else
 		zynq_fpga_write(priv, CTRL_OFFSET,
-				(CTRL_PCAP_PR_MASK | CTRL_PCAP_MODE_MASK
-				 | ctrl));
+				(CTRL_PCAP_PR_MASK | CTRL_PCAP_MODE_MASK | ctrl)
+				 & ~CTRL_PCAP_RATE_EN_MASK);
 
 
 	/* We expect that the command queue is empty right now. */
-- 
2.51.0


             reply	other threads:[~2025-10-02 12:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-02 12:41 Koen Beel [this message]
2025-10-06  2:50 ` [PATCH] fpga: zynq-fpga: fix setting pcap to max speed Xu Yilun
2025-10-06 18:33   ` Koen Beel
     [not found]   ` <CACaJORV1ZtLcTmUnDgDBafZ5RtbUnkphUr-=QvLL23A2kLC2xQ@mail.gmail.com>
2025-10-09  7:37     ` Xu Yilun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aN5zF8iaKlPqL9pZ@nuc \
    --to=koen.beel@b-kalm.com \
    --cc=linux-fpga@vger.kernel.org \
    --cc=mdf@kernel.org \
    --cc=michal.simek@amd.com \
    --cc=trix@redhat.com \
    --cc=yilun.xu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).