linux-fpga.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fpga: zynq-fpga: fix setting pcap to max speed
@ 2025-10-02 12:41 Koen Beel
  2025-10-06  2:50 ` Xu Yilun
  0 siblings, 1 reply; 4+ messages in thread
From: Koen Beel @ 2025-10-02 12:41 UTC (permalink / raw)
  To: Moritz Fischer, Xu Yilun, Tom Rix, Michal Simek, linux-fpga

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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-10-09  7:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-02 12:41 [PATCH] fpga: zynq-fpga: fix setting pcap to max speed Koen Beel
2025-10-06  2:50 ` Xu Yilun
2025-10-06 18:33   ` Koen Beel
     [not found]   ` <CACaJORV1ZtLcTmUnDgDBafZ5RtbUnkphUr-=QvLL23A2kLC2xQ@mail.gmail.com>
2025-10-09  7:37     ` 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).