Lines Matching full:rng
2 * RNG driver for TX4939 Random Number Generators (RNG)
29 struct hwrng rng; member
65 static int tx4939_rng_data_present(struct hwrng *rng, int wait) in tx4939_rng_data_present() argument
67 struct tx4939_rng *rngdev = container_of(rng, struct tx4939_rng, rng); in tx4939_rng_data_present()
84 /* Start RNG */ in tx4939_rng_data_present()
98 static int tx4939_rng_data_read(struct hwrng *rng, u32 *buffer) in tx4939_rng_data_read() argument
100 struct tx4939_rng *rngdev = container_of(rng, struct tx4939_rng, rng); in tx4939_rng_data_read()
119 rngdev->rng.name = dev_name(&dev->dev); in tx4939_rng_probe()
120 rngdev->rng.data_present = tx4939_rng_data_present; in tx4939_rng_probe()
121 rngdev->rng.data_read = tx4939_rng_data_read; in tx4939_rng_probe()
124 /* Reset RNG */ in tx4939_rng_probe()
127 /* Start RNG */ in tx4939_rng_probe()
140 if (!tx4939_rng_data_present(&rngdev->rng, 1)) in tx4939_rng_probe()
145 return devm_hwrng_register(&dev->dev, &rngdev->rng); in tx4939_rng_probe()
150 .name = "tx4939-rng",
156 MODULE_DESCRIPTION("H/W Random Number Generator (RNG) driver for TX4939");