OSDN Git Service

crypto: sa2ul - Check engine status before enabling
authorAndrew Davis <afd@ti.com>
Wed, 6 Jul 2022 19:11:44 +0000 (14:11 -0500)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 15 Jul 2022 08:43:22 +0000 (16:43 +0800)
commitb77e34f5b10de529255c9468203d0644a7af3b81
treebea10ed7a6202c8d48ceec643ec27f0c9b09571c
parenta65c9a2a0b43118ee6f00eeeb73aefdcbd89728f
crypto: sa2ul - Check engine status before enabling

There is a engine status register that can be used to check if the
different HW crypto engines are enabled. Check that first and then only
try to enable the engines if they are not already on.

This has a couple benefits. First we don't need to use match_data for
this. Second, this driver can now work on HS devices where the engine
control registers are read-only and writing causes a firewall exception.

Signed-off-by: Andrew Davis <afd@ti.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/sa2ul.c
drivers/crypto/sa2ul.h