Lines Matching full:rng
51 struct hwrng rng; member
55 #define to_rng_priv(rng) container_of(rng, struct iproc_rng200_dev, rng) argument
70 /* Reset RNG and RBG */ in iproc_rng200_restart()
94 static int iproc_rng200_read(struct hwrng *rng, void *buf, size_t max, in iproc_rng200_read() argument
97 struct iproc_rng200_dev *priv = to_rng_priv(rng); in iproc_rng200_read()
109 /* Is RNG sane? If not, reset it. */ in iproc_rng200_read()
155 static int iproc_rng200_init(struct hwrng *rng) in iproc_rng200_init() argument
157 struct iproc_rng200_dev *priv = to_rng_priv(rng); in iproc_rng200_init()
160 /* Setup RNG. */ in iproc_rng200_init()
169 static void iproc_rng200_cleanup(struct hwrng *rng) in iproc_rng200_cleanup() argument
171 struct iproc_rng200_dev *priv = to_rng_priv(rng); in iproc_rng200_cleanup()
174 /* Disable RNG hardware */ in iproc_rng200_cleanup()
194 dev_err(dev, "failed to remap rng regs\n"); in iproc_rng200_probe()
198 priv->rng.name = "iproc-rng200"; in iproc_rng200_probe()
199 priv->rng.read = iproc_rng200_read; in iproc_rng200_probe()
200 priv->rng.init = iproc_rng200_init; in iproc_rng200_probe()
201 priv->rng.cleanup = iproc_rng200_cleanup; in iproc_rng200_probe()
204 ret = devm_hwrng_register(dev, &priv->rng); in iproc_rng200_probe()