diff options
author | Breno Lima <breno.lima@nxp.com> | 2019-04-08 23:48:11 -0300 |
---|---|---|
committer | Ye Li <ye.li@nxp.com> | 2019-04-09 18:55:08 -0700 |
commit | 639e5c15816c3eea0d4904a72ad175627be043d8 (patch) | |
tree | c6216ad3d07644be56fb7cc34d30865b1b17c5a5 /drivers | |
parent | 33f51b401dffa393274a28f9d49a87af3eb02fe0 (diff) |
MLK-21420 crypto: fsl: blob: Flush dcache range for destination address
The blob command is not working on i.MX7D, i.MX8MQ and i.MX8MM
devices.
Due to different cache management it's necessary to flush dcache
range for destination address so data can be available in memory.
Add necessary operations in blob_encap() and blob_decap() functions.
Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/crypto/fsl/fsl_blob.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/crypto/fsl/fsl_blob.c b/drivers/crypto/fsl/fsl_blob.c index cb315dfd89d..5d24f3339d6 100644 --- a/drivers/crypto/fsl/fsl_blob.c +++ b/drivers/crypto/fsl/fsl_blob.c @@ -63,6 +63,9 @@ int blob_decap(u8 *key_mod, u8 *src, u8 *dst, u32 len) flush_dcache_range((unsigned long)desc, (unsigned long)desc + size); + flush_dcache_range((unsigned long)dst, + (unsigned long)dst + size); + ret = run_descriptor_jr(desc); if (ret) { @@ -128,6 +131,9 @@ int blob_encap(u8 *key_mod, u8 *src, u8 *dst, u32 len) flush_dcache_range((unsigned long)desc, (unsigned long)desc + size); + flush_dcache_range((unsigned long)dst, + (unsigned long)dst + size); + ret = run_descriptor_jr(desc); if (ret) { |