summaryrefslogtreecommitdiff
path: root/drivers/rng
AgeCommit message (Collapse)AuthorFilesLines
2021-07-06dm: define LOG_CATEGORY for all uclassPatrick Delaunay1-0/+2
Define LOG_CATEGORY for all uclass to allow filtering with log command. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2021-03-02rng: iproc_rng200: Enable support for RPi4 armv7Matthias Brugger1-4/+4
On the RPi4 armv7 build we have the situationt that we use physical addresses of 64 bit, while the virtual addresses are 32 bit. Remap the base address in this scenario via map_physmem(). Signed-off-by: Matthias Brugger <mbrugger@suse.com>
2021-02-25rng: iProc rng200: Rename ..._platdata variables to just ..._platPeter Robinson1-10/+10
In 8a8d24bd Simon dropped data from all the various _platdata calls but it seems this wasn't caught for the RNG200 driver from when it was posted to merged. This fixes that issue. Fixes: 537f0018 (rng: Add iProc RNG200 driver) Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
2021-02-18config: Enable iProc RNG200 driver in RPi4 configsMatthias Brugger1-1/+0
We find the iProc RNG200 in the Raspberry Pi 4. Add it to all it's config so that it can be used. Signed-off-by: Matthias Brugger <mbrugger@suse.com> Tested-by: Peter Robinson <pbrobinson@gmail.com> [mb: drop rpi_4_32b_defconfig] Signed-off-by: Matthias Brugger <mbrugger@suse.com>
2021-02-17rng: Add iProc RNG200 driverMatthias Brugger3-0/+193
Add support for random number generator RNG200. This is for example found on RPi4. Signed-off-by: Matthias Brugger <mbrugger@suse.com> Tested-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Tested-by: Peter Robinson <pbrobinson@gmail.com> [mb: adapt to new struct driver memebers] Signed-off-by: Matthias Brugger <mbrugger@suse.com>
2020-12-14dm: treewide: Rename ..._platdata variables to just ..._platSimon Glass3-21/+21
Try to maintain some consistency between these variables by using _plat as a suffix for them. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-12-14dm: treewide: Rename ofdata_to_platdata() to of_to_plat()Simon Glass3-7/+7
This name is far too long. Rename it to remove the 'data' bits. This makes it consistent with the platdata->plat rename. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-12-14dm: treewide: Rename dev_get_platdata() to dev_get_plat()Simon Glass2-8/+8
Rename this to be consistent with the change from 'platdata'. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-12-14dm: treewide: Rename 'platdata' variables to just 'plat'Simon Glass2-2/+2
We use 'priv' for private data but often use 'platdata' for platform data. We can't really use 'pdata' since that is ambiguous (it could mean private or platform data). Rename some of the latter variables to end with 'plat' for consistency. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-12-13dm: treewide: Rename auto_alloc_size members to be shorterSimon Glass4-4/+4
This construct is quite long-winded. In earlier days it made some sense since auto-allocation was a strange concept. But with driver model now used pretty universally, we can shorten this to 'auto'. This reduces verbosity and makes it easier to read. Coincidentally it also ensures that every declaration is on one line, thus making dtoc's job easier. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-10-22rng: Add Qualcomm MSM PRNG driverRobert Marko3-0/+151
Add support for the hardware pseudo random number generator found in Qualcomm SoC-s. Signed-off-by: Robert Marko <robert.marko@sartura.hr> Cc: Luka Perkov <luka.perkov@sartura.hr>
2020-09-28rng: meson: make core clock optionalNeil Armstrong1-1/+2
This fixes HWRNG support on Amlogic GXL, GXM, G12A, G12B & SM1 based boards dues to the lack of the core clock in the device tree. It was reported breaking EFI boot in the Linux EFI stub, because the EFI_RNG_PROTOCOL didn't check for the RNG device presence before installing itself. The Linux amlogic,meson-rng.yaml doesn't mandate the core clock, this the clock should be ignores if not present. Nevertheless, the clock should be present and this should be fixed on the Linux meson-gxl.dtsi & meson-g12-common.dtsi then synced with U-Boot. The change has been tested on a Khadas VIM3, which uses the common meson-g12-common.dtsi like the Odroid-C4 & Odroid-N2 in Scott's report, along with the RNG cmd. Cc: Heinrich Schuchardt <xypron.glpk@gmx.de> Reported-by: Scott K Logan <logans@cottsay.net> Fixes: bc40eb278b ("drivers/rng: add Amlogic hardware RNG driver") Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> Tested-by: Scott K Logan <logans@cottsay.net> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
2020-09-18rng: stm32mp1: use log() instead of printf()Heinrich Schuchardt1-1/+3
The logging system provides flexible filtering and enhanced output. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Sughosh Ganu <sughosh.ganu@linaro.org>
2020-05-19common: Drop linux/bitops.h from common headerSimon Glass2-0/+2
Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-19common: Drop linux/delay.h from common headerSimon Glass1-0/+1
Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-19common: Drop log.h from common headerSimon Glass1-0/+1
Move this header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-19common: Drop net.h from common headerSimon Glass1-0/+1
Move this header out of the common header. Network support is used in quite a few places but it still does not warrant blanket inclusion. Note that this net.h header itself has quite a lot in it. It could be split into the driver-mode support, functions, structures, checksumming, etc. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-04-29rockchip: rng: Add a driver for random number generator(rng) deviceLin Jinhan3-0/+233
Add a driver for the rng device found on rockchip platforms. Support rng module of crypto v1 and crypto v2. Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com> Tested-by: Peter Robinson <pbrobinson@gmail.com> Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
2020-03-11drivers/rng: add Amlogic hardware RNG driverHeinrich Schuchardt3-0/+129
Add support for the hardware random number generator of Amlogic SOCs. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> Reviewed-by: Sughosh Ganu <sughosh.ganu@linaro.org>
2020-03-11drivers/rng: simplify KconfigHeinrich Schuchardt1-2/+7
For all sandbox systems with DM_RNG we enable RNG_SANDBOX. So we can simply set the default to yes. All rng drivers depend on DM_RNG. Use a single 'if' instead of individual dependencies. Now 'make menuconfig' shows the individual drivers neatly indented under the DM_RNG entry. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Sughosh Ganu <sughosh.ganu@linaro.org>
2020-03-02stm32mp1: rng: remove superfluous assignmentHeinrich Schuchardt1-1/+1
We should not assign a value that is overwritten before use. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Acked-by: Sughosh Ganu <sughosh.ganu@linaro.org> Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com>
2020-01-25lib: Kconfig dependencies for pseudo-random libraryHeinrich Schuchardt1-1/+0
drivers/rng/sandbox_rng.c requires rand() to be defined but configuration option CONFIG_CONFIG_LIB_RAND selected in drivers/rng/Kconfig does not exist. test/lib/test_aes.c requires rand() to be defined. Fix the selection criteria for choice "Pseudo-random library support type". Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-01-07sandbox: rng: Add a random number generator(rng) driverSughosh Ganu3-0/+65
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@linaro.org> Reviewed-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2020-01-07stm32mp1: rng: Add a driver for random number generator(rng) deviceSughosh Ganu3-0/+168
Add a driver for the rng device found on stm32mp1 platforms. The driver provides a routine for reading the random number seed from the hardware device. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> Reviewed-by: Patrice Chotard <patrice.chotard@st.com> Acked-by: Patrick Delaunay <patrick.delaunay@st.com> Remove a superfluous blank line Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2020-01-07dm: rng: Add random number generator(rng) uclassSughosh Ganu3-0/+36
Add a uclass for reading a random number seed from a random number generator device. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> Reviewed-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>