Skip to contentSkip to conversation

hwrng: add support for picoxcell TRNG

PATCH Superseded Jamie Iles 1 participant 1 message Jan 14, 2011 Hardware random number generator core

v3 of 6 Superseded Latest is v6 →

lore
Share & tools
lore

Jamie Iles

author
#0 lore raw

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]>
---
 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
index d31483c..beecd1c 100644
@@ -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
index 4273308..3db4eb8 100644
@@ -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