[PATCH v2 0/3] FPGA Framework with DT and sysfs support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




From: Alan Tull <atull@xxxxxxxxxxxxxxxxxxxxx>

Followup to "Yet another stab at a fpga framework"
(https://lkml.org/lkml/2014/8/1/517)

One of the problems with writing this framework has been the
wide variety of use cases.  My perspective has mostly been
for a fpga bolted to a SoC.  Having said that, I really hope
this can be useful for as many uses as possible, while still
being integrated into the kernel in a way that is Linux-like.

Three basic methods of programming a FPGA are supported:
 * Load firmware using sysfs (see patch 0002 header for example)
 * Load firmware using Device Tree overlay (see patch 0003)
 * The core fpga-mgr.c exports enough functions for any driver
   to use to get the FPGA programmed.  If someone needs another
   interface, the core functions should give enough
   functionality to make that possible.

If the fpga is programmed using firmware, resume is supported.

Big looming problem in firmware class for us here is that FPGA
image files can easily be 10's to 100's of megabytes.  If we
have FPGA's that are chained, the image file for several FPGA's
is concatenated.  So then you can multiply that.

High level changes from previous version:
 * I went ahead and put the sysfs interface into the core
   although I think it could just as well be separate.
 * Rework the state/status stuff to stop the programming
   steps.  In the event of error, the state machine is left
   at a state with '_ERR' in its name. state is available
   in sysfs, including these error states.
 * Added ability to reset the FPGA from sysfs.  If people
   like this, let me know.  If not it may not be needed as
   that should happen in the normal programming steps.

bus.c adds support for programming from Device Tree overlays.
That code was tested from Pantelis' branch; the rest of this
was tested on for-next.

Alan


Alan Tull (3):
  fpga manager: add sysfs interface document
  fpga manager: framework core
  fpga manager: bus driver

 Documentation/ABI/testing/sysfs-class-fpga-manager |   38 ++
 drivers/Kconfig                                    |    2 +
 drivers/Makefile                                   |    1 +
 drivers/fpga/Kconfig                               |   28 +
 drivers/fpga/Makefile                              |   11 +
 drivers/fpga/bus.c                                 |  124 +++++
 drivers/fpga/fpga-mgr.c                            |  551 ++++++++++++++++++++
 include/linux/fpga-mgr.h                           |  117 +++++
 8 files changed, 872 insertions(+)
 create mode 100644 Documentation/ABI/testing/sysfs-class-fpga-manager
 create mode 100644 drivers/fpga/Kconfig
 create mode 100644 drivers/fpga/Makefile
 create mode 100644 drivers/fpga/bus.c
 create mode 100644 drivers/fpga/fpga-mgr.c
 create mode 100644 include/linux/fpga-mgr.h

-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux