]> git.baikalelectronics.ru Git - uboot.git/commit
cmd: rng: Add support for selecting RNG device
authorSughosh Ganu <sughosh.ganu@linaro.org>
Fri, 22 Jul 2022 16:02:06 +0000 (21:32 +0530)
committerIlias Apalodimas <ilias.apalodimas@linaro.org>
Tue, 2 Aug 2022 20:50:02 +0000 (23:50 +0300)
commitda4a3f0f63cc81ab108d0fe5bb2dc396f1e79913
tree2e02506f040e4e8428b12bade101a04eb3fc5f85
parent76e2e5ab8d085574b470db7d8cc807663cb7e372
cmd: rng: Add support for selecting RNG device

The 'rng' u-boot command is used for printing a select number of
random bytes on the console. Currently, the RNG device from which the
random bytes are read is fixed. However, a platform can have multiple
RNG devices, one example being qemu, which has a virtio RNG device and
the RNG pseudo device through the TPM chip.

Extend the 'rng' command so that the user can provide the RNG device
number from which the random bytes are to be read. This will be the
device index under the RNG uclass.

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Tested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
cmd/rng.c