1
2
3 #ifndef _FPGA_REGION_H
4 #define _FPGA_REGION_H
5
6 #include <linux/device.h>
7 #include <linux/fpga/fpga-mgr.h>
8 #include <linux/fpga/fpga-bridge.h>
9
10
11
12
13
14
15
16
17
18
19
20
21 struct fpga_region {
22 struct device dev;
23 struct mutex mutex;
24 struct list_head bridge_list;
25 struct fpga_manager *mgr;
26 struct fpga_image_info *info;
27 struct fpga_compat_id *compat_id;
28 void *priv;
29 int (*get_bridges)(struct fpga_region *region);
30 };
31
32 #define to_fpga_region(d) container_of(d, struct fpga_region, dev)
33
34 struct fpga_region *fpga_region_class_find(
35 struct device *start, const void *data,
36 int (*match)(struct device *, const void *));
37
38 int fpga_region_program_fpga(struct fpga_region *region);
39
40 struct fpga_region
41 *fpga_region_create(struct device *dev, struct fpga_manager *mgr,
42 int (*get_bridges)(struct fpga_region *));
43 void fpga_region_free(struct fpga_region *region);
44 int fpga_region_register(struct fpga_region *region);
45 void fpga_region_unregister(struct fpga_region *region);
46
47 struct fpga_region
48 *devm_fpga_region_create(struct device *dev, struct fpga_manager *mgr,
49 int (*get_bridges)(struct fpga_region *));
50
51 #endif