Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754086AbbGWWQw (ORCPT ); Thu, 23 Jul 2015 18:16:52 -0400 Received: from quartz.orcorp.ca ([184.70.90.242]:59218 "EHLO quartz.orcorp.ca" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753698AbbGWWQt (ORCPT ); Thu, 23 Jul 2015 18:16:49 -0400 Date: Thu, 23 Jul 2015 16:15:10 -0600 From: Jason Gunthorpe To: Moritz Fischer Cc: Alan Tull , Greg KH , hpa@zytor.com, Michal Simek , Michal Simek , rdunlap@infradead.org, mark.rutland@arm.com, linux-doc@vger.kernel.org, rubini@gnudd.com, Pantelis Antoniou , s.trumtrar@pengutronix.de, devel@driverdev.osuosl.org, sameo@linux.intel.com, Nicolas Pitre , ijc+devicetree@hellion.org.uk, kyle.teske@ni.com, Grant Likely , David Brown , Linus Walleij , cesarb@cesarb.net, devicetree@vger.kernel.org, jason@lakedaemon.net, pawel.moll@arm.com, iws@ovro.caltech.edu, broonie@kernel.org, Philip Balister , Petr Cvek , dinguyen@opensource.altera.com, pavel@denx.de, yvanderv@opensource.altera.com, linux-kernel@vger.kernel.org, balbi@ti.com, Alan Tull , robh+dt@kernel.org, Rob Landley , Kumar Gala , akpm@linux-foundation.org, davem@davemloft.net, m.chehab@samsung.com Subject: Re: [PATCH v9 6/7] staging: add simple-fpga-bus Message-ID: <20150723221510.GA16971@obsidianresearch.com> References: <1437148277-5405-1-git-send-email-atull@opensource.altera.com> <1437148277-5405-7-git-send-email-atull@opensource.altera.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Broken-Reverse-DNS: no host name found for IP address 10.0.0.192 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1609 Lines: 39 On Thu, Jul 23, 2015 at 02:55:52PM -0700, Moritz Fischer wrote: > Hi Alan, > > I saw that your socfpga driver doesn't support the partial reconfig > use case (not a big deal). > What I currently do for Zynq is if I'm doing a non-partial reconfig is > that I disable input > level shifters and assert *all* resets while reprogramming in my FPGA > manager .write_init() and .write_complete(). I do this as well, but it is a bit more complex.. FPGA specific code has to run around and ensure all DMA is shut off, then we need to make sure no CPU issued AXI transactions can happen, then we can tear down the FPGA side. If the FPGA is torn down while an AXI op is inprogress things go sideways, we have to work to prevent that :) This happens almost for free, I use DT and the device model to disconnect the drivers. The drivers are careful to synchronously fence off in-progress DMA. Then drop the DT nodes associated with the FPGA, finally the actual FPGA cells can be reset. > In a partial reconfiguration situation, would I have separate > simple-fpga buses for each of the parts that I swap out, each with > it's own reset and bitfile attached? I'd think of partial reconfiguration as another nested FPGA. The resets and so forth could be attached to soft controllers in the unswappable part of the FPGA. DT nodes have to surround it in some way... Jason -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/