]> asedeno.scripts.mit.edu Git - linux.git/commit
crypto: caam - allow retrieving 'era' from register
authorFabio Estevam <fabio.estevam@nxp.com>
Wed, 11 Apr 2018 12:45:20 +0000 (09:45 -0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 20 Apr 2018 16:58:37 +0000 (00:58 +0800)
commit654f2b937b389295581bcb4aa26011a63db7bc8f
tree70d6c4ac40b00e5a33d44b02b07c8807c254b561
parentb0039c00fbbbc3cb9c4b25852d81a2b4c193371d
crypto: caam - allow retrieving 'era' from register

The 'era' information can be retrieved from CAAM registers, so
introduce a caam_get_era_from_hw() function that gets it via register
reads in case the 'fsl,sec-era' property is not passed in the device
tree.

This function is based on the U-Boot implementation from
drivers/crypto/fsl/sec.c

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Horia Geantă <horia.geanta@nxp.com>
Tested-by: Breno Lima <breno.lima@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/caam/ctrl.c
drivers/crypto/caam/regs.h