aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/uapi/linux')
-rw-r--r--include/uapi/linux/fpga-dfl.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/include/uapi/linux/fpga-dfl.h b/include/uapi/linux/fpga-dfl.h
index 858e4437c31c..9666af85a8f5 100644
--- a/include/uapi/linux/fpga-dfl.h
+++ b/include/uapi/linux/fpga-dfl.h
@@ -14,6 +14,7 @@
14#ifndef _UAPI_LINUX_FPGA_DFL_H 14#ifndef _UAPI_LINUX_FPGA_DFL_H
15#define _UAPI_LINUX_FPGA_DFL_H 15#define _UAPI_LINUX_FPGA_DFL_H
16 16
17#include <linux/types.h>
17#include <linux/ioctl.h> 18#include <linux/ioctl.h>
18 19
19#define DFL_FPGA_API_VERSION 0 20#define DFL_FPGA_API_VERSION 0
@@ -28,6 +29,7 @@
28#define DFL_FPGA_MAGIC 0xB6 29#define DFL_FPGA_MAGIC 0xB6
29 30
30#define DFL_FPGA_BASE 0 31#define DFL_FPGA_BASE 0
32#define DFL_FME_BASE 0x80
31 33
32/** 34/**
33 * DFL_FPGA_GET_API_VERSION - _IO(DFL_FPGA_MAGIC, DFL_FPGA_BASE + 0) 35 * DFL_FPGA_GET_API_VERSION - _IO(DFL_FPGA_MAGIC, DFL_FPGA_BASE + 0)
@@ -47,4 +49,29 @@
47 49
48#define DFL_FPGA_CHECK_EXTENSION _IO(DFL_FPGA_MAGIC, DFL_FPGA_BASE + 1) 50#define DFL_FPGA_CHECK_EXTENSION _IO(DFL_FPGA_MAGIC, DFL_FPGA_BASE + 1)
49 51
52/* IOCTLs for FME file descriptor */
53
54/**
55 * DFL_FPGA_FME_PORT_PR - _IOW(DFL_FPGA_MAGIC, DFL_FME_BASE + 0,
56 * struct dfl_fpga_fme_port_pr)
57 *
58 * Driver does Partial Reconfiguration based on Port ID and Buffer (Image)
59 * provided by caller.
60 * Return: 0 on success, -errno on failure.
61 * If DFL_FPGA_FME_PORT_PR returns -EIO, that indicates the HW has detected
62 * some errors during PR, under this case, the user can fetch HW error info
63 * from the status of FME's fpga manager.
64 */
65
66struct dfl_fpga_fme_port_pr {
67 /* Input */
68 __u32 argsz; /* Structure length */
69 __u32 flags; /* Zero for now */
70 __u32 port_id;
71 __u32 buffer_size;
72 __u64 buffer_address; /* Userspace address to the buffer for PR */
73};
74
75#define DFL_FPGA_FME_PORT_PR _IO(DFL_FPGA_MAGIC, DFL_FME_BASE + 0)
76
50#endif /* _UAPI_LINUX_FPGA_DFL_H */ 77#endif /* _UAPI_LINUX_FPGA_DFL_H */