Re: [RFC] ARM: omap3: Enable HWMODS for HW Random Number Generator

From: Adam Ford
Date: Mon Sep 09 2019 - 15:19:55 EST


On Mon, Sep 9, 2019 at 11:35 AM Tony Lindgren <tony@xxxxxxxxxxx> wrote:
>
> * Pali RohÃr <pali.rohar@xxxxxxxxx> [190909 13:41]:
> > On Monday 09 September 2019 08:37:09 Adam Ford wrote:
> > > I applied this on 5.3 and it is working. I assume the same is true in for-next.
>
> Hmm I noticed I stopped getting RNG data after several rmmod modprobe
> cycles, or several hd /dev/random reads. Anybody else seeing that?

On the Logic PD Torpedo, I was able to read from /dev/hwrng and
/dev/random 10x without issue
I have installed rng-tools and I have sshd running and some other
stuff that might get in the way if I do an rmmod too much, but I
removed and modprobed the omap-rng 3x and never saw an issue reading
either /dev/hwrng or /dev/random.

I have been meaning to test this on the AM3517 and haven't gotten to
it yet, but I assume you've only tested omap3630, is that true?

adam
>
> > > Do you want to submit a formal patch? I can mark it as 'tested-by'
> > > This really helps speed up the startup sequence on boards with sshd
> > > because it delays for nearly 80 seconds waiting for entropy without
> > > the hwrng.
> >
> > Hi! When applying a patch, could you please disable this rng for n900?
> >
> > In omap3-n900.dts for rng should be status = "disabled" (as Tony already
> > wrote), similarly like for aes.
>
> Yeah I'll post a proper patch after -rc1.
>
> Regards,
>
> Tony