Lines Matching full:fpga

3  * FPGA Region - Device Tree support for FPGA programming under Linux
8 #include <linux/fpga/fpga-bridge.h>
9 #include <linux/fpga/fpga-mgr.h>
10 #include <linux/fpga/fpga-region.h>
22 { .compatible = "fpga-region", },
28 * of_fpga_region_find - find FPGA region
29 * @np: device node of FPGA Region
33 * Return: FPGA Region struct or NULL
41 * of_fpga_region_get_mgr - get reference for FPGA manager
42 * @np: device node of FPGA region
44 * Get FPGA Manager from "fpga-mgr" property or from ancestor region.
48 * Return: fpga manager struct or IS_ERR() condition containing error code.
57 if (of_device_is_compatible(np, "fpga-region")) { in of_fpga_region_get_mgr()
58 mgr_node = of_parse_phandle(np, "fpga-mgr", 0); in of_fpga_region_get_mgr()
75 * @region: FPGA region
78 * specified by "fpga-bridges" property. Note that the
109 br = of_parse_phandle(info->overlay, "fpga-bridges", 0); in of_fpga_region_get_bridges()
118 br = of_parse_phandle(np, "fpga-bridges", i); in of_fpga_region_get_bridges()
147 * If the overlay adds child FPGA regions, they are not allowed to have
150 * Return: 0 for OK or -EINVAL if child FPGA region adds firmware-name.
174 pr_err("firmware-name not allowed in child FPGA region: %pOF", in child_regions_with_firmware()
183 * @region: FPGA region
184 * @overlay: overlay applied to the FPGA region
186 * Given an overlay applied to an FPGA region, parse the FPGA image specific
190 * NULL if overlay doesn't direct us to program the FPGA.
209 * Reject overlay if child FPGA Regions added in the overlay have in of_fpga_region_parse_ov()
210 * firmware-name property (would mean that an FPGA region that has in of_fpga_region_parse_ov()
211 * not been added to the live tree yet is doing FPGA programming). in of_fpga_region_parse_ov()
223 /* Read FPGA region properties from the overlay */ in of_fpga_region_parse_ov()
224 if (of_property_read_bool(overlay, "partial-fpga-config")) in of_fpga_region_parse_ov()
227 if (of_property_read_bool(overlay, "external-fpga-config")) in of_fpga_region_parse_ov()
230 if (of_property_read_bool(overlay, "encrypted-fpga-config")) in of_fpga_region_parse_ov()
250 /* If overlay is not programming the FPGA, don't need FPGA image info */ in of_fpga_region_parse_ov()
257 * If overlay informs us FPGA was externally programmed, specifying in of_fpga_region_parse_ov()
261 dev_err(dev, "error: specified firmware and external-fpga-config"); in of_fpga_region_parse_ov()
275 * @region: FPGA region that the overlay was applied to
278 * Called when an overlay targeted to an FPGA Region is about to be applied.
279 * Parses the overlay for properties that influence how the FPGA will be
280 * programmed and does some checking. If the checks pass, programs the FPGA.
297 /* If overlay doesn't program the FPGA, accept it anyway. */ in of_fpga_region_notify_pre_apply()
320 * @region: FPGA region that was targeted by the overlay that was removed
324 * FPGA region.
341 * This notifier handles programming an FPGA when a "firmware-name" property is
342 * added to an fpga-region.
344 * Return: NOTIFY_OK or error if FPGA programming fails.
405 /* Find the FPGA mgr specified by region or parent region. */ in of_fpga_region_probe()
419 dev_info(dev, "FPGA Region probed\n"); in of_fpga_region_probe()
441 .name = "of-fpga-region",
480 MODULE_DESCRIPTION("FPGA Region");