driver: crypto: mask CRYPTO_SYNC_LOCKSTEP_INT_ST flag
This flag maybe abnormal trigger. Change-Id: Id398d1e8636c28b8cc42d950cafa5e2731a41b62 Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
This commit is contained in:
parent
94d677da26
commit
00fa57d80d
|
|
@ -233,7 +233,7 @@ static int rk_hash_direct_calc(void *hw_data, const u8 *data,
|
||||||
struct rk_hash_ctx *hash_ctx = priv->hw_ctx;
|
struct rk_hash_ctx *hash_ctx = priv->hw_ctx;
|
||||||
struct crypto_lli_desc *lli = &hash_ctx->data_lli;
|
struct crypto_lli_desc *lli = &hash_ctx->data_lli;
|
||||||
int ret = -EINVAL;
|
int ret = -EINVAL;
|
||||||
u32 tmp = 0;
|
u32 tmp = 0, mask = 0;
|
||||||
|
|
||||||
assert(IS_ALIGNED((ulong)data, DATA_ADDR_ALIGIN_SIZE));
|
assert(IS_ALIGNED((ulong)data, DATA_ADDR_ALIGIN_SIZE));
|
||||||
assert(is_last || IS_ALIGNED(data_len, DATA_LEN_ALIGIN_SIZE));
|
assert(is_last || IS_ALIGNED(data_len, DATA_LEN_ALIGIN_SIZE));
|
||||||
|
|
@ -274,8 +274,11 @@ static int rk_hash_direct_calc(void *hw_data, const u8 *data,
|
||||||
crypto_write(tmp << CRYPTO_WRITE_MASK_SHIFT | tmp,
|
crypto_write(tmp << CRYPTO_WRITE_MASK_SHIFT | tmp,
|
||||||
CRYPTO_DMA_CTL);
|
CRYPTO_DMA_CTL);
|
||||||
|
|
||||||
|
/* mask CRYPTO_SYNC_LOCKSTEP_INT_ST flag */
|
||||||
|
mask = ~(mask | CRYPTO_SYNC_LOCKSTEP_INT_ST);
|
||||||
|
|
||||||
/* wait calc ok */
|
/* wait calc ok */
|
||||||
RK_WHILE_TIME_OUT(!crypto_read(CRYPTO_DMA_INT_ST),
|
RK_WHILE_TIME_OUT(!(crypto_read(CRYPTO_DMA_INT_ST) & mask),
|
||||||
RK_CRYPTO_TIME_OUT, ret);
|
RK_CRYPTO_TIME_OUT, ret);
|
||||||
|
|
||||||
/* clear interrupt status */
|
/* clear interrupt status */
|
||||||
|
|
|
||||||
|
|
@ -81,6 +81,8 @@ enum rk_hash_algo {
|
||||||
|
|
||||||
/* Crypto DMA control registers*/
|
/* Crypto DMA control registers*/
|
||||||
#define CRYPTO_DMA_INT_EN 0x0008
|
#define CRYPTO_DMA_INT_EN 0x0008
|
||||||
|
#define CRYPTO_NOSYNC_LOCKSTEP_INT_EN _BIT(8)
|
||||||
|
#define CRYPTO_SYNC_LOCKSTEP_INT_EN _BIT(7)
|
||||||
#define CRYPTO_ZERO_ERR_INT_EN _BIT(6)
|
#define CRYPTO_ZERO_ERR_INT_EN _BIT(6)
|
||||||
#define CRYPTO_LIST_ERR_INT_EN _BIT(5)
|
#define CRYPTO_LIST_ERR_INT_EN _BIT(5)
|
||||||
#define CRYPTO_SRC_ERR_INT_EN _BIT(4)
|
#define CRYPTO_SRC_ERR_INT_EN _BIT(4)
|
||||||
|
|
@ -90,6 +92,7 @@ enum rk_hash_algo {
|
||||||
#define CRYPTO_LIST_DONE_INT_EN _BIT(0)
|
#define CRYPTO_LIST_DONE_INT_EN _BIT(0)
|
||||||
|
|
||||||
#define CRYPTO_DMA_INT_ST 0x000C
|
#define CRYPTO_DMA_INT_ST 0x000C
|
||||||
|
#define CRYPTO_SYNC_LOCKSTEP_INT_ST _BIT(7)
|
||||||
#define CRYPTO_ZERO_LEN_INT_ST _BIT(6)
|
#define CRYPTO_ZERO_LEN_INT_ST _BIT(6)
|
||||||
#define CRYPTO_LIST_ERR_INT_ST _BIT(5)
|
#define CRYPTO_LIST_ERR_INT_ST _BIT(5)
|
||||||
#define CRYPTO_SRC_ERR_INT_ST _BIT(4)
|
#define CRYPTO_SRC_ERR_INT_ST _BIT(4)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue