Re: [PATCH v4 2/2] hwrng: bcm2835: add reset support

2021-03-03 Thread Florian Fainelli
On 3/3/21 6:06 AM, Álvaro Fernández Rojas wrote: > Hi Philipp, > >> El 3 mar 2021, a las 14:52, Philipp Zabel escribió: >> >> Hi Álvaro, >> >> On Wed, 2021-02-24 at 09:22 +0100, Álvaro Fernández Rojas wrote: >> [...] >>> @@ -115,6 +121,8 @@ static void bcm2835_rng_cleanup(struct hwrng *rng) >>>

Re: [PATCH v4 2/2] hwrng: bcm2835: add reset support

2021-03-03 Thread Álvaro Fernández Rojas
Hi Philipp, > El 3 mar 2021, a las 14:52, Philipp Zabel escribió: > > Hi Álvaro, > > On Wed, 2021-02-24 at 09:22 +0100, Álvaro Fernández Rojas wrote: > [...] >> @@ -115,6 +121,8 @@ static void bcm2835_rng_cleanup(struct hwrng *rng) >> /* disable rng hardware */ >> rng_writel(priv, 0,

Re: [PATCH v4 2/2] hwrng: bcm2835: add reset support

2021-03-03 Thread Philipp Zabel
Hi Álvaro, On Wed, 2021-02-24 at 09:22 +0100, Álvaro Fernández Rojas wrote: [...] > @@ -115,6 +121,8 @@ static void bcm2835_rng_cleanup(struct hwrng *rng) > /* disable rng hardware */ > rng_writel(priv, 0, RNG_CTRL); > > + reset_control_rearm(priv->reset); > + > if

[PATCH v4 2/2] hwrng: bcm2835: add reset support

2021-02-24 Thread Álvaro Fernández Rojas
BCM6368 devices need to reset the in order to generate true random numbers. This is what BCM6368 produces without a reset: root@OpenWrt:/# cat /dev/hwrng | rngtest -c 1000 rngtest 6.10 Copyright (c) 2004 by Henrique de Moraes Holschuh This is free software; see the source for copying conditions.