Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1682638

[PATCH v3 00/16] Enable upper layers using FPGA region w/o device tree

From Alan Tull <atull@kernel.org>
Newsgroups linux.kernel
Subject [PATCH v3 00/16] Enable upper layers using FPGA region w/o device tree
Date 2017-07-06 20:50 +0200
Message-ID <u0k0F-Om-5@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


* Change the fpga-mgr API to have one fpga_mgr_load function
  instead of three.

* Expose API functions for FPGA region

* Separate common FPGA region code from Device Tree support

* Add API functions for bridges where DT is not used.

This is needed because the current FPGA layer has a couple of problems:

* We now have 3 functions for programming a FPGA, depending on whether
the image is in a sg list, a buffer, or firmware.  So upper layers
have to be written assuming where the image will be or will have to
write extra code to maintain flexibility.

* users who aren't using device tree are left to write their
own code that is essentially a rewrite of FPGA region.

Currently on the linux-fpga git repo as branch
next-20170615-fpga-region-api-v3

Patch 1 updates documentation and adds a FPGA region API doc.

Patch 2 adds non-dt support for fpga-bridges

Patch 3 changes the FPGA manager API, replacing the 3 FPGA load
functions with a single function that can handle whether the image
is a sg list, a contiguous buffer, or a firmware file.

Patch 4 separates getting a ref to a manager from locking it so
code can hang onto a ref without preventing other users from
using the manager to program a FPGA.

Patches 5 to 16 separate FPGA region common code from DT overlay
support and adds API functions.  Functional code changes are separated
into a bunch of little patches.  The last patch actually moves code to
of-fpga-region.c with only minor init/probe changes as this becomes
two modules.

I've tested this functionally for all patches separately.

Code changes from v3 are pretty small.

Changes in v3:
* rewrite fpga-region.txt
* fix bisect, test on each patch
* change fpga_region_program_fpga take only the region as a parameter
* update docs for fpga_region_program_fpga change

Changes in v2:
* split the final (large) patch into smaller patches for easier reviewability.
* documentation has been expanded
* reorder things, clean up
* dev_err instead of pr_err
* move functions that alloc/free image info from fpga-region.c to fpga-mgr.c
* move fpga-region.h to include/linux/fpga/
* add fpga_region_class_find to fpga-region.c
* move of_fpga_region_find to of-fpga-region.c

Alan Tull (16):
  doc: fpga: update documents for the FPGA API
  fpga: bridge: support getting bridge from device
  fpga: mgr: API change to replace fpga load functions with single
    function
  fpga: mgr: separate getting/locking FPGA manager
  fpga: region: use dev_err instead of pr_err
  fpga: region: remove unneeded of_node_get and put
  fpga: region: get mgr early on
  fpga: region: check for child regions before allocing image info
  fpga: region: fix slow warning with more than one overlay
  fpga: region: use image info as parameter for programming region
  fpga: region: separate out code that parses the overlay
  fpga: region: add fpga-region.h header
  fpga: region: rename some functions prior to moving
  fpga: region: add register/unregister functions
  fpga: region: add fpga_region_class_find
  fpga: region: move device tree support to of-fpga-region.c

 Documentation/fpga/fpga-mgr.txt    | 133 +++++-----
 Documentation/fpga/fpga-region.txt |  95 +++++++
 Documentation/fpga/overview.txt    |  23 ++
 drivers/fpga/Kconfig               |  13 +-
 drivers/fpga/Makefile              |   1 +
 drivers/fpga/fpga-bridge.c         | 110 +++++++--
 drivers/fpga/fpga-mgr.c            | 111 +++++++--
 drivers/fpga/fpga-region.c         | 463 ++++------------------------------
 drivers/fpga/of-fpga-region.c      | 495 +++++++++++++++++++++++++++++++++++++
 include/linux/fpga/fpga-bridge.h   |   7 +-
 include/linux/fpga/fpga-mgr.h      |  29 ++-
 include/linux/fpga/fpga-region.h   |  38 +++
 12 files changed, 975 insertions(+), 543 deletions(-)
 create mode 100644 Documentation/fpga/fpga-region.txt
 create mode 100644 Documentation/fpga/overview.txt
 create mode 100644 drivers/fpga/of-fpga-region.c
 create mode 100644 include/linux/fpga/fpga-region.h

-- 
2.7.4

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH v3 00/16] Enable upper layers using FPGA region w/o device tree Alan Tull <atull@kernel.org> - 2017-07-06 20:50 +0200
  [PATCH v3 10/16] fpga: region: use image info as parameter for programming region Alan Tull <atull@kernel.org> - 2017-07-06 20:50 +0200
  [PATCH v3 15/16] fpga: region: add fpga_region_class_find Alan Tull <atull@kernel.org> - 2017-07-06 20:50 +0200
  [PATCH v3 01/16] doc: fpga: update documents for the FPGA API Alan Tull <atull@kernel.org> - 2017-07-06 20:50 +0200
  [PATCH v3 08/16] fpga: region: check for child regions before allocing image info Alan Tull <atull@kernel.org> - 2017-07-06 20:50 +0200
  [PATCH v3 16/16] fpga: region: move device tree support to of-fpga-region.c Alan Tull <atull@kernel.org> - 2017-07-06 20:50 +0200
  [PATCH v3 12/16] fpga: region: add fpga-region.h header Alan Tull <atull@kernel.org> - 2017-07-06 20:50 +0200
  [PATCH v3 05/16] fpga: region: use dev_err instead of pr_err Alan Tull <atull@kernel.org> - 2017-07-06 20:50 +0200
  [PATCH v3 03/16] fpga: mgr: API change to replace fpga load functions with single function Alan Tull <atull@kernel.org> - 2017-07-06 20:50 +0200
    Re: [PATCH v3 03/16] fpga: mgr: API change to replace fpga load  functions with single function Moritz Fischer <moritz.fischer@ettus.com> - 2017-07-10 19:40 +0200
      Re: [PATCH v3 03/16] fpga: mgr: API change to replace fpga load  functions with single function Alan Tull <atull@kernel.org> - 2017-07-10 20:30 +0200
      Re: [PATCH v3 03/16] fpga: mgr: API change to replace fpga load  functions with single function Alan Tull <atull@kernel.org> - 2017-07-12 18:40 +0200
  [PATCH v3 04/16] fpga: mgr: separate getting/locking FPGA manager Alan Tull <atull@kernel.org> - 2017-07-06 21:00 +0200
  [PATCH v3 02/16] fpga: bridge: support getting bridge from device Alan Tull <atull@kernel.org> - 2017-07-06 21:00 +0200
  [PATCH v3 06/16] fpga: region: remove unneeded of_node_get and put Alan Tull <atull@kernel.org> - 2017-07-06 21:00 +0200

csiph-web