On 25.06.20 14:19, Michael Walle wrote: > Register the random number generator with the rng subsystem in u-boot. > This way it can be used by EFI as well as for the 'rng' command. > > Signed-off-by: Michael Walle <mich...@walle.cc> > --- > drivers/crypto/fsl/Kconfig | 14 ++++++ > drivers/crypto/fsl/Makefile | 1 + > drivers/crypto/fsl/jobdesc.c | 10 +++++ > drivers/crypto/fsl/jobdesc.h | 3 ++ > drivers/crypto/fsl/jr.c | 9 ++++ > drivers/crypto/fsl/rng.c | 86 ++++++++++++++++++++++++++++++++++++ > 6 files changed, 123 insertions(+) > create mode 100644 drivers/crypto/fsl/rng.c > > diff --git a/drivers/crypto/fsl/Kconfig b/drivers/crypto/fsl/Kconfig > index 181a1e5e99..5ed6140da3 100644 > --- a/drivers/crypto/fsl/Kconfig > +++ b/drivers/crypto/fsl/Kconfig > @@ -45,3 +45,17 @@ config SYS_FSL_SEC_COMPAT > > config SYS_FSL_SEC_LE > bool "Little-endian access to Freescale Secure Boot" > + > +if FSL_CAAM > + > +config FSL_CAAM_RNG > + bool "Enable Random Number Generator support" > + depends on DM_RNG > + default y > + help > + Enable support for the hardware based random number generator > + module of the CAAM. The random data is fetched from the DRGB > + using the prediction resistance flag which means the DRGB is > + reseeded from the TRNG every time random data is generated. > + > +endif
Should FSL_CAAM imply DM_RNG? This way you would not have to update the defconfigs of the NXP boards. For new files there should be a maintainer. It would be great if somebody at NXP could take charge of the drivers/crypto/fsl directory. Best regards Heinrich