[PATCH v6 5/8] sandbox: rng: Add a random number generator(rng) driver

Sughosh Ganu sughosh.ganu at linaro.org
Sat Dec 28 12:19:24 CET 2019


On Sat, 28 Dec 2019 at 12:53, Heinrich Schuchardt <xypron.glpk at gmx.de>
wrote:

> On 12/27/19 3:23 PM, Sughosh Ganu wrote:
> > Add a sandbox driver for random number generation. Mostly aimed at
> > providing a unit test for rng uclass.
> >
> > Signed-off-by: Sughosh Ganu <sughosh.ganu at linaro.org>
> > Reviewed-by: Patrice Chotard <patrice.chotard at st.com>
> > ---
> > Changes since V5:
> > * Handle review comments from Heinrich Schuchardt to read all the
> >    bytes requested in the individual drivers.
> >
> >   arch/sandbox/dts/test.dts |  4 ++++
> >   drivers/rng/Kconfig       |  8 +++++++
> >   drivers/rng/Makefile      |  1 +
> >   drivers/rng/sandbox_rng.c | 56
> +++++++++++++++++++++++++++++++++++++++++++++++
> >   4 files changed, 69 insertions(+)
> >   create mode 100644 drivers/rng/sandbox_rng.c
> >
> > diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts
> > index fdb08f2..2c85540 100644
> > --- a/arch/sandbox/dts/test.dts
> > +++ b/arch/sandbox/dts/test.dts
>
> I would suggest to add the RNG to the other sandbox device trees as well.
>

Can this not be added when there is an actual use of the rng device on any
sandbox targets. Currently, the only use on sandbox is for running a unit
test for rng uclass.


> > @@ -599,6 +599,10 @@
> >               reset-names = "other", "test";
> >       };
> >
> > +     rng at 0 {
> > +             compatible = "sandbox,sandbox-rng";
>
> The device tree compiler complains about this:
>
> $ dtc -I dtb -O dts ./arch/sandbox/dts/test.dtb
>
> <stdout>: Warning (unit_address_vs_reg):
> /rng at 0: node has a unit name, but no reg property
> <stdout>: Warning (unique_unit_address):
> /rng at 0: duplicate unit-address (also used in node /usb at 0)
>

Will take a look.

-sughosh


More information about the U-Boot mailing list