mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>
To: atull <atull@opensource.altera.com>
Cc: Grant Likely <grant.likely@linaro.org>,
	Pavel Machek <pavel@denx.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jason Gunthorpe <jgunthorpe@obsidianresearch.com>,
	"H. Peter Anvin" <hpa@zytor.com>, Michal Simek <monstr@monstr.eu>,
	Michal Simek <michal.simek@xilinx.com>,
	Randy Dunlap <rdunlap@infradead.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	Pantelis Antoniou <pantelis.antoniou@konsulko.com>,
	Rob Herring <robh+dt@kernel.org>,
	Ira Snyder <iws@ovro.caltech.edu>,
	"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
	Mark Brown <broonie@kernel.org>, <philip@balister.org>,
	rubini <rubini@gnudd.com>,
	Steffen Trumtrar <s.trumtrar@pengutronix.de>,
	Jason <jason@lakedaemon.net>, <kyle.teske@ni.com>,
	Nicolas Pitre <nico@linaro.org>, "Balbi, Felipe" <balbi@ti.com>,
	Mauro Carvalho Chehab <m.chehab@samsung.com>,
	David Brown <davidb@codeaurora.org>,
	Rob Landley <rob@landley.net>, David Miller <davem@davemloft.net>,
	<cesarb@cesarb.net>,
	"sameo@linux.intel.com" <sameo@linux.intel.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Alan Tull <delicious.quinoa@gmail.com>,
	<dinguyen@opensource.altera.com>,
	Yves Vandervennet <yvanderv@opensource.altera.com>
Subject: Re: [PATCH v2 2/3] fpga manager: framework core
Date: Tue, 9 Dec 2014 21:02:48 +0000	[thread overview]
Message-ID: <20141209210248.2ca54287@lxorguk.ukuu.org.uk> (raw)
In-Reply-To: <alpine.DEB.2.02.1412090958250.4875@linuxheads99>

> I agree with the view that a FPGA is something that can get reprogrammed a lot.
> That's a flexibility we want to use.  I don't see a problem with using firmware
> to do the programming as long as we have a lightweight interface where we can
> load an image, use it, then later reset the FGPA and load a different image
> instead.
> 
> This assumes that the system will have a pile of FPGA images sitting on
> the filesystem for us to switch between.
> 
> My intent is to also support loading using device tree overlays.  This is a lot
> more linux-like and less of something just bolted on.  The flow here is:
> 
> * load a DT overlay

Don't assume DT. The entire world doesn't run DT

> * this causes the fpga to get programmed
> * appropriate bridges get enabled
> * appropriate drivers get probed

For the case of a fixed function device it's sort of equivalent to a
firmware load (in fact it *is* just a firmware load). The fixed function
cases don't actually even need a 'firmware manager' or an FPGA class. In
fact they shouldn't IMHO have one because the fact version A of the
device requires firmware bitstream X, and bitstream X is an altera FPGA
bitstream is an implementation detail. Revision B could be a
microcontroller or something else and you still just shove a bitstream
down it. No FPGA class is needed or appropriate. FPGA loader helpers yes.

In the enterprise space the model for FPGA use is usually a lot more
flexible, big racks of FPGA boards that are handed out as resources to
processes. They may be uploading fixed bitstreams but they may also be
splicing bitstreams (eg splicing in 'ROM' images) and in the future as
the Chinese break the existing FPGA market up I imagine we'll even see
open bitstream formats.

In the smaller system world emulators, real time and all sorts of maker
type projects use the FPGA boards as a dynamic resource already. It might
be running GNU radio, then driving a 3D printer, then doing processor
emulation for a games console. The FPGAs hanging off my desktop box have
been all sorts of things from video processors to emulated systems and
even block drivers for weird recalcitrant hardware. Next stop may well be
Localtalk 8)

In the academic world the model is similar, they are being treated as OS
resources by the various reconfigurable OS projects, most of which are
themselves Linux patch sets.

IMHO we have two use cases

1. Fixed function firmware - in which case the driver already handles it
and we don't care if its FPGA bitstreams or microcode or CPU code or
whatever

2. Dynamic use cases where we need a resource we own, which means
enumerate/open/close/read/write interfaces including firmware.

For use case #1 I don't believe we need magic classes for FPGA and in
fact they are actually a mistake, for use class #2 request_firmware()
doesn't work because it's intentionally quite blind to things like
namespaces and permissions models. Both benefit greatly from library
functions to handle the more standardised uploaded mechanisms.

I agree entirely with Michael about putting it in staging and working
from there.

Alan

  reply	other threads:[~2014-12-09 21:06 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-22 19:50 [PATCH v2 0/3] FPGA Framework with DT and sysfs support atull
2014-10-22 19:50 ` [PATCH v2 1/3] fpga manager: add sysfs interface document atull
2014-10-22 19:50 ` [PATCH v2 2/3] fpga manager: framework core atull
2014-10-24 10:52   ` Pavel Machek
2014-10-24 10:55     ` Pantelis Antoniou
2014-10-24 14:54       ` atull
2014-12-06 13:01         ` Grant Likely
2014-12-06 13:55           ` Pavel Machek
2014-12-08 17:50             ` Grant Likely
2014-12-08 17:56               ` Grant Likely
2014-12-08 17:56               ` Pantelis Antoniou
2014-12-08 18:30                 ` Grant Likely
2014-12-08 20:53               ` Rob Landley
2014-10-24 21:00     ` One Thousand Gnomes
2014-12-06 13:00     ` Grant Likely
2014-12-06 14:02       ` Pavel Machek
2014-12-08 22:55       ` One Thousand Gnomes
2014-12-09 13:11         ` Grant Likely
2014-12-09 13:42           ` Michal Simek
2014-12-09 16:07         ` atull
2014-12-09 21:02           ` One Thousand Gnomes [this message]
2014-12-09 22:12             ` atull
2014-12-12 12:14             ` Pavel Machek
2014-12-18 20:50       ` atull
2014-10-22 19:50 ` [PATCH v2 3/3] fpga manager: bus driver atull
2014-10-22 22:22   ` atull

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=20141209210248.2ca54287@lxorguk.ukuu.org.uk \
    --to=gnomes@lxorguk.ukuu.org.uk \
    --cc=akpm@linux-foundation.org \
    --cc=atull@opensource.altera.com \
    --cc=balbi@ti.com \
    --cc=broonie@kernel.org \
    --cc=cesarb@cesarb.net \
    --cc=davem@davemloft.net \
    --cc=davidb@codeaurora.org \
    --cc=delicious.quinoa@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dinguyen@opensource.altera.com \
    --cc=grant.likely@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hpa@zytor.com \
    --cc=iws@ovro.caltech.edu \
    --cc=jason@lakedaemon.net \
    --cc=jgunthorpe@obsidianresearch.com \
    --cc=kyle.teske@ni.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.chehab@samsung.com \
    --cc=michal.simek@xilinx.com \
    --cc=monstr@monstr.eu \
    --cc=nico@linaro.org \
    --cc=pantelis.antoniou@konsulko.com \
    --cc=pavel@denx.de \
    --cc=philip@balister.org \
    --cc=rdunlap@infradead.org \
    --cc=rob@landley.net \
    --cc=robh+dt@kernel.org \
    --cc=rubini@gnudd.com \
    --cc=s.trumtrar@pengutronix.de \
    --cc=sameo@linux.intel.com \
    --cc=yvanderv@opensource.altera.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

all inboxes | Powered by JetHome®