devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/3] FPGA Manager Framework
@ 2014-12-09 16:27 atull-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx
  2014-12-09 16:27 ` [PATCH v3 1/3] fpga manager: add sysfs interface document atull
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: atull-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx @ 2014-12-09 16:27 UTC (permalink / raw)
  To: gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
	jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/,
	hpa-YMNOUZJC4hwAvxtiuMwx3w, monstr-pSz03upnqPeHXe+LvDLADg,
	michal.simek-gjFFaj9aHVfQT0dZR+AlfA,
	rdunlap-wEGCiKHe2LqWVfeAwA7xHQ
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
	grant.likely-QSEj5FYQhm4dnm+yROfE0A, iws-lulEs6mt1IksTUYHLfqkUA,
	linux-doc-u79uwXL29TY76Z2rM5mHXA, pavel-ynQEQJNshbs,
	broonie-DgEjT+Ai2ygdnm+yROfE0A, philip-6RQC9ztksjxg9hUCZPvPmw,
	rubini-kaDoWcXyVrEAvxtiuMwx3w, s.trumtrar-bIcnvbaLZ9MEGnE8C9+IrQ,
	jason-NLaQJdtUoK4Be96aLqz0jA, kyle.teske-acOepvfBmUk,
	nico-QSEj5FYQhm4dnm+yROfE0A, balbi-l0cyMroinI0,
	m.chehab-Sze3O3UU22JBDgjK7y7TUQ, davidb-sgV2jX0FEOL9JmXXK+q4OQ,
	rob-VoJi6FS/r0vR7s880joybQ, davem-fT/PcQaiUtIeIZ0/mPfg9Q,
	cesarb-PWySMVKUnqmsTnJN9+BGXg, sameo-VuQAYsv1563Yd54FQh9/CA,
	akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b,
	linus.walleij-QSEj5FYQhm4dnm+yROfE0A,
	delicious.quinoa-Re5JQEeQqe8AvxtiuMwx3w,
	dinguyen-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx,
	yvanderv-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx, Alan Tull

From: Alan Tull <atull-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx@public.gmane.org>

Improvements in this version:

Fixed things in the framework that were left over from my original
version that was a character driver.  In particular, make the
struct device be present in the fpga_manager struct, not as a
pointer, so container_of will work.

Also rewrote the part that handles DT notifications.  Now this
section takes notifications instead of being another device to
load/unload.

Still want to integrate bridge enable/disable with this, but
that's not done yet.

Alan Tull (3):
  fpga manager: add sysfs interface document
  fpga manager: framework core
  fpga manager: device tree overlay support

 Documentation/ABI/testing/sysfs-class-fpga-manager |   38 ++
 drivers/Kconfig                                    |    2 +
 drivers/Makefile                                   |    1 +
 drivers/fpga/Kconfig                               |   28 +
 drivers/fpga/Makefile                              |   10 +
 drivers/fpga/fpga-mgr.c                            |  587 ++++++++++++++++++++
 include/linux/fpga-mgr.h                           |  107 ++++
 7 files changed, 773 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/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-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v3 1/3] fpga manager: add sysfs interface document
  2014-12-09 16:27 [PATCH v3 0/3] FPGA Manager Framework atull-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx
@ 2014-12-09 16:27 ` atull
  2014-12-09 16:28 ` [PATCH v3 2/3] fpga manager: framework core atull
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: atull @ 2014-12-09 16:27 UTC (permalink / raw)
  To: gregkh, jgunthorpe, hpa, monstr, michal.simek, rdunlap
  Cc: linux-kernel, devicetree, pantelis.antoniou, robh+dt,
	grant.likely, iws, linux-doc, pavel, broonie, philip, rubini,
	s.trumtrar, jason, kyle.teske, nico, balbi, m.chehab, davidb, rob,
	davem, cesarb, sameo, akpm, linus.walleij, delicious.quinoa,
	dinguyen, yvanderv, Alan Tull

From: Alan Tull <atull@opensource.altera.com>

Add documentation for new fpga manager sysfs interface.

Signed-off-by: Alan Tull <atull@opensource.altera.com>
---
 Documentation/ABI/testing/sysfs-class-fpga-manager |   38 ++++++++++++++++++++
 1 file changed, 38 insertions(+)
 create mode 100644 Documentation/ABI/testing/sysfs-class-fpga-manager

diff --git a/Documentation/ABI/testing/sysfs-class-fpga-manager b/Documentation/ABI/testing/sysfs-class-fpga-manager
new file mode 100644
index 0000000..eb600f2
--- /dev/null
+++ b/Documentation/ABI/testing/sysfs-class-fpga-manager
@@ -0,0 +1,38 @@
+What:		/sys/class/fpga_manager/<fpga>/name
+Date:		October 2014
+KernelVersion:	3.18
+Contact:	Alan Tull <atull@opensource.altera.com>
+Description:	Name of low level driver.
+
+What:		/sys/class/fpga_manager/<fpga>/firmware
+Date:		October 2014
+KernelVersion:	3.18
+Contact:	Alan Tull <atull@opensource.altera.com>
+Description:	Name of the FPGA image file to load using firmware class.
+
+What:		/sys/class/fpga_manager/<fpga>/reset
+Date:		October 2014
+KernelVersion:	3.18
+Contact:	Alan Tull <atull@opensource.altera.com>
+Description:	Write 1 to reset the FPGA
+
+What:		/sys/class/fpga_manager/<fpga>/state
+Date:		October 2014
+KernelVersion:	3.18
+Contact:	Alan Tull <atull@opensource.altera.com>
+Description:	Read state of fpga framework state machine as a string.
+		Valid states may vary by manufacturer; superset is:
+		* unknown		= can't determine state
+		* power_off		= FPGA power is off
+		* power_up		= FPGA reports power is up
+		* reset			= FPGA held in reset state
+		* firmware_request	= firmware class request in progress
+		* firmware_request_err	= firmware request failed
+		* write_init		= FPGA being prepared for programming
+		* write_init_err	= Error while preparing FPGA for
+					  programming
+		* write			= FPGA ready to receive image data
+		* write_err		= Error while programming
+		* write_complete	= Doing post programming steps
+		* write_complete_err	= Error while doing post programming
+		* operating		= FPGA is programmed and operating
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v3 2/3] fpga manager: framework core
  2014-12-09 16:27 [PATCH v3 0/3] FPGA Manager Framework atull-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx
  2014-12-09 16:27 ` [PATCH v3 1/3] fpga manager: add sysfs interface document atull
