Commit f23f2186 authored by Tony Lindgren's avatar Tony Lindgren Committed by Herbert Xu

crypto: omap-sham - drop old hw_init and unused FLAGS_INIT

FLAGS_INIT is now unused and we can just use standard runtime PM
functions instead.

Cc: Lokesh Vutla <lokeshvutla@ti.com>
Cc: Tero Kristo <kristo@kernel.org>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent f83fc1a0
...@@ -105,7 +105,6 @@ ...@@ -105,7 +105,6 @@
#define FLAGS_FINAL 1 #define FLAGS_FINAL 1
#define FLAGS_DMA_ACTIVE 2 #define FLAGS_DMA_ACTIVE 2
#define FLAGS_OUTPUT_READY 3 #define FLAGS_OUTPUT_READY 3
#define FLAGS_INIT 4
#define FLAGS_CPU 5 #define FLAGS_CPU 5
#define FLAGS_DMA_READY 6 #define FLAGS_DMA_READY 6
#define FLAGS_AUTO_XOR 7 #define FLAGS_AUTO_XOR 7
...@@ -368,24 +367,6 @@ static void omap_sham_copy_ready_hash(struct ahash_request *req) ...@@ -368,24 +367,6 @@ static void omap_sham_copy_ready_hash(struct ahash_request *req)
hash[i] = le32_to_cpup((__le32 *)in + i); hash[i] = le32_to_cpup((__le32 *)in + i);
} }
static int omap_sham_hw_init(struct omap_sham_dev *dd)
{
int err;
err = pm_runtime_resume_and_get(dd->dev);
if (err < 0) {
dev_err(dd->dev, "failed to get sync: %d\n", err);
return err;
}
if (!test_bit(FLAGS_INIT, &dd->flags)) {
set_bit(FLAGS_INIT, &dd->flags);
dd->err = 0;
}
return 0;
}
static void omap_sham_write_ctrl_omap2(struct omap_sham_dev *dd, size_t length, static void omap_sham_write_ctrl_omap2(struct omap_sham_dev *dd, size_t length,
int final, int dma) int final, int dma)
{ {
...@@ -1093,10 +1074,13 @@ static int omap_sham_hash_one_req(struct crypto_engine *engine, void *areq) ...@@ -1093,10 +1074,13 @@ static int omap_sham_hash_one_req(struct crypto_engine *engine, void *areq)
dev_dbg(dd->dev, "hash-one: op: %u, total: %u, digcnt: %zd, final: %d", dev_dbg(dd->dev, "hash-one: op: %u, total: %u, digcnt: %zd, final: %d",
ctx->op, ctx->total, ctx->digcnt, final); ctx->op, ctx->total, ctx->digcnt, final);
err = omap_sham_hw_init(dd); err = pm_runtime_resume_and_get(dd->dev);
if (err) if (err < 0) {
dev_err(dd->dev, "failed to get sync: %d\n", err);
return err; return err;
}
dd->err = 0;
dd->req = req; dd->req = req;
if (ctx->digcnt) if (ctx->digcnt)
......
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