crypto: hisilicon - support querying the capability register

Query the capability register status of accelerator devices
(SEC, HPRE and ZIP) through the debugfs interface, for example:
cat cap_regs. The purpose is to improve the robustness and
locability of hardware devices and drivers.

Signed-off-by: Qi Tao <taoqi10@huawei.com>
Signed-off-by: Chenghai Huang <huangchenghai2@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
Qi Tao
2024-10-26 17:46:51 +08:00
committed by Herbert Xu
parent acb0ed8432
commit 2a69297eed
12 changed files with 396 additions and 111 deletions

View File

@@ -81,6 +81,24 @@ struct hisi_zip_sqe {
u32 rsvd1[4];
};
enum zip_cap_table_type {
QM_RAS_NFE_TYPE,
QM_RAS_NFE_RESET,
QM_RAS_CE_TYPE,
ZIP_RAS_NFE_TYPE,
ZIP_RAS_NFE_RESET,
ZIP_RAS_CE_TYPE,
ZIP_CORE_INFO,
ZIP_CORE_EN,
ZIP_DRV_ALG_BITMAP_TB,
ZIP_ALG_BITMAP,
ZIP_CORE1_BITMAP,
ZIP_CORE2_BITMAP,
ZIP_CORE3_BITMAP,
ZIP_CORE4_BITMAP,
ZIP_CORE5_BITMAP,
};
int zip_create_qps(struct hisi_qp **qps, int qp_num, int node);
int hisi_zip_register_to_crypto(struct hisi_qm *qm);
void hisi_zip_unregister_from_crypto(struct hisi_qm *qm);