@ 2014-12-09 16:28 ` atull
       [not found] ` <1418142481-6167-1-git-send-email-atull-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx@public.gmane.org>
  2014-12-09 18:40 ` [PATCH v3 0/3] FPGA Manager Framework atull
  3 siblings, 0 replies; 5+ messages in thread
From: atull @ 2014-12-09 16:28 UTC (permalink / raw)
  To: gregkh, jgunthorpe, hpa, monstr, michal.simek, rdunlap
  Cc: linux-kernel, devicetree, pantelis.antoniou, robh+dt,
	grant.likely, iws, linux-doc, pavel, broonie, philip, rubini,
	s.trumtrar, jason, kyle.teske, nico, balbi, m.chehab, davidb, rob,
	davem, cesarb, sameo, akpm, linus.walleij, delicious.quinoa,
	dinguyen, yvanderv, Alan Tull

From: Alan Tull <atull@opensource.altera.com>

Supports standard ops for low level FPGA drivers.
Various manufacturors' FPGAs can be supported by adding low
level drivers.  Each driver needs to register its ops
using fpga_mgr_register().

Exports methods of doing operations to program  FPGAs. These
should be sufficient for individual drivers to request FPGA
programming directly if desired.

Adds a sysfs interface.  The sysfs interface can be compiled out
where desired in production builds.

Resume is supported by calling low level driver's resume
function, then reloading the firmware image.

The following are exported as GPL:
* fpga_mgr_reset
   Reset the FGPA.

* fpga_mgr_write
   Write a image (in buffer) to the FPGA.

* fpga_mgr_firmware_write
   Request firmware by file name and write it to the FPGA.

* fpga_mgr_name
   Get name of FPGA manager.

* fpga_mgr_state
   Get a state of framework as a string.

* fpga_mgr_register and fpga_mgr_remove
   Register/unregister low level fpga manager driver.

The following sysfs files are created:
* /sys/class/fpga_manager/<fpga>/name
  Name of low level driver.

* /sys/class/fpga_manager/<fpga>/firmware
  Name of FPGA image file to load using firmware class.
  $ echo image.rbf > /sys/class/fpga_manager/<fpga>/firmware

  read: read back name of image file previous loaded
  $ cat /sys/class/fpga_manager/<fpga>/firmware

* /sys/class/fpga_manager/<fpga>/reset
  reset the FPGA
  $ echo 1 > /sys/class/fpga_manager/<fpga>/reset

* /sys/class/fpga_manager/<fpga>/state
  State of fpga framework state machine

Signed-off-by: Alan Tull <atull@opensource.altera.com>
---
v2: s/mangager/manager/
    check for invalid request_nr
    add fpga reset interface
    rework the state code
    remove FPGA_MGR_FAIL flag
    add _ERR states to fpga manager states enum
    low level state op now returns a state enum value
    initialize framework state from driver state op
    remove unused fpga read stuff
    merge sysfs.c into fpga-mgr.c
    move suspend/resume from bus.c to fpga-mgr.c

v3: Add struct device to fpga_manager (not as a pointer)
    Add to_fpga_manager
    Don't get irq in fpga-mgr.c (let low level driver do it)
    remove from struct fpga_manager: nr, np, parent
    get rid of fpga_mgr_get_new_minor()
    simplify fpga_manager_register:
      reorder parameters
      use dev instead of pdev
    get rid of code that used to make more sense when this
      was a char driver, don't alloc_chrdev_region
    use a mutex instead of flags
---
 drivers/Kconfig          |    2 +
 drivers/Makefile         |    1 +
 drivers/fpga/Kconfig     |   21 ++
 drivers/fpga/Makefile    |   10 +
 drivers/fpga/fpga-mgr.c  |  485 ++++++++++++++++++++++++++++++++++++++++++++++
 include/linux/fpga-mgr.h |  104 ++++++++++
 6 files changed, 623 insertions(+)
 create mode 100644 drivers/fpga/Kconfig
 create mode 100644 drivers/fpga/Makefile
 create mode 100644 drivers/fpga/fpga-mgr.c
 create mode 100644 include/linux/fpga-mgr.h

diff --git a/drivers/Kconfig b/drivers/Kconfig
index 622fa26..fc45fee 100644
--- a/drivers/Kconfig
+++ b/drivers/Kconfig
@@ -34,6 +34,8 @@ source "drivers/message/fusion/Kconfig"
 
 source "drivers/firewire/Kconfig"
 
+source "drivers/fpga/Kconfig"
+
 source "drivers/message/i2o/Kconfig"
 
 source "drivers/macintosh/Kconfig"
diff --git a/drivers/Makefile b/drivers/Makefile
index ebee555..637b9f0 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -49,6 +49,7 @@ obj-$(CONFIG_RESET_CONTROLLER)	+= reset/
 # default.
 obj-y				+= tty/
 obj-y				+= char/
+obj-$(CONFIG_FPGA)		+= fpga/
 
 # gpu/ comes after char for AGP vs DRM startup
 obj-y				+= gpu/
diff --git a/drivers/fpga/Kconfig b/drivers/fpga/Kconfig
new file mode 100644
index 0000000..e775b17
--- /dev/null
+++ b/drivers/fpga/Kconfig
@@ -0,0 +1,21 @@
+#
+# FPGA framework configuration
+#
+
+menu "FPGA devices"
+
+config FPGA
+	tristate "FPGA Framework"
+	help
+	  Say Y here if you want support for configuring FPGAs from the
+	  kernel.  The FPGA framework adds a FPGA manager class and FPGA
+	  manager drivers.
+
+config FPGA_MGR_SYSFS
+	bool "FPGA Manager SysFS Interface"
+	depends on FPGA
+	depends on SYSFS
+	help
+	  FPGA Manager SysFS interface.
+
+endmenu
diff --git a/drivers/fpga/Makefile b/drivers/fpga/Makefile
new file mode 100644
index 0000000..c8a676f
--- /dev/null
+++ b/drivers/fpga/Makefile
@@ -0,0 +1,10 @@
+#
+# Makefile for the fpga framework and fpga manager drivers.
+#
+
+fpga-mgr-core-y += fpga-mgr.o
+
+# Core FPGA Manager Framework
+obj-$(CONFIG_FPGA)			+= fpga-mgr-core.o
+
+# FPGA Manager Drivers
diff --git a/drivers/fpga/fpga-mgr.c b/drivers/fpga/fpga-mgr.c
new file mode 100644
index 0000000..d08cb82
--- /dev/null
+++ b/drivers/fpga/fpga-mgr.c
@@ -0,0 +1,485 @@
+/*
+ * FPGA Manager Core
+ *
+ *  Copyright (C) 2013-2014 Altera Corporation
+ *
+ * With code from the mailing list:
+ * Copyright (C) 2013 Xilinx, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+#include <linux/delay.h>
+#include <linux/firmware.h>
+#include <linux/fpga-mgr.h>
+#include <linux/fs.h>
+#include <linux/idr.h>
+#include <linux/interrupt.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/mutex.h>
+#include <linux/pm.h>
+#include <linux/slab.h>
+#include <linux/vmalloc.h>
+
+static DEFINE_MUTEX(fpga_mgr_mutex);
+static DEFINE_IDA(fpga_mgr_ida);
+static struct class *fpga_mgr_class;
+
+static LIST_HEAD(fpga_manager_list);
+
+/*
+ * Get FPGA state from low level driver
+ * return value is same enum as fpga_mgr_framework_state
+ *
+ * This will be used to initialize framework state
+ */
+int fpga_mgr_low_level_state(struct fpga_manager *mgr)
+{
+	if (!mgr || !mgr->mops || !mgr->mops->state)
+		return FPGA_MGR_STATE_UNKNOWN;
+
+	return mgr->mops->state(mgr);
+}
+
+/*
+ * Unlocked version
+ */
+static int __fpga_mgr_reset(struct fpga_manager *mgr)
+{
+	int ret;
+
+	if (!mgr->mops->reset)
+		return -EINVAL;
+
+	ret = mgr->mops->reset(mgr);
+
+	mgr->state = fpga_mgr_low_level_state(mgr);
+
+	return ret;
+}
+
+int fpga_mgr_reset(struct fpga_manager *mgr)
+{
+	int ret;
+
+	if (!mutex_trylock(&mgr->lock))
+		return -EBUSY;
+
+	ret = __fpga_mgr_reset(mgr);
+
+	mutex_unlock(&mgr->lock);
+
+	return ret;
+}
+EXPORT_SYMBOL_GPL(fpga_mgr_reset);
+
+/*
+ * Unlocked
+ */
+static int __fpga_mgr_stage_write_init(struct fpga_manager *mgr)
+{
+	int ret;
+
+	if (mgr->mops->write_init) {
+		mgr->state = FPGA_MGR_STATE_WRITE_INIT;
+		ret = mgr->mops->write_init(mgr);
+		if (ret) {
+			mgr->state = FPGA_MGR_STATE_WRITE_INIT_ERR;
+			return ret;
+		}
+	}
+
+	return 0;
+}
+
+static int __fpga_mgr_stage_write(struct fpga_manager *mgr, const char *buf,
+				  size_t count)
+{
+	int ret;
+
+	mgr->state = FPGA_MGR_STATE_WRITE;
+	ret = mgr->mops->write(mgr, buf, count);
+	if (ret) {
+		mgr->state = FPGA_MGR_STATE_WRITE_ERR;
+		return ret;
+	}
+
+	return 0;
+}
+
+static int __fpga_mgr_stage_write_complete(struct fpga_manager *mgr)
+{
+	int ret;
+
+	if (mgr->mops->write_complete) {
+		mgr->state = FPGA_MGR_STATE_WRITE_COMPLETE;
+		ret = mgr->mops->write_complete(mgr);
+		if (ret) {
+			mgr->state = FPGA_MGR_STATE_WRITE_COMPLETE_ERR;
+			return ret;
+		}
+	}
+
+	mgr->state = fpga_mgr_low_level_state(mgr);
+
+	return 0;
+}
+
+static int __fpga_mgr_write(struct fpga_manager *mgr, const char *buf,
+			    size_t count)
+{
+	int ret;
+
+	ret = __fpga_mgr_stage_write_init(mgr);
+	if (ret)
+		return ret;
+
+	ret = __fpga_mgr_stage_write(mgr, buf, count);
+	if (ret)
+		return ret;
+
+	return __fpga_mgr_stage_write_complete(mgr);
+}
+
+int fpga_mgr_write(struct fpga_manager *mgr, const char *buf, size_t count)
+{
+	int ret;
+
+	if (!mutex_trylock(&mgr->lock))
+		return -EBUSY;
+
+	dev_info(&mgr->dev, "writing buffer to %s\n", mgr->name);
+
+	ret = __fpga_mgr_write(mgr, buf, count);
+	mutex_unlock(&mgr->lock);
+
+	return ret;
+}
+EXPORT_SYMBOL_GPL(fpga_mgr_write);
+
+/*
+ * Grab lock, request firmware, and write out to the FPGA.
+ * Update the state before each step to provide info on what step
+ * failed if there is a failure.
+ */
+int fpga_mgr_firmware_write(struct fpga_manager *mgr, const char *image_name)
+{
+	const struct firmware *fw;
+	int ret;
+
+	if (!mutex_trylock(&mgr->lock))
+		return -EBUSY;
+
+	dev_info(&mgr->dev, "writing %s to %s\n", image_name, mgr->name);
+
+	mgr->state = FPGA_MGR_STATE_FIRMWARE_REQ;
+	ret = request_firmware(&fw, image_name, &mgr->dev);
+	if (ret) {
+		mgr->state = FPGA_MGR_STATE_FIRMWARE_REQ_ERR;
+		goto fw_wr_exit;
+	}
+
+	ret = __fpga_mgr_write(mgr, fw->data, fw->size);
+	if (ret)
+		goto fw_wr_exit;
+
+	strcpy(mgr->image_name, image_name);
+
+fw_wr_exit:
+	mutex_unlock(&mgr->lock);
+
+	return ret;
+}
+EXPORT_SYMBOL_GPL(fpga_mgr_firmware_write);
+
+int fpga_mgr_name(struct fpga_manager *mgr, char *buf)
+{
+	if (!mgr)
+		return -ENODEV;
+
+	return sprintf(buf, "%s\n", mgr->name);
+}
+EXPORT_SYMBOL_GPL(fpga_mgr_name);
+
+#if IS_ENABLED(CONFIG_FPGA_MGR_SYSFS)
+const char *state_str[] = {
+	[FPGA_MGR_STATE_UNKNOWN] =		"unknown",
+	[FPGA_MGR_STATE_POWER_OFF] =		"power_off",
+	[FPGA_MGR_STATE_POWER_UP] =		"power_up",
+	[FPGA_MGR_STATE_RESET] =		"reset",
+
+	/* write sequence */
+	[FPGA_MGR_STATE_FIRMWARE_REQ] =		"firmware_request",
+	[FPGA_MGR_STATE_FIRMWARE_REQ_ERR] =	"firmware_request_err",
+	[FPGA_MGR_STATE_WRITE_INIT] =		"write_init",
+	[FPGA_MGR_STATE_WRITE_INIT_ERR] =	"write_init_err",
+	[FPGA_MGR_STATE_WRITE] =		"write",
+	[FPGA_MGR_STATE_WRITE_ERR] =		"write_err",
+	[FPGA_MGR_STATE_WRITE_COMPLETE] =	"write_complete",
+	[FPGA_MGR_STATE_WRITE_COMPLETE_ERR] =	"write_complete_err",
+
+	[FPGA_MGR_STATE_OPERATING] =		"operating",
+};
+
+/*
+ * class attributes
+ */
+static ssize_t fpga_mgr_name_show(struct device *dev,
+				  struct device_attribute *attr, char *buf)
+{
+	struct fpga_manager *mgr = to_fpga_manager(dev);
+
+	return fpga_mgr_name(mgr, buf);
+}
+
+static ssize_t fpga_mgr_state_show(struct device *dev,
+				   struct device_attribute *attr, char *buf)
+{
+	struct fpga_manager *mgr = to_fpga_manager(dev);
+
+	return sprintf(buf, "%s\n", state_str[mgr->state]);
+}
+
+static ssize_t fpga_mgr_firmware_show(struct device *dev,
+				      struct device_attribute *attr, char *buf)
+{
+	struct fpga_manager *mgr = to_fpga_manager(dev);
+
+	return sprintf(buf, "%s\n", mgr->image_name);
+}
+
+static ssize_t fpga_mgr_firmware_store(struct device *dev,
+				       struct device_attribute *attr,
+				       const char *buf, size_t count)
+{
+	struct fpga_manager *mgr = to_fpga_manager(dev);
+	unsigned int len;
+	char image_name[NAME_MAX];
+	int ret;
+
+	/* lose terminating \n */
+	strcpy(image_name, buf);
+	len = strlen(image_name);
+	if (image_name[len - 1] == '\n')
+		image_name[len - 1] = 0;
+
+	ret = fpga_mgr_firmware_write(mgr, image_name);
+	if (ret)
+		return ret;
+
+	return count;
+}
+
+static ssize_t fpga_mgr_reset_store(struct device *dev,
+				    struct device_attribute *attr,
+				    const char *buf, size_t count)
+{
+	struct fpga_manager *mgr = to_fpga_manager(dev);
+	unsigned long val;
+	int ret;
+
+	ret = kstrtoul(buf, 0, &val);
+	if (ret)
+		return ret;
+
+	if (val == 1) {
+		ret = fpga_mgr_reset(mgr);
+		if (ret)
+			return ret;
+	} else {
+		return -EINVAL;
+	}
+
+	return count;
+}
+
+static DEVICE_ATTR(name, S_IRUGO, fpga_mgr_name_show, NULL);
+static DEVICE_ATTR(state, S_IRUGO, fpga_mgr_state_show, NULL);
+static DEVICE_ATTR(firmware, S_IRUGO | S_IWUSR,
+		   fpga_mgr_firmware_show, fpga_mgr_firmware_store);
+static DEVICE_ATTR(reset, S_IWUSR, NULL, fpga_mgr_reset_store);
+
+static struct attribute *fpga_mgr_attrs[] = {
+	&dev_attr_name.attr,
+	&dev_attr_state.attr,
+	&dev_attr_firmware.attr,
+	&dev_attr_reset.attr,
+	NULL,
+};
+
+static const struct attribute_group fpga_mgr_group = {
+	.attrs = fpga_mgr_attrs,
+};
+
+const struct attribute_group *fpga_mgr_groups[] = {
+	&fpga_mgr_group,
+	NULL,
+};
+#else
+#define fpga_mgr_groups NULL
+#endif /* CONFIG_FPGA_MGR_SYSFS */
+
+static int fpga_mgr_suspend(struct device *dev)
+{
+	struct fpga_manager *mgr = to_fpga_manager(dev);
+
+	if (!mgr)
+		return -ENODEV;
+
+	if (mgr->mops->suspend)
+		return mgr->mops->suspend(mgr);
+
+	return 0;
+}
+
+static int fpga_mgr_resume(struct device *dev)
+{
+	struct fpga_manager *mgr = to_fpga_manager(dev);
+	int ret = 0;
+
+	if (!mgr)
+		return -ENODEV;
+
+	if (mgr->mops->resume) {
+		ret = mgr->mops->resume(mgr);
+		if (ret)
+			return ret;
+	}
+
+	if (strlen(mgr->image_name) != 0)
+		fpga_mgr_firmware_write(mgr, mgr->image_name);
+
+	return 0;
+}
+
+const struct dev_pm_ops fpga_mgr_dev_pm_ops = {
+	.suspend	= fpga_mgr_suspend,
+	.resume		= fpga_mgr_resume,
+};
+
+static void fpga_mgr_dev_release(struct device *dev)
+{
+	struct fpga_manager *mgr = to_fpga_manager(dev);
+
+	dev_dbg(dev, "releasing '%s'\n", dev_name(dev));
+	kfree(mgr);
+}
+
+int fpga_mgr_register(struct device *dev, const char *name,
+		      struct fpga_manager_ops *mops,
+		      void *priv)
+{
+	struct fpga_manager *mgr;
+	int id, ret;
+
+	BUG_ON(!mops || !name || !strlen(name));
+
+	id = ida_simple_get(&fpga_mgr_ida, 0, 0, GFP_KERNEL);
+	if (id < 0)
+		return id;
+
+	mgr = kzalloc(sizeof(*mgr), GFP_KERNEL);
+	if (!mgr)
+		return -ENOMEM;
+
+	mutex_init(&mgr->lock);
+
+	mgr->name = name;
+	mgr->mops = mops;
+	mgr->priv = priv;
+
+	/*
+	 * Initialize framework state by requesting low level driver read state
+	 * from device.  FPGA may be in reset mode or may have been programmed
+	 * by bootloader or EEPROM.
+	 */
+	mgr->state = fpga_mgr_low_level_state(mgr);
+
+	INIT_LIST_HEAD(&mgr->list);
+	mutex_lock(&fpga_mgr_mutex);
+	list_add(&mgr->list, &fpga_manager_list);
+	mutex_unlock(&fpga_mgr_mutex);
+
+	device_initialize(&mgr->dev);
+	mgr->dev.class = fpga_mgr_class;
+	mgr->dev.parent = dev;
+	mgr->dev.of_node = dev->of_node;
+	mgr->dev.release = fpga_mgr_dev_release;
+	mgr->dev.id = id;
+	dev_set_name(&mgr->dev, "%d", id);
+	ret = device_add(&mgr->dev);
+	if (ret)
+		goto error_device;
+
+	dev_info(&mgr->dev, "fpga manager [%s] registered as id %d\n",
+		 dev_name(&mgr->dev), id);
+
+	return 0;
+
+error_device:
+	ida_simple_remove(&fpga_mgr_ida, id);
+	kfree(mgr);
+
+	return ret;
+}
+EXPORT_SYMBOL_GPL(fpga_mgr_register);
+
+void fpga_mgr_remove(struct device *dev)
+{
+	struct fpga_manager *mgr = to_fpga_manager(dev);
+	int id;
+
+	if (mgr)
+		id = mgr->dev.id;
+
+	device_unregister(dev);
+
+	if (mgr) {
+		if (mgr->mops->fpga_remove)
+			mgr->mops->fpga_remove(mgr);
+
+		mutex_lock(&fpga_mgr_mutex);
+		list_del(&mgr->list);
+		mutex_unlock(&fpga_mgr_mutex);
+		kfree(mgr);
+		ida_simple_remove(&fpga_mgr_ida, id);
+	}
+}
+EXPORT_SYMBOL_GPL(fpga_mgr_remove);
+
+static int __init fpga_mgr_dev_init(void)
+{
+	pr_info("FPGA Manager framework driver\n");
+
+	fpga_mgr_class = class_create(THIS_MODULE, "fpga_manager");
+	if (IS_ERR(fpga_mgr_class))
+		return PTR_ERR(fpga_mgr_class);
+
+	fpga_mgr_class->dev_groups = fpga_mgr_groups;
+	fpga_mgr_class->pm = &fpga_mgr_dev_pm_ops;
+
+	return 0;
+}
+
+static void __exit fpga_mgr_dev_exit(void)
+{
+	class_destroy(fpga_mgr_class);
+	ida_destroy(&fpga_mgr_ida);
+}
+
+MODULE_AUTHOR("Alan Tull <atull@opensource.altera.com>");
+MODULE_DESCRIPTION("FPGA Manager framework driver");
+MODULE_LICENSE("GPL v2");
+
+subsys_initcall(fpga_mgr_dev_init);
+module_exit(fpga_mgr_dev_exit);
diff --git a/include/linux/fpga-mgr.h b/include/linux/fpga-mgr.h
new file mode 100644
index 0000000..7ac762c
--- /dev/null
+++ b/include/linux/fpga-mgr.h
@@ -0,0 +1,104 @@
+/*
+ * FPGA Framework
+ *
+ *  Copyright (C) 2013-2014 Altera Corporation
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+#include <linux/device.h>
+#include <linux/interrupt.h>
+#include <linux/limits.h>
+#include <linux/mutex.h>
+#include <linux/of.h>
+#include <linux/platform_device.h>
+
+#ifndef _LINUX_FPGA_MGR_H
+#define _LINUX_FPGA_MGR_H
+
+struct fpga_manager;
+
+/*
+ * fpga_manager_ops are the low level functions implemented by a specific
+ * fpga manager driver.  Leaving any of these out that aren't needed is fine
+ * as they are all tested for NULL before being called.
+ */
+struct fpga_manager_ops {
+	/* Returns an enum value of the FPGA's state */
+	int (*state)(struct fpga_manager *mgr);
+
+	/* Put FPGA into reset state */
+	int (*reset)(struct fpga_manager *mgr);
+
+	/* Prepare the FPGA to receive confuration data */
+	int (*write_init)(struct fpga_manager *mgr);
+
+	/* Write count bytes of configuration data to the FPGA */
+	int (*write)(struct fpga_manager *mgr, const char *buf, size_t count);
+
+	/* Return FPGA to default state after writing is done */
+	int (*write_complete)(struct fpga_manager *mgr);
+
+	/* Optional: Set FPGA into a specific state during driver remove */
+	void (*fpga_remove)(struct fpga_manager *mgr);
+
+	int (*suspend)(struct fpga_manager *mgr);
+
+	int (*resume)(struct fpga_manager *mgr);
+};
+
+/* Valid states may vary by manufacturer; superset is: */
+enum fpga_mgr_states {
+	FPGA_MGR_STATE_UNKNOWN,		/* can't determine state */
+	FPGA_MGR_STATE_POWER_OFF,	/* FPGA power is off */
+	FPGA_MGR_STATE_POWER_UP,	/* FPGA reports power is up */
+	FPGA_MGR_STATE_RESET,		/* FPGA held in reset state */
+
+	/* write sequence */
+	FPGA_MGR_STATE_FIRMWARE_REQ,	/* firmware request in progress */
+	FPGA_MGR_STATE_FIRMWARE_REQ_ERR, /* firmware request failed */
+	FPGA_MGR_STATE_WRITE_INIT,	/* preparing FPGA for programming */
+	FPGA_MGR_STATE_WRITE_INIT_ERR,	/* Error during write_init stage */
+	FPGA_MGR_STATE_WRITE,		/* FPGA ready to receive image data */
+	FPGA_MGR_STATE_WRITE_ERR,	/* Error while programming FPGA */
+	FPGA_MGR_STATE_WRITE_COMPLETE,	/* Doing post programming steps */
+	FPGA_MGR_STATE_WRITE_COMPLETE_ERR, /* Error during write_complete */
+
+	FPGA_MGR_STATE_OPERATING,	/* FPGA is programmed and operating */
+};
+
+struct fpga_manager {
+	const char *name;
+	struct device dev;
+	struct list_head list;
+	struct mutex lock;
+	enum fpga_mgr_states state;
+	char image_name[NAME_MAX];
+
+	struct fpga_manager_ops *mops;
+	void *priv;
+};
+
+#define to_fpga_manager(d) container_of(d, struct fpga_manager, dev)
+
+#if IS_ENABLED(CONFIG_FPGA)
+
+int fpga_mgr_firmware_write(struct fpga_manager *mgr, const char *image_name);
+int fpga_mgr_write(struct fpga_manager *mgr, const char *buf, size_t count);
+int fpga_mgr_name(struct fpga_manager *mgr, char *buf);
+int fpga_mgr_reset(struct fpga_manager *mgr);
+int fpga_mgr_register(struct device *pdev, const char *name,
+		      struct fpga_manager_ops *mops, void *priv);
+void fpga_mgr_remove(struct device *dev);
+
+#endif /* CONFIG_FPGA */
+#endif /*_LINUX_FPGA_MGR_H */
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH v3 3/3] fpga manager: device tree overlay support
       [not found] ` <1418142481-6167-1-git-send-email-atull-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx@public.gmane.org>
