]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: atmel-sha - add atmel_sha_wait_for_data_ready()
authorCyrille Pitchen <cyrille.pitchen@atmel.com>
Thu, 26 Jan 2017 16:07:50 +0000 (17:07 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 3 Feb 2017 10:16:13 +0000 (18:16 +0800)
commit041e7a20b9199ceee991044e26a15f083e77169c
tree1d787b5ea3ec11ce447bca67317280497f917c02
parent8c400906cf33a196fa8ab3166fd80ad8a1536480
crypto: atmel-sha - add atmel_sha_wait_for_data_ready()

This patch simply defines a helper function to test the 'Data Ready' flag
of the Status Register. It also gives a chance for the crypto request to
be processed synchronously if this 'Data Ready' flag is already set when
polling the Status Register. Indeed, running synchronously avoid the
latency of the 'Data Ready' interrupt.

When the 'Data Ready' flag has not been set yet, we enable the associated
interrupt and resume processing the crypto request asynchronously from the
'done' task just as before.

Signed-off-by: Cyrille Pitchen <cyrille.pitchen@atmel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/atmel-sha.c