summaryrefslogtreecommitdiff
path: root/drivers/crypto/ux500/cryp/cryp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/crypto/ux500/cryp/cryp.c')
-rw-r--r--drivers/crypto/ux500/cryp/cryp.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/crypto/ux500/cryp/cryp.c b/drivers/crypto/ux500/cryp/cryp.c
index f627c57d9bd..30318817b18 100644
--- a/drivers/crypto/ux500/cryp/cryp.c
+++ b/drivers/crypto/ux500/cryp/cryp.c
@@ -274,7 +274,8 @@ int cryp_configure_init_vector(struct cryp_device_data *device_data,
* @ctx: Crypto device context
*/
void cryp_save_device_context(struct cryp_device_data *device_data,
- struct cryp_device_context *ctx)
+ struct cryp_device_context *ctx,
+ int cryp_mode)
{
enum cryp_algo_mode algomode;
struct cryp_register *src_reg = device_data->base;
@@ -287,7 +288,9 @@ void cryp_save_device_context(struct cryp_device_data *device_data,
*/
cryp_activity(device_data, CRYP_CRYPEN_DISABLE);
cryp_wait_until_done(device_data);
- cryp_configure_for_dma(device_data, CRYP_DMA_DISABLE_BOTH);
+
+ if (cryp_mode == CRYP_MODE_DMA)
+ cryp_configure_for_dma(device_data, CRYP_DMA_DISABLE_BOTH);
if (CRYP_TEST_BITS(&src_reg->sr, CRYP_SR_IFEM_MASK) == 0)
ctx->din = readl(&src_reg->din);