@ 2014-12-09 16:28   ` atull-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx
  0 siblings, 0 replies; 5+ messages in thread
From: atull-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx @ 2014-12-09 16:28 UTC (permalink / raw)
  To: gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
	jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/,
	hpa-YMNOUZJC4hwAvxtiuMwx3w, monstr-pSz03upnqPeHXe+LvDLADg,
	michal.simek-gjFFaj9aHVfQT0dZR+AlfA,
	rdunlap-wEGCiKHe2LqWVfeAwA7xHQ
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w,
	robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
	grant.likely-QSEj5FYQhm4dnm+yROfE0A, iws-lulEs6mt1IksTUYHLfqkUA,
	linux-doc-u79uwXL29TY76Z2rM5mHXA, pavel-ynQEQJNshbs,
	broonie-DgEjT+Ai2ygdnm+yROfE0A, philip-6RQC9ztksjxg9hUCZPvPmw,
	rubini-kaDoWcXyVrEAvxtiuMwx3w, s.trumtrar-bIcnvbaLZ9MEGnE8C9+IrQ,
	jason-NLaQJdtUoK4Be96aLqz0jA, kyle.teske-acOepvfBmUk,
	nico-QSEj5FYQhm4dnm+yROfE0A, balbi-l0cyMroinI0,
	m.chehab-Sze3O3UU22JBDgjK7y7TUQ, davidb-sgV2jX0FEOL9JmXXK+q4OQ,
	rob-VoJi6FS/r0vR7s880joybQ, davem-fT/PcQaiUtIeIZ0/mPfg9Q,
	cesarb-PWySMVKUnqmsTnJN9+BGXg, sameo-VuQAYsv1563Yd54FQh9/CA,
	akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b,
	linus.walleij-QSEj5FYQhm4dnm+yROfE0A,
	delicious.quinoa-Re5JQEeQqe8AvxtiuMwx3w,
	dinguyen-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx,
	yvanderv-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx, Alan Tull

From: Alan Tull <atull-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx@public.gmane.org>

Support programming the fpga from device tree overlays.

This patch adds two exported functions to the core
(fpga-mgr.c):
  of_fpga_mgr_dev_lookup
    Get pointer to fpga manager struct given a phandle.

  of_find_fpga_mgr_by_node
    Get pointer to fpga manager given device node

This code is dependent on Pantelis Antoniou's current work
on Device Tree overlays, a method of dynamically altering
the kernel's live Device Tree.  The rest of the patchset was
tested with recent for-next, but this 'bus driver' patch was
tested with Pantelis's and Grant Likely's stuff that is in git
(his git repo https://github.com/pantoniou/linux-beagle-track-mainline
 v3.17-rc2-115-gbc778b8 == dt-ng/bbb) plus some dtc fixups
for compiling overlays.

TODO: Integrate bridge support

General flow is:
1. Load a DT overlay
2. This causes the FPGA to get programmed
3. TODO - enable FPGA bridges
4. Drivers get probed

The reverse flow is also supported:
1. Remove the DT overlay
2. Drivers get removed
3. TODO - disable FPGA bridges
4. FPGA gets reset

Signed-off-by: Alan Tull <atull-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx@public.gmane.org>
---
 drivers/fpga/Kconfig     |    7 ++++
 drivers/fpga/fpga-mgr.c  |  104 +++++++++++++++++++++++++++++++++++++++++++++-
 include/linux/fpga-mgr.h |    3 ++
 3 files changed, 113 insertions(+), 1 deletion(-)

diff --git a/drivers/fpga/Kconfig b/drivers/fpga/Kconfig
index e775b17..2bd6c83 100644
--- a/drivers/fpga/Kconfig
+++ b/drivers/fpga/Kconfig
@@ -18,4 +18,11 @@ config FPGA_MGR_SYSFS
 	help
 	  FPGA Manager SysFS interface.
 
+config FPGA_MGR_BUS
+	bool "FPGA Manager Bus"
+	depends on FPGA
+	help
+	  FPGA Manager Bus interface.  Allows loading FPGA images
+	  from Device Tree or from other drivers.
+
 endmenu
diff --git a/drivers/fpga/fpga-mgr.c b/drivers/fpga/fpga-mgr.c
index d08cb82..6f9c196 100644
--- a/drivers/fpga/fpga-mgr.c
+++ b/drivers/fpga/fpga-mgr.c
@@ -36,6 +36,7 @@ static DEFINE_IDA(fpga_mgr_ida);
 static struct class *fpga_mgr_class;
 
 static LIST_HEAD(fpga_manager_list);
+static struct notifier_block fpga_mgr_of_notifier_block;
 
 /*
  * Get FPGA state from low level driver
@@ -186,12 +187,17 @@ int fpga_mgr_firmware_write(struct fpga_manager *mgr, const char *image_name)
 	ret = request_firmware(&fw, image_name, &mgr->dev);
 	if (ret) {
 		mgr->state = FPGA_MGR_STATE_FIRMWARE_REQ_ERR;
+		dev_dbg(&mgr->dev, "Error requesting firmware %s\n",
+			image_name);
 		goto fw_wr_exit;
 	}
 
 	ret = __fpga_mgr_write(mgr, fw->data, fw->size);
-	if (ret)
+	if (ret) {
+		dev_dbg(&mgr->dev, "Error writing %s to %s\n",
+			image_name, mgr->name);
 		goto fw_wr_exit;
+	}
 
 	strcpy(mgr->image_name, image_name);
 
@@ -367,6 +373,87 @@ const struct dev_pm_ops fpga_mgr_dev_pm_ops = {
 	.resume		= fpga_mgr_resume,
 };
 
+#if IS_ENABLED(CONFIG_OF)
+/* Find the fpga manager that is pointed to by a phandle */
+struct fpga_manager *of_fpga_mgr_dev_lookup(struct device_node *node,
+					    const char *mgr_property)
+{
+	struct fpga_manager *mgr;
+	struct device_node *mgr_node;
+
+	if (node == NULL)
+		return NULL;
+
+	mgr_node = of_parse_phandle(node, mgr_property, 0);
+	if (!mgr_node)
+		return NULL;
+
+	list_for_each_entry(mgr, &fpga_manager_list, list)
+		if (mgr_node == mgr->dev.of_node) {
+			of_node_put(mgr_node);
+			return mgr;
+		}
+
+	of_node_put(mgr_node);
+
+	return NULL;
+}
+EXPORT_SYMBOL_GPL(of_fpga_mgr_dev_lookup);
+
+struct fpga_manager *of_find_fpga_mgr_by_node(struct device_node *node)
+{
+	struct fpga_manager *mgr;
+
+	if (node == NULL)
+		return NULL;
+
+	list_for_each_entry(mgr, &fpga_manager_list, list)
+		if (node == mgr->dev.of_node)
+			return mgr;
+
+	return NULL;
+}
+EXPORT_SYMBOL_GPL(of_find_fpga_mgr_by_node);
+#endif	/* CONFIG_OF */
+
+static int of_fpga_mgr_notify(struct notifier_block *nb, unsigned long action,
+			      void *arg)
+{
+	struct device_node *dn;
+	const char *path;
+	struct fpga_manager *mgr;
+	int state;
+
+	state = of_reconfig_get_state_change(action, arg);
+	if (state == -1)
+		return NOTIFY_OK;
+
+	switch (action) {
+	case OF_RECONFIG_ATTACH_NODE:
+	case OF_RECONFIG_DETACH_NODE:
+		dn = arg;
+		break;
+	case OF_RECONFIG_ADD_PROPERTY:
+	case OF_RECONFIG_REMOVE_PROPERTY:
+	case OF_RECONFIG_UPDATE_PROPERTY:
+	default:
+		return NOTIFY_OK;
+	}
+
+	mgr = of_find_fpga_mgr_by_node(dn->parent);
+	if (!mgr)
+		return NOTIFY_OK;	/* not for us */
+
+	if (state) {
+		if (!of_property_read_string(dn, "fpga-firmware", &path))
+			fpga_mgr_firmware_write(mgr, path);
+	} else {
+		fpga_mgr_reset(mgr);
+	}
+
+	return NOTIFY_OK;
+}
+
 static void fpga_mgr_dev_release(struct device *dev)
 {
 	struct fpga_manager *mgr = to_fpga_manager(dev);
@@ -459,6 +546,8 @@ EXPORT_SYMBOL_GPL(fpga_mgr_remove);
 
 static int __init fpga_mgr_dev_init(void)
 {
+	int ret;
+
 	pr_info("FPGA Manager framework driver\n");
 
 	fpga_mgr_class = class_create(THIS_MODULE, "fpga_manager");
@@ -468,11 +557,24 @@ static int __init fpga_mgr_dev_init(void)
 	fpga_mgr_class->dev_groups = fpga_mgr_groups;
 	fpga_mgr_class->pm = &fpga_mgr_dev_pm_ops;
 
+#if IS_ENABLED(CONFIG_OF)
+	fpga_mgr_of_notifier_block.notifier_call = of_fpga_mgr_notify;
+	ret = of_reconfig_notifier_register(&fpga_mgr_of_notifier_block);
+	if (ret) {
+		class_destroy(fpga_mgr_class);
+		ida_destroy(&fpga_mgr_ida);
+		return ret;
+	}
+#endif
+
 	return 0;
 }
 
 static void __exit fpga_mgr_dev_exit(void)
 {
+#if IS_ENABLED(CONFIG_OF)
+	of_reconfig_notifier_unregister(&fpga_mgr_of_notifier_block);
+#endif
 	class_destroy(fpga_mgr_class);
 	ida_destroy(&fpga_mgr_ida);
 }
diff --git a/include/linux/fpga-mgr.h b/include/linux/fpga-mgr.h
index 7ac762c..414d949 100644
--- a/include/linux/fpga-mgr.h
+++ b/include/linux/fpga-mgr.h
@@ -99,6 +99,9 @@ int fpga_mgr_reset(struct fpga_manager *mgr);
 int fpga_mgr_register(struct device *pdev, const char *name,
 		      struct fpga_manager_ops *mops, void *priv);
 void fpga_mgr_remove(struct device *dev);
+struct fpga_manager *of_fpga_mgr_dev_lookup(struct device_node *node,
+					    const char *mgr_property);
+struct fpga_manager *of_find_fpga_mgr_by_node(struct device_node *node);
 
 #endif /* CONFIG_FPGA */
 #endif /*_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-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v3 0/3] FPGA Manager Framework
  2014-12-09 16:27 [PATCH v3 0/3] FPGA Manager Framework atull-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx
                   ` (2 preceding siblings ...)
       [not found] ` <1418142481-6167-1-git-send-email-atull-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx@public.gmane.org>
@ 2014-12-09 18:40 ` atull
  3 siblings, 0 replies; 5+ messages in thread
