diff options
author | T Karthik Reddy <t.karthik.reddy@xilinx.com> | 2019-03-12 20:20:23 +0530 |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2020-06-24 13:07:58 +0200 |
commit | ca0c0e07adf3c3baf3851fc17490a0160398c834 (patch) | |
tree | 2814d566c027c0a829e1992d03c68452b626cbb5 /drivers/fpga/zynqpl.c | |
parent | c64afba2fb483d416ad5da9dfe3f1f156ccf2366 (diff) |
fpga: zynqpl: Flush dcache only for non-bitstream data
In case of aes decryption destination address range must be flushed
before transferring decrypted data to destination.
Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
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/zynqpl.c')
-rw-r--r-- | drivers/fpga/zynqpl.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/fpga/zynqpl.c b/drivers/fpga/zynqpl.c index 90bb850833..a11e485525 100644 --- a/drivers/fpga/zynqpl.c +++ b/drivers/fpga/zynqpl.c @@ -548,8 +548,9 @@ int zynq_decrypt_load(u32 srcaddr, u32 srclen, u32 dstaddr, u32 dstlen, * Flush destination address range only if image is not * bitstream. */ - flush_dcache_range((u32)dstaddr, (u32)dstaddr + - roundup(dstlen << 2, ARCH_DMA_MINALIGN)); + if (bstype == BIT_NONE && dstaddr != 0xFFFFFFFF) + flush_dcache_range((u32)dstaddr, (u32)dstaddr + + roundup(dstlen << 2, ARCH_DMA_MINALIGN)); if (zynq_dma_transfer(srcaddr | 1, srclen, dstaddr | 1, dstlen)) return FPGA_FAIL; |