hwrng: add support for picoxcell TRNG
PATCH v3 1/1 hwrng: add support for picoxcell TRNG
This driver adds support for the True Random Number Generator in the Picochip PC3X3 and later devices.
v3: add a timeout of 20us to the read() method and add fault detection and reset.
v2: fix indentation and cleanup read function to remove single use variables and to take advantage of the rng buffer being aligned.
Cc Matt Mackall <[email protected]>
Cc Herbert Xu <[email protected]>
Signed-off-by Jamie Iles <[email protected]>
--- drivers/char/hw_random/Kconfig | 12 ++ drivers/char/hw_random/Makefile | 1 + drivers/char/hw_random/picoxcell-rng.c | 208 ++++++++++++++++++++++++++++++++ 3 files changed, 221 insertions(+), 0 deletions(-) create mode 100644 drivers/char/hw_random/picoxcell-rng.c
drivers/char/hw_random/Kconfig +12 -0
@@ -198,3 +198,15 @@ config HW_RANDOM_NOMADIK module will be called nomadik-rng. If unsure, say Y. + +config HW_RANDOM_PICOXCELL + tristate "Picochip picoXcell true random number generator support" + depends on HW_RANDOM && ARCH_PICOXCELL && PICOXCELL_PC3X3 + ---help--- + This driver provides kernel-side support for the Random Number + Generator hardware found on Picochip PC3x3 and later devices. + + To compile this driver as a module, choose M here: the + module will be called picoxcell-rng. + + If unsure, say Y.
drivers/char/hw_random/Makefile +1 -0
@@ -19,3 +19,4 @@ obj-$(CONFIG_HW_RANDOM_TX4939) += tx4939-rng.o obj-$(CONFIG_HW_RANDOM_MXC_RNGA) += mxc-rnga.o obj-$(CONFIG_HW_RANDOM_OCTEON) += octeon-rng.o obj-$(CONFIG_HW_RANDOM_NOMADIK) += nomadik-rng.o +obj-$(CONFIG_HW_RANDOM_PICOXCELL) += picoxcell-rng.o
drivers/char/hw_random/picoxcell-rng.c new file +208 -0
208 lines not on this page · raw message
Signature · 1 line
1.7.3.4