Commit 8160ee7e authored by Ard Biesheuvel's avatar Ard Biesheuvel Committed by Herbert Xu

crypto: marvell/cesa - rename blkcipher to skcipher

The driver specific types contain some rudimentary references to the
blkcipher API, which is deprecated and will be removed. To avoid confusion,
rename these to skcipher. This is a cosmetic change only, as the code does
not actually use the blkcipher API.
Signed-off-by: default avatarArd Biesheuvel <ardb@kernel.org>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 7fe948a5
...@@ -232,13 +232,13 @@ struct mv_cesa_sec_accel_desc { ...@@ -232,13 +232,13 @@ struct mv_cesa_sec_accel_desc {
}; };
/** /**
* struct mv_cesa_blkcipher_op_ctx - cipher operation context * struct mv_cesa_skcipher_op_ctx - cipher operation context
* @key: cipher key * @key: cipher key
* @iv: cipher IV * @iv: cipher IV
* *
* Context associated to a cipher operation. * Context associated to a cipher operation.
*/ */
struct mv_cesa_blkcipher_op_ctx { struct mv_cesa_skcipher_op_ctx {
u32 key[8]; u32 key[8];
u32 iv[4]; u32 iv[4];
}; };
...@@ -265,7 +265,7 @@ struct mv_cesa_hash_op_ctx { ...@@ -265,7 +265,7 @@ struct mv_cesa_hash_op_ctx {
struct mv_cesa_op_ctx { struct mv_cesa_op_ctx {
struct mv_cesa_sec_accel_desc desc; struct mv_cesa_sec_accel_desc desc;
union { union {
struct mv_cesa_blkcipher_op_ctx blkcipher; struct mv_cesa_skcipher_op_ctx skcipher;
struct mv_cesa_hash_op_ctx hash; struct mv_cesa_hash_op_ctx hash;
} ctx; } ctx;
}; };
......
...@@ -209,7 +209,7 @@ mv_cesa_skcipher_complete(struct crypto_async_request *req) ...@@ -209,7 +209,7 @@ mv_cesa_skcipher_complete(struct crypto_async_request *req)
struct mv_cesa_req *basereq; struct mv_cesa_req *basereq;
basereq = &creq->base; basereq = &creq->base;
memcpy(skreq->iv, basereq->chain.last->op->ctx.blkcipher.iv, memcpy(skreq->iv, basereq->chain.last->op->ctx.skcipher.iv,
ivsize); ivsize);
} else { } else {
memcpy_fromio(skreq->iv, memcpy_fromio(skreq->iv,
...@@ -470,7 +470,7 @@ static int mv_cesa_des_op(struct skcipher_request *req, ...@@ -470,7 +470,7 @@ static int mv_cesa_des_op(struct skcipher_request *req,
mv_cesa_update_op_cfg(tmpl, CESA_SA_DESC_CFG_CRYPTM_DES, mv_cesa_update_op_cfg(tmpl, CESA_SA_DESC_CFG_CRYPTM_DES,
CESA_SA_DESC_CFG_CRYPTM_MSK); CESA_SA_DESC_CFG_CRYPTM_MSK);
memcpy(tmpl->ctx.blkcipher.key, ctx->key, DES_KEY_SIZE); memcpy(tmpl->ctx.skcipher.key, ctx->key, DES_KEY_SIZE);
return mv_cesa_skcipher_queue_req(req, tmpl); return mv_cesa_skcipher_queue_req(req, tmpl);
} }
...@@ -523,7 +523,7 @@ static int mv_cesa_cbc_des_op(struct skcipher_request *req, ...@@ -523,7 +523,7 @@ static int mv_cesa_cbc_des_op(struct skcipher_request *req,
mv_cesa_update_op_cfg(tmpl, CESA_SA_DESC_CFG_CRYPTCM_CBC, mv_cesa_update_op_cfg(tmpl, CESA_SA_DESC_CFG_CRYPTCM_CBC,
CESA_SA_DESC_CFG_CRYPTCM_MSK); CESA_SA_DESC_CFG_CRYPTCM_MSK);
memcpy(tmpl->ctx.blkcipher.iv, req->iv, DES_BLOCK_SIZE); memcpy(tmpl->ctx.skcipher.iv, req->iv, DES_BLOCK_SIZE);
return mv_cesa_des_op(req, tmpl); return mv_cesa_des_op(req, tmpl);
} }
...@@ -575,7 +575,7 @@ static int mv_cesa_des3_op(struct skcipher_request *req, ...@@ -575,7 +575,7 @@ static int mv_cesa_des3_op(struct skcipher_request *req,
mv_cesa_update_op_cfg(tmpl, CESA_SA_DESC_CFG_CRYPTM_3DES, mv_cesa_update_op_cfg(tmpl, CESA_SA_DESC_CFG_CRYPTM_3DES,
CESA_SA_DESC_CFG_CRYPTM_MSK); CESA_SA_DESC_CFG_CRYPTM_MSK);
memcpy(tmpl->ctx.blkcipher.key, ctx->key, DES3_EDE_KEY_SIZE); memcpy(tmpl->ctx.skcipher.key, ctx->key, DES3_EDE_KEY_SIZE);
return mv_cesa_skcipher_queue_req(req, tmpl); return mv_cesa_skcipher_queue_req(req, tmpl);
} }
...@@ -628,7 +628,7 @@ struct skcipher_alg mv_cesa_ecb_des3_ede_alg = { ...@@ -628,7 +628,7 @@ struct skcipher_alg mv_cesa_ecb_des3_ede_alg = {
static int mv_cesa_cbc_des3_op(struct skcipher_request *req, static int mv_cesa_cbc_des3_op(struct skcipher_request *req,
struct mv_cesa_op_ctx *tmpl) struct mv_cesa_op_ctx *tmpl)
{ {
memcpy(tmpl->ctx.blkcipher.iv, req->iv, DES3_EDE_BLOCK_SIZE); memcpy(tmpl->ctx.skcipher.iv, req->iv, DES3_EDE_BLOCK_SIZE);
return mv_cesa_des3_op(req, tmpl); return mv_cesa_des3_op(req, tmpl);
} }
...@@ -694,7 +694,7 @@ static int mv_cesa_aes_op(struct skcipher_request *req, ...@@ -694,7 +694,7 @@ static int mv_cesa_aes_op(struct skcipher_request *req,
key = ctx->aes.key_enc; key = ctx->aes.key_enc;
for (i = 0; i < ctx->aes.key_length / sizeof(u32); i++) for (i = 0; i < ctx->aes.key_length / sizeof(u32); i++)
tmpl->ctx.blkcipher.key[i] = cpu_to_le32(key[i]); tmpl->ctx.skcipher.key[i] = cpu_to_le32(key[i]);
if (ctx->aes.key_length == 24) if (ctx->aes.key_length == 24)
cfg |= CESA_SA_DESC_CFG_AES_LEN_192; cfg |= CESA_SA_DESC_CFG_AES_LEN_192;
...@@ -755,7 +755,7 @@ static int mv_cesa_cbc_aes_op(struct skcipher_request *req, ...@@ -755,7 +755,7 @@ static int mv_cesa_cbc_aes_op(struct skcipher_request *req,
{ {
mv_cesa_update_op_cfg(tmpl, CESA_SA_DESC_CFG_CRYPTCM_CBC, mv_cesa_update_op_cfg(tmpl, CESA_SA_DESC_CFG_CRYPTCM_CBC,
CESA_SA_DESC_CFG_CRYPTCM_MSK); CESA_SA_DESC_CFG_CRYPTCM_MSK);
memcpy(tmpl->ctx.blkcipher.iv, req->iv, AES_BLOCK_SIZE); memcpy(tmpl->ctx.skcipher.iv, req->iv, AES_BLOCK_SIZE);
return mv_cesa_aes_op(req, tmpl); return mv_cesa_aes_op(req, tmpl);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment