diff options
author | 2023-12-02 17:17:21 +0800 | |
---|---|---|
committer | 2023-12-08 11:59:45 +0800 | |
commit | f1115b0096c3163592e04e74f5a7548c25bda957 (patch) | |
tree | c3bee23eb93200de09dfa2543b594c30e116a057 /drivers/crypto/hisilicon/sec2/sec.h | |
parent | crypto: hisilicon/hpre - save capability registers in probe process (diff) | |
download | linux-rng-f1115b0096c3163592e04e74f5a7548c25bda957.tar.xz linux-rng-f1115b0096c3163592e04e74f5a7548c25bda957.zip |
crypto: hisilicon/sec2 - save capability registers in probe process
Pre-store the valid value of the sec alg support related capability
register in sec_qm_init(), which will be called by probe process.
It can reduce the number of capability register queries and avoid
obtaining incorrect values in abnormal scenarios, such as reset
failed and the memory space disabled.
Fixes: 921715b6b782 ("crypto: hisilicon/sec - get algorithm bitmap from registers")
Signed-off-by: Zhiqi Song <songzhiqi1@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/hisilicon/sec2/sec.h')
-rw-r--r-- | drivers/crypto/hisilicon/sec2/sec.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/crypto/hisilicon/sec2/sec.h b/drivers/crypto/hisilicon/sec2/sec.h index 3e57fc04b377..410c83712e28 100644 --- a/drivers/crypto/hisilicon/sec2/sec.h +++ b/drivers/crypto/hisilicon/sec2/sec.h @@ -220,6 +220,13 @@ enum sec_cap_type { SEC_CORE4_ALG_BITMAP_HIGH, }; +enum sec_cap_reg_record_idx { + SEC_DRV_ALG_BITMAP_LOW_IDX = 0x0, + SEC_DRV_ALG_BITMAP_HIGH_IDX, + SEC_DEV_ALG_BITMAP_LOW_IDX, + SEC_DEV_ALG_BITMAP_HIGH_IDX, +}; + void sec_destroy_qps(struct hisi_qp **qps, int qp_num); struct hisi_qp **sec_create_qps(void); int sec_register_to_crypto(struct hisi_qm *qm); |