mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-21 04:53:46 -04:00
crypto: hisilicon/qm - get hardware features from hardware registers
Before hardware V3, hardwares do not provide the feature registers, driver resolves hardware differences based on the hardware version. As a result, the driver does not support the new hardware. Hardware V3 and later versions support to obtain hardware features, such as power-gating management and doorbell isolation, through the hardware registers. To be compatible with later hardware versions, the features of the current device is obtained by reading the hardware registers instead of the hardware version. Signed-off-by: Weili Qian <qianweili@huawei.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
@@ -348,7 +348,7 @@ static void hisi_zip_open_sva_prefetch(struct hisi_qm *qm)
|
||||
u32 val;
|
||||
int ret;
|
||||
|
||||
if (qm->ver < QM_HW_V3)
|
||||
if (!test_bit(QM_SUPPORT_SVA_PREFETCH, &qm->caps))
|
||||
return;
|
||||
|
||||
/* Enable prefetch */
|
||||
@@ -368,7 +368,7 @@ static void hisi_zip_close_sva_prefetch(struct hisi_qm *qm)
|
||||
u32 val;
|
||||
int ret;
|
||||
|
||||
if (qm->ver < QM_HW_V3)
|
||||
if (!test_bit(QM_SUPPORT_SVA_PREFETCH, &qm->caps))
|
||||
return;
|
||||
|
||||
val = readl_relaxed(qm->io_base + HZIP_PREFETCH_CFG);
|
||||
|
||||
Reference in New Issue
Block a user