aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/crypto/sa2ul.h
diff options
context:
space:
mode:
authorAndrew Davis <afd@ti.com>2022-07-06 14:11:44 -0500
committerHerbert Xu <herbert@gondor.apana.org.au>2022-07-15 16:43:22 +0800
commitb77e34f5b10de529255c9468203d0644a7af3b81 (patch)
treebea10ed7a6202c8d48ceec643ec27f0c9b09571c /drivers/crypto/sa2ul.h
parentcrypto: sa2ul - Set the supported_algos bits individually (diff)
downloadlinux-dev-b77e34f5b10de529255c9468203d0644a7af3b81.tar.xz
linux-dev-b77e34f5b10de529255c9468203d0644a7af3b81.zip
crypto: sa2ul - Check engine status before enabling
There is a engine status register that can be used to check if the different HW crypto engines are enabled. Check that first and then only try to enable the engines if they are not already on. This has a couple benefits. First we don't need to use match_data for this. Second, this driver can now work on HS devices where the engine control registers are read-only and writing causes a firewall exception. Signed-off-by: Andrew Davis <afd@ti.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/sa2ul.h')
-rw-r--r--drivers/crypto/sa2ul.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/crypto/sa2ul.h b/drivers/crypto/sa2ul.h
index ed66d1f111db..92bf97232a29 100644
--- a/drivers/crypto/sa2ul.h
+++ b/drivers/crypto/sa2ul.h
@@ -16,6 +16,7 @@
#include <crypto/sha1.h>
#include <crypto/sha2.h>
+#define SA_ENGINE_STATUS 0x0008
#define SA_ENGINE_ENABLE_CONTROL 0x1000
struct sa_tfm_ctx;