linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alan Tull <atull@opensource.altera.com>
To: Rob Herring <robh+dt@kernel.org>
Cc: Frank Rowand <frowand.list@gmail.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Moritz Fischer <moritz.fischer@ettus.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Jon Masters <jcm@redhat.com>,
	"Walter Goossens" <waltergoossens@home.nl>,
	Michal Simek <michal.simek@xilinx.com>,
	Cyril Chemparathy <cyril.chemparathy@xilinx.com>,
	Josh Cartwright <joshc@ni.com>,
	Matthew Gerlach <mgerlach@opensource.altera.com>,
	Dinh Nguyen <dinguyen@opensource.altera.com>,
	<devicetree@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <delicious.quinoa@gmail.com>,
	Alan Tull <atull@opensource.altera.com>
Subject: [PATCH v19 00/12] Device Tree support for FPGA Programming
Date: Wed, 28 Sep 2016 13:21:48 -0500	[thread overview]
Message-ID: <20160928182200.15800-1-atull@opensource.altera.com> (raw)

This patchset support FPGA programming under the control
of Device Tree overlays.

A few patches that were acked have been left out of the
patchset, but continued development has caused this
patchset to swell a bit.

I'm proposing a minor change to the FPGA Manager API. The
change is to substitute the 'flags' paramater with a pointer
to a 'struct fpga_image_info'.  The reason for this: I'm
running into cases where an FPGA image has properties that
affect how it is programmed into the FPGA.  These properties
are specific to the design in the image and would be useful
to pass in a struct to the FPGA manager and bridges.  The DT
overlays support can populate the struct from DT properties
in the overlay.

The first examples I've run against are that depending on
the complexity of the design in an image, the time that a
bridge takes to be enabled or disabled can vary.  These
patches add the timeouts for bridge enable/disable into the
device tree overlay and add a FPGA image info struct to the
API.  Changes to the existing socfpga and zynq driver are
tiny; a couple lines each.  Other future additions to the
FPGA image info struct may include timeout values for the
FPGA to go to operating mode after programming and other
bridge specifics such as width.

Rob suggested that fpga-regions be children of bridges so
that is supported here.  Since a region may need >1 bridge,
a list additional bridges can be added with the fpga-bridges
property.  I've cleaned up the bindings doc to be correct
DT-wise.  Hopefully!

This patch set includes:
 * Support fpga-regions being children of fpga-bridges
 * fixes and rewrites for the FPGA Regions DT binding doc
 * fpga image info struct support
 * support the bridges and region built as modules
 * fix the hps bridges from stomping on each others' use
   of a shared register.  Note that the register has no
   other bits than those used by the hps bridge driver.
 * fix a potential race condition in hps bridge driver probe
 * remove an unneeded pr_err from fpga-region.c
 * remove some clk_puts - incorrect due to devm_clk_get
 * add altera freeze bridge

The following were acked so they are no longer in this patch set:
 * bindings for Altera SOCFPGA bridges
   https://patchwork.kernel.org/patch/9226093/
 * bindings for Arria 10 FPGA Mgr
   https://patchwork.kernel.org/patch/9226111/
 * "[PATCH v3] of/overlay: add of overlay notifications"
   https://lkml.org/lkml/2016/4/19/704

The patchset is dependent on:
 * Pantelis Antonious's dtc changes for dynamic device tree.
    https://github.com/pantoniou/dtc.git
 * Pantelis' configfs interface patches and fixes
    https://github.com/pantoniou/linux-beagle-track-mainline

Alan


