0001
0002
0003 #ifndef _FPGA_REGION_H
0004 #define _FPGA_REGION_H
0005
0006 #include <linux/device.h>
0007 #include <linux/fpga/fpga-mgr.h>
0008 #include <linux/fpga/fpga-bridge.h>
0009
0010 struct fpga_region;
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024 struct fpga_region_info {
0025 struct fpga_manager *mgr;
0026 struct fpga_compat_id *compat_id;
0027 void *priv;
0028 int (*get_bridges)(struct fpga_region *region);
0029 };
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042 struct fpga_region {
0043 struct device dev;
0044 struct mutex mutex;
0045 struct list_head bridge_list;
0046 struct fpga_manager *mgr;
0047 struct fpga_image_info *info;
0048 struct fpga_compat_id *compat_id;
0049 void *priv;
0050 int (*get_bridges)(struct fpga_region *region);
0051 };
0052
0053 #define to_fpga_region(d) container_of(d, struct fpga_region, dev)
0054
0055 struct fpga_region *
0056 fpga_region_class_find(struct device *start, const void *data,
0057 int (*match)(struct device *, const void *));
0058
0059 int fpga_region_program_fpga(struct fpga_region *region);
0060
0061 struct fpga_region *
0062 fpga_region_register_full(struct device *parent, const struct fpga_region_info *info);
0063
0064 struct fpga_region *
0065 fpga_region_register(struct device *parent, struct fpga_manager *mgr,
0066 int (*get_bridges)(struct fpga_region *));
0067 void fpga_region_unregister(struct fpga_region *region);
0068
0069 #endif