summaryrefslogtreecommitdiff
path: root/drivers/fpga/xilinx.c
diff options
context:
space:
mode:
authorSiva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>2018-05-31 12:40:23 +0300
committerMichal Simek <michal.simek@xilinx.com>2018-06-01 12:37:31 +0300
commita18d09ea384fb66105fbfa24fd2d1288754b8f07 (patch)
treeaf4d25c51294ee29d8fdd1356dd5080b37bee56a /drivers/fpga/xilinx.c
parentcedd48e2cdb752444444a97157025f16e63ee446 (diff)
downloadu-boot-a18d09ea384fb66105fbfa24fd2d1288754b8f07.tar.xz
fpga: zynqmp: Add secure bitstream loading for ZynqMP
This patch adds support for loading secure bitstreams on ZynqMP platforms. The secure bitstream images has to be generated using Xilinx bootgen tool. Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'drivers/fpga/xilinx.c')
-rw-r--r--drivers/fpga/xilinx.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/fpga/xilinx.c b/drivers/fpga/xilinx.c
index 724304a545..f5135504ee 100644
--- a/drivers/fpga/xilinx.c
+++ b/drivers/fpga/xilinx.c
@@ -171,6 +171,24 @@ int xilinx_loadfs(xilinx_desc *desc, const void *buf, size_t bsize,
}
#endif
+#if defined(CONFIG_CMD_FPGA_LOAD_SECURE)
+int xilinx_loads(xilinx_desc *desc, const void *buf, size_t bsize,
+ struct fpga_secure_info *fpga_sec_info)
+{
+ if (!xilinx_validate(desc, (char *)__func__)) {
+ printf("%s: Invalid device descriptor\n", __func__);
+ return FPGA_FAIL;
+ }
+
+ if (!desc->operations || !desc->operations->loads) {
+ printf("%s: Missing loads operation\n", __func__);
+ return FPGA_FAIL;
+ }
+
+ return desc->operations->loads(desc, buf, bsize, fpga_sec_info);
+}
+#endif
+
int xilinx_dump(xilinx_desc *desc, const void *buf, size_t bsize)
{
if (!xilinx_validate (desc, (char *)__FUNCTION__)) {