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>
20 { .compatible = "fpga-region", },
31 * of_fpga_region_find - find FPGA region
32 * @np: device node of FPGA Region
36 * Returns FPGA Region struct or NULL
44 * of_fpga_region_get_mgr - get reference for FPGA manager
45 * @np: device node of FPGA region
47 * Get FPGA Manager from "fpga-mgr" property or from ancestor region.
51 * Return: fpga manager struct or IS_ERR() condition containing error code.
60 if (of_device_is_compatible(np, "fpga-region")) { in of_fpga_region_get_mgr()
61 mgr_node = of_parse_phandle(np, "fpga-mgr", 0); in of_fpga_region_get_mgr()
78 * @region: FPGA region
81 * specified by "fpga-bridges" property. Note that the
112 br = of_parse_phandle(info->overlay, "fpga-bridges", 0); in of_fpga_region_get_bridges()
121 br = of_parse_phandle(np, "fpga-bridges", i); in of_fpga_region_get_bridges()
150 * If the overlay adds child FPGA regions, they are not allowed to have
153 * Return 0 for OK or -EINVAL if child FPGA region adds firmware-name.
177 pr_err("firmware-name not allowed in child FPGA region: %pOF", in child_regions_with_firmware()
186 * @region: FPGA region
187 * @overlay: overlay applied to the FPGA region
189 * Given an overlay applied to a FPGA region, parse the FPGA image specific
193 * NULL if overlay doesn't direct us to program the FPGA.
212 * Reject overlay if child FPGA Regions added in the overlay have in of_fpga_region_parse_ov()
213 * firmware-name property (would mean that an FPGA region that has in of_fpga_region_parse_ov()
214 * not been added to the live tree yet is doing FPGA programming). in of_fpga_region_parse_ov()
226 /* Read FPGA region properties from the overlay */ in of_fpga_region_parse_ov()
227 if (of_property_read_bool(overlay, "partial-fpga-config")) in of_fpga_region_parse_ov()
230 if (of_property_read_bool(overlay, "external-fpga-config")) in of_fpga_region_parse_ov()
233 if (of_property_read_bool(overlay, "encrypted-fpga-config")) in of_fpga_region_parse_ov()
253 /* If overlay is not programming the FPGA, don't need FPGA image info */ in of_fpga_region_parse_ov()
260 * If overlay informs us FPGA was externally programmed, specifying in of_fpga_region_parse_ov()
264 dev_err(dev, "error: specified firmware and external-fpga-config"); in of_fpga_region_parse_ov()
278 * @region: FPGA region that the overlay was applied to
281 * Called when an overlay targeted to a FPGA Region is about to be applied.
282 * Parses the overlay for properties that influence how the FPGA will be
283 * programmed and does some checking. If the checks pass, programs the FPGA.
300 /* If overlay doesn't program the FPGA, accept it anyway. */ in of_fpga_region_notify_pre_apply()
323 * @region: FPGA region that was targeted by the overlay that was removed
327 * FPGA region.
344 * This notifier handles programming a FPGA when a "firmware-name" property is
345 * added to a fpga-region.
347 * Returns NOTIFY_OK or error if FPGA programming fails.
408 /* Find the FPGA mgr specified by region or parent region. */ in of_fpga_region_probe()
426 dev_info(dev, "FPGA Region probed\n"); in of_fpga_region_probe()
452 .name = "of-fpga-region",
489 MODULE_DESCRIPTION("FPGA Region");