summaryrefslogtreecommitdiff
path: root/board/xilinx
diff options
context:
space:
mode:
authorSiva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>2015-12-09 18:46:43 +0530
committerMichal Simek <michal.simek@xilinx.com>2020-06-24 13:07:57 +0200
commit3427f4d2045729c8995b19407daf91ea9a50e4f8 (patch)
treeca468dac178a837e6d38b353af17640ac2c22055 /board/xilinx
parent4c86e0834aeb3ae06389534ccbc90b8bcf5d95bf (diff)
downloadu-boot-3427f4d2045729c8995b19407daf91ea9a50e4f8.tar.gz
u-boot-3427f4d2045729c8995b19407daf91ea9a50e4f8.tar.bz2
u-boot-3427f4d2045729c8995b19407daf91ea9a50e4f8.zip
fpga: zynqpl: Correct PL bitstream loading sequence for zynqaes
Correct the PL bitstream loading sequence for zynqaes command by clearing the loaded PL bitstream before loading the new encrypted bitstream using the zynq aes command. This was done by setting the PROG_B same as in case of fpgaload commands. This patch fixes the issue of loading the encrypted PL bitstream onto the PL in which a bitstream has already been loaded successfully. Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'board/xilinx')
-rw-r--r--board/xilinx/zynq/cmds.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/board/xilinx/zynq/cmds.c b/board/xilinx/zynq/cmds.c
index 0c46de7599..d5e7d70bdf 100644
--- a/board/xilinx/zynq/cmds.c
+++ b/board/xilinx/zynq/cmds.c
@@ -399,7 +399,8 @@ static int zynq_verify_image(u32 src_ptr)
status = zynq_decrypt_load(part_load_addr,
part_img_len,
part_dst_addr,
- part_data_len);
+ part_data_len,
+ BIT_NONE);
if (status != 0) {
printf("DECRYPTION_FAIL\n");
return -1;
@@ -438,6 +439,7 @@ static int zynq_decrypt_image(struct cmd_tbl *cmdtp, int flag, int argc,
char *endp;
u32 srcaddr, srclen, dstaddr, dstlen;
int status;
+ u8 imgtype = BIT_NONE;
if (argc < 5 && argc > cmdtp->maxargs)
return CMD_RET_USAGE;
@@ -464,7 +466,8 @@ static int zynq_decrypt_image(struct cmd_tbl *cmdtp, int flag, int argc,
if (dstlen % 4)
dstlen = roundup(dstlen, 4);
- status = zynq_decrypt_load(srcaddr, srclen >> 2, dstaddr, dstlen >> 2);
+ status = zynq_decrypt_load(srcaddr, srclen >> 2, dstaddr,
+ dstlen >> 2, imgtype);
if (status != 0)
return CMD_RET_FAILURE;