From: atull @ 2014-12-09 18:40 UTC (permalink / raw)
  To: gregkh, jgunthorpe, hpa, monstr, michal.simek, rdunlap
  Cc: linux-kernel, devicetree, pantelis.antoniou, robh+dt,
	grant.likely, iws, linux-doc, pavel, broonie, philip, rubini,
	s.trumtrar, jason, kyle.teske, nico, balbi, m.chehab, davidb, rob,
	davem, cesarb, sameo, akpm, linus.walleij, delicious.quinoa,
	dinguyen, yvanderv

On Tue, 9 Dec 2014, atull@opensource.altera.com wrote:

> From: Alan Tull <atull@opensource.altera.com>
> 
> Improvements in this version:
> 
> Fixed things in the framework that were left over from my original
> version that was a character driver.  In particular, make the
> struct device be present in the fpga_manager struct, not as a
> pointer, so container_of will work.
> 
> Also rewrote the part that handles DT notifications.  Now this
> section takes notifications instead of being another device to
> load/unload.
> 
> Still want to integrate bridge enable/disable with this, but
> that's not done yet.
> 

I have been recommended to move this to drivers/staging.  This
makes sense as there has always been a lot of discussion of the
interface.

Will be submitting that as v4 today.

Alan Tull


> Alan Tull (3):
>   fpga manager: add sysfs interface document
>   fpga manager: framework core
>   fpga manager: device tree overlay support
> 
>  Documentation/ABI/testing/sysfs-class-fpga-manager |   38 ++
>  drivers/Kconfig                                    |    2 +
>  drivers/Makefile                                   |    1 +
>  drivers/fpga/Kconfig                               |   28 +
>  drivers/fpga/Makefile                              |   10 +
>  drivers/fpga/fpga-mgr.c                            |  587 ++++++++++++++++++++
>  include/linux/fpga-mgr.h                           |  107 ++++
>  7 files changed, 773 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/fpga-mgr.c
>  create mode 100644 include/linux/fpga-mgr.h
> 
> -- 
> 1.7.9.5
> 
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-12-09 18:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-09 16:27 [PATCH v3 0/3] FPGA Manager Framework atull-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx
2014-12-09 16:27 ` [PATCH v3 1/3] fpga manager: add sysfs interface document atull
2014-12-09 16:28 ` [PATCH v3 2/3] fpga manager: framework core atull
     [not found] ` <1418142481-6167-1-git-send-email-atull-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx@public.gmane.org>
2014-12-09 16:28   ` [PATCH v3 3/3] fpga manager: device tree overlay support atull-yzvPICuk2ABMcg4IHK0kFoH6Mc4MB0Vx
2014-12-09 18:40 ` [PATCH v3 0/3] FPGA Manager Framework atull

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).