On Mon, Jun 12, 2023 at 10:30:42AM +0200, meenakshi.aggarwal@xxxxxxx wrote: > From: Meenakshi Aggarwal <meenakshi.aggarwal@xxxxxxx> > > TRNG "sample size" (the total number of entropy samples that will be taken > during entropy generation) default / POR value is very conservatively > set to 2500. > > Let's set it to 512, the same as the caam driver in U-boot > (drivers/crypto/fsl_caam.c) does. > > This solves the issue of RNG performance dropping after a suspend/resume > cycle on parts where caam loses power, since the initial U-boot setttings > are lost and kernel does not restore them when resuming. > > Note: when changing the sample size, the self-test parameters need to be > updated accordingly. > > Signed-off-by: Horia Geantă <horia.geanta@xxxxxxx> > Signed-off-by: Meenakshi Aggarwal <meenakshi.aggarwal@xxxxxxx> > --- > drivers/crypto/caam/ctrl.c | 52 +++++++++++++++++++++++--------------- > drivers/crypto/caam/regs.h | 14 ++++++++-- > 2 files changed, 44 insertions(+), 22 deletions(-) Patch applied. Thanks. -- Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt