aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/fpga/fpga-region.c
diff options
context:
space:
mode:
authorMoritz Fischer <mdf@kernel.org>2017-02-27 10:19:02 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-03-17 02:10:48 -0400
commit161db575ef6c3b0a6d96dc263abb39cd0dc0f0c2 (patch)
tree1f4cddc0d666b7136785f2c653ad9c4bdbb46965 /drivers/fpga/fpga-region.c
parent7f33bbca14de25f24660441af5087440dd0d2fca (diff)
fpga: region: Add fpga-region property 'encrypted-fpga-config'
Add fpga-region property to allow passing the fact that the bitstream is encrypted to the fpga-region and ultimately to the low-level driver. Signed-off-by: Moritz Fischer <mdf@kernel.org> Acked-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Alan Tull <atull@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/fpga/fpga-region.c')
-rw-r--r--drivers/fpga/fpga-region.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/fpga/fpga-region.c b/drivers/fpga/fpga-region.c
index 3222fdbad75a..2fe2a52c66ca 100644
--- a/drivers/fpga/fpga-region.c
+++ b/drivers/fpga/fpga-region.c
@@ -337,8 +337,9 @@ static int child_regions_with_firmware(struct device_node *overlay)
337 * The overlay must add either firmware-name or external-fpga-config property 337 * The overlay must add either firmware-name or external-fpga-config property
338 * to the FPGA Region. 338 * to the FPGA Region.
339 * 339 *
340 * firmware-name : program the FPGA 340 * firmware-name : program the FPGA
341 * external-fpga-config : FPGA is already programmed 341 * external-fpga-config : FPGA is already programmed
342 * encrypted-fpga-config : FPGA bitstream is encrypted
342 * 343 *
343 * The overlay can add other FPGA regions, but child FPGA regions cannot have a 344 * The overlay can add other FPGA regions, but child FPGA regions cannot have a
344 * firmware-name property since those regions don't exist yet. 345 * firmware-name property since those regions don't exist yet.
@@ -373,6 +374,9 @@ static int fpga_region_notify_pre_apply(struct fpga_region *region,
373 if (of_property_read_bool(nd->overlay, "external-fpga-config")) 374 if (of_property_read_bool(nd->overlay, "external-fpga-config"))
374 info->flags |= FPGA_MGR_EXTERNAL_CONFIG; 375 info->flags |= FPGA_MGR_EXTERNAL_CONFIG;
375 376
377 if (of_property_read_bool(nd->overlay, "encrypted-fpga-config"))
378 info->flags |= FPGA_MGR_ENCRYPTED_BITSTREAM;
379
376 of_property_read_string(nd->overlay, "firmware-name", &firmware_name); 380 of_property_read_string(nd->overlay, "firmware-name", &firmware_name);
377 381
378 of_property_read_u32(nd->overlay, "region-unfreeze-timeout-us", 382 of_property_read_u32(nd->overlay, "region-unfreeze-timeout-us",