All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] zynq-fpga: Only route PR via PCAP when required
@ 2018-10-23  6:31 ` Mike Looijmans
  0 siblings, 0 replies; 20+ messages in thread
From: Mike Looijmans @ 2018-10-23  6:31 UTC (permalink / raw)
  To: linux-fpga
  Cc: linux-arm-kernel, linux-kernel, michal.simek, mdf, atull, Mike Looijmans

The Xilinx Zynq FPGA driver takes ownership of the PR interface, making
it impossible to use the ICAP interface for partial reconfiguration.

This patch changes the driver to only activate PR over PCAP while the
device is actively being accessed by the driver for programming.

This allows both PCAP and ICAP interfaces to be used for PR.

Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
---
 drivers/fpga/zynq-fpga.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/fpga/zynq-fpga.c b/drivers/fpga/zynq-fpga.c
index 3110e00..f6c205a 100644
--- a/drivers/fpga/zynq-fpga.c
+++ b/drivers/fpga/zynq-fpga.c
@@ -497,6 +497,10 @@ static int zynq_fpga_ops_write_complete(struct fpga_manager *mgr,
 	int err;
 	u32 intr_status;
 
+	/* Release 'PR' control back to the ICAP */
+	zynq_fpga_write(priv, CTRL_OFFSET,
+		zynq_fpga_read(priv, CTRL_OFFSET) & ~CTRL_PCAP_PR_MASK);
+
 	err = clk_enable(priv->clk);
 	if (err)
 		return err;
-- 
1.9.1


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

end of thread, other threads:[~2018-11-01 18:34 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-23  6:31 [PATCH] zynq-fpga: Only route PR via PCAP when required Mike Looijmans
2018-10-23  6:31 ` Mike Looijmans
2018-10-23  9:01 ` Moritz Fischer
2018-10-23  9:01   ` Moritz Fischer
2018-10-23 10:53   ` Mike Looijmans
2018-10-23 10:53     ` Mike Looijmans
2018-10-23 10:53     ` Mike Looijmans
2018-10-23 11:04     ` Moritz Fischer
2018-10-23 11:04       ` Moritz Fischer
2018-10-23 11:04       ` Moritz Fischer
2018-10-26  7:54       ` Michal Simek
2018-10-26  7:54         ` Michal Simek
2018-10-26  7:54         ` Michal Simek
2018-10-26 17:04         ` Moritz Fischer
2018-10-26 17:04           ` Moritz Fischer
2018-10-24  7:53 ` [PATCH v2] " Mike Looijmans
2018-10-24  7:53   ` Mike Looijmans
2018-11-01 18:33   ` Alan Tull
2018-11-01 18:33     ` Alan Tull
2018-11-01 18:33     ` Alan Tull

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.