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.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/include/uapi/linux/fpga-dfl.h b/include/uapi/linux/fpga-dfl.h
index e6b4dd26cc68..a3ccdfb115a5 100644
--- a/include/uapi/linux/fpga-dfl.h
+++ b/include/uapi/linux/fpga-dfl.h
@@ -66,6 +66,54 @@
66 66
67#define DFL_FPGA_PORT_RESET _IO(DFL_FPGA_MAGIC, DFL_PORT_BASE + 0) 67#define DFL_FPGA_PORT_RESET _IO(DFL_FPGA_MAGIC, DFL_PORT_BASE + 0)
68 68
69/**
70 * DFL_FPGA_PORT_GET_INFO - _IOR(DFL_FPGA_MAGIC, DFL_PORT_BASE + 1,
71 * struct dfl_fpga_port_info)
72 *
73 * Retrieve information about the fpga port.
74 * Driver fills the info in provided struct dfl_fpga_port_info.
75 * Return: 0 on success, -errno on failure.
76 */
77struct dfl_fpga_port_info {
78 /* Input */
79 __u32 argsz; /* Structure length */
80 /* Output */
81 __u32 flags; /* Zero for now */
82 __u32 num_regions; /* The number of supported regions */
83 __u32 num_umsgs; /* The number of allocated umsgs */
84};
85
86#define DFL_FPGA_PORT_GET_INFO _IO(DFL_FPGA_MAGIC, DFL_PORT_BASE + 1)
87
88/**
89 * FPGA_PORT_GET_REGION_INFO - _IOWR(FPGA_MAGIC, PORT_BASE + 2,
90 * struct dfl_fpga_port_region_info)
91 *
92 * Retrieve information about a device memory region.
93 * Caller provides struct dfl_fpga_port_region_info with index value set.
94 * Driver returns the region info in other fields.
95 * Return: 0 on success, -errno on failure.
96 */
97struct dfl_fpga_port_region_info {
98 /* input */
99 __u32 argsz; /* Structure length */
100 /* Output */
101 __u32 flags; /* Access permission */
102#define DFL_PORT_REGION_READ (1 << 0) /* Region is readable */
103#define DFL_PORT_REGION_WRITE (1 << 1) /* Region is writable */
104#define DFL_PORT_REGION_MMAP (1 << 2) /* Can be mmaped to userspace */
105 /* Input */
106 __u32 index; /* Region index */
107#define DFL_PORT_REGION_INDEX_AFU 0 /* AFU */
108#define DFL_PORT_REGION_INDEX_STP 1 /* Signal Tap */
109 __u32 padding;
110 /* Output */
111 __u64 size; /* Region size (bytes) */
112 __u64 offset; /* Region offset from start of device fd */
113};
114
115#define DFL_FPGA_PORT_GET_REGION_INFO _IO(DFL_FPGA_MAGIC, DFL_PORT_BASE + 2)
116
69/* IOCTLs for FME file descriptor */ 117/* IOCTLs for FME file descriptor */
70 118
71/** 119/**