crypto: hisilicon/qm - add stop queue by hardware
authorWeili Qian <qianweili@huawei.com>
Tue, 6 Apr 2021 12:56:02 +0000 (20:56 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 16 Apr 2021 11:16:31 +0000 (21:16 +1000)
commit7ed83901326f781524af2d969185440efe23f964
tree1c2837124ce5ecce0066f78bc29157f69bb0f568
parent7dad7d007ab73b36a4a2438f063dfabbdc2df288
crypto: hisilicon/qm - add stop queue by hardware

Kunpeng930 could be able to stop queue by writing hardware registers,
which will trigger tasks in device to be flushed out.

In order to be compatible with the kunpeng920 driver, add 'qm_hw_ops_v3' to
adapt Kunpeng930. And 'stop_qp' callback is added in 'qm_hw_ops_v3' to
write hardware registers. Call 'stop_qp' to drain the tasks in device
before releasing queue.

Signed-off-by: Weili Qian <qianweili@huawei.com>
Reviewed-by: Longfang Liu <liulongfang@huawei.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/hisilicon/qm.c