Skip to content

RFC Yet another stab at a fpga framework

Alan Tull linux-devicetree 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3fpga manager framework coredrivers/Kconfig drivers/Makefile drivers/fpga/Kconfig +3 more+550 -03 replies
2/3fpga bus driverdrivers/fpga/Kconfig drivers/fpga/Makefile drivers/fpga/bus.c +2 more+178 -10 replies
3/3fpga sysfs interfacedrivers/fpga/Kconfig drivers/fpga/Makefile drivers/fpga/fpga-mgr.c +2 more+90 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/3] Yet another stab at a fpga framework

The function of the framework is to provide consistent ways of programming raw images into FPGA's.

The core (fpga-mgr.c) does not include a userspace interface and just exports kernel functions.

This approach separates the core from the interfaces.

Each interface can be enabled or disabled in the defconfig.

Programming from device tree overlays is supported.

The core exports kernel functions to:
* write the fpga from a buffer or using the firmware layer
* get fpga status
* find a particular fpga manager from a device tree phandle
* register/unregister lower level fpga drivers.

The bus allows us to:
* program fpga from a device tree overlay using firmware.
* automatically reload firmware and reprogram fpga during resume.

The sysfs interface:
* read only, get the name and status of fpga manager.

I have a configfs interface patch which I haven't included, adds configfs as a separate file.

TODO:
* Enable bridges after fpga programming, disable during suspend

Examples are provided in the headers of the patches.

Alan Tull

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

 drivers/Kconfig          |    2 +
 drivers/Makefile         |    1 +
 drivers/fpga/Kconfig     |   27 +++
 drivers/fpga/Makefile    |   12 ++
 drivers/fpga/bus.c       |  139 +++++++++++++++
 drivers/fpga/fpga-mgr.c  |  431 ++++++++++++++++++++++++++++++++++++++++++++++
 drivers/fpga/sysfs.c     |   68 ++++++++
 include/linux/fpga-mgr.h |  137 +++++++++++++++
 8 files changed, 817 insertions(+)
 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 drivers/fpga/sysfs.c
 create mode 100644 include/linux/fpga-mgr.h
Signature · 1 line
1.7.9.5