fpga: dfl: fme: add partial reconfiguration sub feature support
Partial Reconfiguration (PR) is the most important function for FME. It allows reconfiguration for given Port/Accelerated Function Unit (AFU). It creates platform devices for fpga-mgr, fpga-regions and fpga-bridges, and invokes fpga-region's interface (fpga_region_program_fpga) for PR operation once PR request received via ioctl. Below user space interface is exposed by this sub feature. Ioctl interface: * DFL_FPGA_FME_PORT_PR Do partial reconfiguration per information from userspace, including target port(AFU), buffer size and address info. It returns error code to userspace if failed. For detailed PR error information, user needs to read fpga-mgr's status sysfs interface. Signed-off-by: Tim Whisonant <tim.whisonant@intel.com> Signed-off-by: Enno Luebbers <enno.luebbers@intel.com> Signed-off-by: Shiva Rao <shiva.rao@intel.com> Signed-off-by: Christopher Rauer <christopher.rauer@intel.com> Signed-off-by: Kang Luwei <luwei.kang@intel.com> Signed-off-by: Xiao Guangrong <guangrong.xiao@linux.intel.com> Signed-off-by: Wu Hao <hao.wu@intel.com> Acked-by: Alan Tull <atull@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
620e1902f6
commit
29de76240e
@@ -14,6 +14,7 @@
|
||||
#ifndef _UAPI_LINUX_FPGA_DFL_H
|
||||
#define _UAPI_LINUX_FPGA_DFL_H
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/ioctl.h>
|
||||
|
||||
#define DFL_FPGA_API_VERSION 0
|
||||
@@ -28,6 +29,7 @@
|
||||
#define DFL_FPGA_MAGIC 0xB6
|
||||
|
||||
#define DFL_FPGA_BASE 0
|
||||
#define DFL_FME_BASE 0x80
|
||||
|
||||
/**
|
||||
* DFL_FPGA_GET_API_VERSION - _IO(DFL_FPGA_MAGIC, DFL_FPGA_BASE + 0)
|
||||
@@ -47,4 +49,29 @@
|
||||
|
||||
#define DFL_FPGA_CHECK_EXTENSION _IO(DFL_FPGA_MAGIC, DFL_FPGA_BASE + 1)
|
||||
|
||||
/* IOCTLs for FME file descriptor */
|
||||
|
||||
/**
|
||||
* DFL_FPGA_FME_PORT_PR - _IOW(DFL_FPGA_MAGIC, DFL_FME_BASE + 0,
|
||||
* struct dfl_fpga_fme_port_pr)
|
||||
*
|
||||
* Driver does Partial Reconfiguration based on Port ID and Buffer (Image)
|
||||
* provided by caller.
|
||||
* Return: 0 on success, -errno on failure.
|
||||
* If DFL_FPGA_FME_PORT_PR returns -EIO, that indicates the HW has detected
|
||||
* some errors during PR, under this case, the user can fetch HW error info
|
||||
* from the status of FME's fpga manager.
|
||||
*/
|
||||
|
||||
struct dfl_fpga_fme_port_pr {
|
||||
/* Input */
|
||||
__u32 argsz; /* Structure length */
|
||||
__u32 flags; /* Zero for now */
|
||||
__u32 port_id;
|
||||
__u32 buffer_size;
|
||||
__u64 buffer_address; /* Userspace address to the buffer for PR */
|
||||
};
|
||||
|
||||
#define DFL_FPGA_FME_PORT_PR _IO(DFL_FPGA_MAGIC, DFL_FME_BASE + 0)
|
||||
|
||||
#endif /* _UAPI_LINUX_FPGA_DFL_H */
|
||||
|
Reference in New Issue
Block a user