diff options
| author | Alan Tull <atull@kernel.org> | 2017-11-15 15:20:21 -0500 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-11-28 10:30:38 -0500 |
| commit | 59460a9305458ac3e7f2415b602dbaa6cfcb8a3b (patch) | |
| tree | eecf8b6625b2543db973642cefedccc8e28dd99f /include/linux/fpga | |
| parent | c8898eda81e0b949ca214e1a45ce1b56677eb849 (diff) | |
fpga: region: add fpga-region.h header
* Create fpga-region.h.
* Export fpga_region_program_fpga.
* Move struct fpga_region and other things to the header.
This is a step in separating FPGA region common code
from Device Tree support.
Signed-off-by: Alan Tull <atull@kernel.org>
Acked-by: Moritz Fischer <mdf@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/fpga')
| -rw-r--r-- | include/linux/fpga/fpga-region.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/include/linux/fpga/fpga-region.h b/include/linux/fpga/fpga-region.h new file mode 100644 index 000000000000..8a355171406b --- /dev/null +++ b/include/linux/fpga/fpga-region.h | |||
| @@ -0,0 +1,28 @@ | |||
| 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 */ | ||
