Alan Tull | 59460a9 | 2017-11-15 14:20:21 -0600 | [diff] [blame^] | 1 | #ifndef _FPGA_REGION_H |
| 2 | #define _FPGA_REGION_H |
| 3 | |
| 4 | #include <linux/device.h> |
| 5 | #include <linux/fpga/fpga-mgr.h> |
| 6 | #include <linux/fpga/fpga-bridge.h> |
| 7 | |
| 8 | /** |
| 9 | * struct fpga_region - FPGA Region structure |
| 10 | * @dev: FPGA Region device |
| 11 | * @mutex: enforces exclusive reference to region |
| 12 | * @bridge_list: list of FPGA bridges specified in region |
| 13 | * @mgr: FPGA manager |
| 14 | * @info: FPGA image info |
| 15 | */ |
| 16 | struct fpga_region { |
| 17 | struct device dev; |
| 18 | struct mutex mutex; /* for exclusive reference to region */ |
| 19 | struct list_head bridge_list; |
| 20 | struct fpga_manager *mgr; |
| 21 | struct fpga_image_info *info; |
| 22 | }; |
| 23 | |
| 24 | #define to_fpga_region(d) container_of(d, struct fpga_region, dev) |
| 25 | |
| 26 | int fpga_region_program_fpga(struct fpga_region *region); |
| 27 | |
| 28 | #endif /* _FPGA_REGION_H */ |