Alan Tull (12):
  fpga: add bindings document for fpga region
  doc: fpga-mgr: add fpga image info to api
  add bindings document for altera freeze bridge
  add sysfs document for fpga bridge class
  fpga-mgr: add fpga image information struct
  fpga: add fpga image information struct for socfpga support
  fpga: add fpga image information struct for zynq support
  fpga: add fpga bridge framework
  fpga: fpga-region: device tree control for FPGA
  ARM: socfpga: fpga bridge driver support
  fpga: add altera freeze bridge support
  fpga-manager: Add Socfpga Arria10 support

 Documentation/ABI/testing/sysfs-class-fpga-bridge  |  11 +
 .../bindings/fpga/altera-freeze-bridge.txt         |  23 +
 .../devicetree/bindings/fpga/fpga-region.txt       | 494 +++++++++++++++++
 Documentation/fpga/fpga-mgr.txt                    |  32 +-
 drivers/fpga/Kconfig                               |  36 ++
 drivers/fpga/Makefile                              |   9 +
 drivers/fpga/altera-fpga2sdram.c                   | 180 ++++++
 drivers/fpga/altera-freeze-bridge.c                | 273 ++++++++++
 drivers/fpga/altera-hps2fpga.c                     | 221 ++++++++
 drivers/fpga/fpga-bridge.c                         | 398 ++++++++++++++
 drivers/fpga/fpga-mgr.c                            |  17 +-
 drivers/fpga/fpga-region.c                         | 603 +++++++++++++++++++++
 drivers/fpga/socfpga-a10.c                         | 572 +++++++++++++++++++
 drivers/fpga/socfpga.c                             |   7 +-
 drivers/fpga/zynq-fpga.c                           |  10 +-
 include/linux/fpga/fpga-bridge.h                   |  60 ++
 include/linux/fpga/fpga-mgr.h                      |  25 +-
 17 files changed, 2941 insertions(+), 30 deletions(-)
 create mode 100644 Documentation/ABI/testing/sysfs-class-fpga-bridge
 create mode 100644 Documentation/devicetree/bindings/fpga/altera-freeze-bridge.txt
 create mode 100644 Documentation/devicetree/bindings/fpga/fpga-region.txt
 create mode 100644 drivers/fpga/altera-fpga2sdram.c
 create mode 100644 drivers/fpga/altera-freeze-bridge.c
 create mode 100644 drivers/fpga/altera-hps2fpga.c
 create mode 100644 drivers/fpga/fpga-bridge.c
 create mode 100644 drivers/fpga/fpga-region.c
 create mode 100644 drivers/fpga/socfpga-a10.c
 create mode 100644 include/linux/fpga/fpga-bridge.h

-- 
2.9.3

             reply	other threads:[~2016-09-28 18:37 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-28 18:21 Alan Tull [this message]
2016-09-28 18:21 ` [PATCH v19 01/12] fpga: add bindings document for fpga region Alan Tull
2016-10-08 20:49   ` Rob Herring
2016-10-11 19:31     ` atull
2016-09-28 18:21 ` [PATCH v19 02/12] doc: fpga-mgr: add fpga image info to api Alan Tull
2016-09-28 18:21 ` [PATCH v19 03/12] add bindings document for altera freeze bridge Alan Tull
2016-10-08 20:49   ` Rob Herring
2016-10-10 18:45     ` atull
2016-09-28 18:21 ` [PATCH v19 04/12] add sysfs document for fpga bridge class Alan Tull
2016-09-29 21:54   ` Moritz Fischer
2016-09-28 18:21 ` [PATCH v19 05/12] fpga-mgr: add fpga image information struct Alan Tull
2016-09-28 23:41   ` Moritz Fischer
2016-09-29  4:34     ` Alan Tull
2016-09-29 17:43       ` Michal Simek
2016-09-28 18:21 ` [PATCH v19 06/12] fpga: add fpga image information struct for socfpga support Alan Tull
2016-09-28 18:21 ` [PATCH v19 07/12] fpga: add fpga image information struct for zynq support Alan Tull
2016-09-28 18:21 ` [PATCH v19 08/12] fpga: add fpga bridge framework Alan Tull
2016-09-28 18:21 ` [PATCH v19 09/12] fpga: fpga-region: device tree control for FPGA Alan Tull
2016-09-28 18:21 ` [PATCH v19 10/12] ARM: socfpga: fpga bridge driver support Alan Tull
2016-09-28 18:21 ` [PATCH v19 11/12] fpga: add altera freeze bridge support Alan Tull
2016-09-28 18:22 ` [PATCH v19 12/12] fpga-manager: Add Socfpga Arria10 support Alan Tull
2016-09-29 16:49   ` Moritz Fischer
2016-09-29 21:35     ` 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=20160928182200.15800-1-atull@opensource.altera.com \
    --to=atull@opensource.altera.com \
    --cc=cyril.chemparathy@xilinx.com \
    --cc=delicious.quinoa@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dinguyen@opensource.altera.com \
    --cc=frowand.list@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=jcm@redhat.com \
    --cc=joshc@ni.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mgerlach@opensource.altera.com \
    --cc=michal.simek@xilinx.com \
    --cc=moritz.fischer@ettus.com \
    --cc=robh+dt@kernel.org \
    --cc=waltergoossens@home.nl \
    /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).