• Cyrille Pitchen's avatar
    crypto: atmel-sha - add atmel_sha_wait_for_data_ready() · 9064ed92
    Cyrille Pitchen authored
    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: default avatarCyrille Pitchen <cyrille.pitchen@atmel.com>
    Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
    9064ed92
atmel-sha.c 39.8 KB