summaryrefslogtreecommitdiff
path: root/drivers/crypto
diff options
context:
space:
mode:
authorSumit Garg <sumit.garg@nxp.com>2016-07-14 13:27:50 -0400
committerYork Sun <york.sun@nxp.com>2016-08-02 09:45:39 -0700
commit7fe1d6a41092da00e0a1b94ae0e996cf89e81e28 (patch)
tree169e7711a40436ff24bdec6582ea701cdb1d2466 /drivers/crypto
parent04e5c6d9cca668845f9f4b702f587c4dcc0ea4bd (diff)
downloadu-boot-imx-7fe1d6a41092da00e0a1b94ae0e996cf89e81e28.zip
u-boot-imx-7fe1d6a41092da00e0a1b94ae0e996cf89e81e28.tar.gz
u-boot-imx-7fe1d6a41092da00e0a1b94ae0e996cf89e81e28.tar.bz2
crypto/fsl: Update blob cmd to accept 64bit addresses
Update blob cmd to accept 64bit source, key modifier and destination addresses. Also correct output result print format for fsl specific implementation of blob cmd. Signed-off-by: Sumit Garg <sumit.garg@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
Diffstat (limited to 'drivers/crypto')
-rw-r--r--drivers/crypto/fsl/fsl_blob.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/crypto/fsl/fsl_blob.c b/drivers/crypto/fsl/fsl_blob.c
index 8b25921..d24b8fc 100644
--- a/drivers/crypto/fsl/fsl_blob.c
+++ b/drivers/crypto/fsl/fsl_blob.c
@@ -18,7 +18,7 @@ int blob_decap(u8 *key_mod, u8 *src, u8 *dst, u32 len)
int ret, i = 0;
u32 *desc;
- printf("\nDecapsulating data to form blob\n");
+ printf("\nDecapsulating blob to get data\n");
desc = malloc(sizeof(int) * MAX_CAAM_DESCSIZE);
if (!desc) {
debug("Not enough memory for descriptor allocation\n");
@@ -27,12 +27,15 @@ int blob_decap(u8 *key_mod, u8 *src, u8 *dst, u32 len)
inline_cnstr_jobdesc_blob_decap(desc, key_mod, src, dst, len);
+ debug("Descriptor dump:\n");
for (i = 0; i < 14; i++)
- printf("%x\n", *(desc + i));
+ debug("Word[%d]: %08x\n", i, *(desc + i));
ret = run_descriptor_jr(desc);
if (ret)
printf("Error in Decapsulation %d\n", ret);
+ else
+ printf("Decapsulation Success\n");
free(desc);
return ret;
@@ -51,12 +54,16 @@ int blob_encap(u8 *key_mod, u8 *src, u8 *dst, u32 len)
}
inline_cnstr_jobdesc_blob_encap(desc, key_mod, src, dst, len);
+
+ debug("Descriptor dump:\n");
for (i = 0; i < 14; i++)
- printf("%x\n", *(desc + i));
+ debug("Word[%d]: %08x\n", i, *(desc + i));
ret = run_descriptor_jr(desc);
if (ret)
printf("Error in Encapsulation %d\n", ret);
+ else
+ printf("Encapsulation Success\n");
free(desc);
return ret;