Skip to content

Commit f9d131d

Browse files
Pascal van Leeuwenherbertx
authored andcommitted
crypto: inside-secure: Corrected configuration of EIP96_TOKEN_CTRL
This patch corrects the configuration of the EIP197_PE_EIP96_TOKEN_CTRL register. Previous value was wrong and potentially dangerous. Signed-off-by: Pascal van Leeuwen <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent 118db42 commit f9d131d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

drivers/crypto/inside-secure/safexcel.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -498,8 +498,8 @@ static int safexcel_hw_init(struct safexcel_crypto_priv *priv)
498498

499499
/* Token & context configuration */
500500
val = EIP197_PE_EIP96_TOKEN_CTRL_CTX_UPDATES |
501-
EIP197_PE_EIP96_TOKEN_CTRL_REUSE_CTX |
502-
EIP197_PE_EIP96_TOKEN_CTRL_POST_REUSE_CTX;
501+
EIP197_PE_EIP96_TOKEN_CTRL_NO_TOKEN_WAIT |
502+
EIP197_PE_EIP96_TOKEN_CTRL_ENABLE_TIMEOUT;
503503
writel(val, EIP197_PE(priv) + EIP197_PE_EIP96_TOKEN_CTRL(pe));
504504

505505
/* H/W capabilities selection: just enable everything */

drivers/crypto/inside-secure/safexcel.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,8 +296,8 @@
296296

297297
/* EIP197_PE_EIP96_TOKEN_CTRL */
298298
#define EIP197_PE_EIP96_TOKEN_CTRL_CTX_UPDATES BIT(16)
299-
#define EIP197_PE_EIP96_TOKEN_CTRL_REUSE_CTX BIT(19)
300-
#define EIP197_PE_EIP96_TOKEN_CTRL_POST_REUSE_CTX BIT(20)
299+
#define EIP197_PE_EIP96_TOKEN_CTRL_NO_TOKEN_WAIT BIT(17)
300+
#define EIP197_PE_EIP96_TOKEN_CTRL_ENABLE_TIMEOUT BIT(22)
301301

302302
/* EIP197_PE_EIP96_FUNCTION_EN */
303303
#define EIP197_FUNCTION_ALL 0xffffffff

0 commit comments

Comments
 (0)