[lkml]   [2017]   [Apr]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject[PATCH v2 00/16] Enable upper layers using FPGA region w/o device tree
The current FPGA layer has two problems which this
patchset addresses:

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

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

The major things this patchset accomplishes is:
* Change the fpga-mgr api to have one fpga_mgr_load functon
instead of three.

* Separate common FPGA region code from DT support

* Additions for using bridges where DT is not used.

The end result of this v2 is not hugely different from v1.
This patchset has > patches than v1, but that is because I respun
it to make it easier to see where I'm making code changes verses
where code is just moving to a different file. So there are a
lot of little patches that make code changes; these patches are
separate from the one big patch at the end that moves code
between .c files without making code changes.

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

Patch 2 adds non-dt support for fpga-bridges

Patches 3 and 4 change the FPGA manager API. The 3 functions
for programming an FPGA from a scatter-gather list, a contiguous
buffer, or a firmware file are replaced by a single function.
The parameters are placed in the fpga_image_info struct.
Functions to alloc/free a struct fpga_image_info are provided.
Getting a ref to a manager is separated from locking it.

Patches 5 to 16 separate FPGA region common code from FPGA region
support for Device Tree overlays. This allows FPGA regions to be
created by PCIe or other schemes. Region common code will
include two functions to register/unregister a region and one
function to program the region.

Changes from v1:
* 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
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 | 54 ++++
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 | 471 ++++-------------------------------
drivers/fpga/of-fpga-region.c | 493 +++++++++++++++++++++++++++++++++++++
include/linux/fpga/fpga-bridge.h | 7 +-
include/linux/fpga/fpga-mgr.h | 29 ++-
include/linux/fpga/fpga-region.h | 41 +++
12 files changed, 943 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


 \ /
  Last update: 2017-04-20 16:10    [W:0.209 / U:22.016 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site