| /Linux-v5.4/include/linux/ |
| D | hw_random.h | 39 struct hwrng { struct 41 int (*init)(struct hwrng *rng); argument 42 void (*cleanup)(struct hwrng *rng); argument 43 int (*data_present)(struct hwrng *rng, int wait); argument 44 int (*data_read)(struct hwrng *rng, u32 *data); argument 45 int (*read)(struct hwrng *rng, void *data, size_t max, bool wait); argument 58 extern int hwrng_register(struct hwrng *rng); argument 59 extern int devm_hwrng_register(struct device *dev, struct hwrng *rng); 61 extern void hwrng_unregister(struct hwrng *rng); 62 extern void devm_hwrng_unregister(struct device *dve, struct hwrng *rng);
|
| /Linux-v5.4/drivers/char/hw_random/ |
| D | core.c | 30 static struct hwrng *current_rng; 53 static int hwrng_init(struct hwrng *rng); 56 static inline int rng_get_data(struct hwrng *rng, u8 *buffer, size_t size, 64 static void add_early_randomness(struct hwrng *rng) in add_early_randomness() 78 struct hwrng *rng = container_of(kref, struct hwrng, ref); in cleanup_rng() 86 static int set_current_rng(struct hwrng *rng) in set_current_rng() 114 static struct hwrng *get_current_rng(void) in get_current_rng() 116 struct hwrng *rng; in get_current_rng() 129 static void put_rng(struct hwrng *rng) in put_rng() 141 static int hwrng_init(struct hwrng *rng) in hwrng_init() [all …]
|
| D | virtio-rng.c | 18 struct hwrng hwrng; member 53 static int virtio_read(struct hwrng *rng, void *buf, size_t size, bool wait) in virtio_read() 79 static void virtio_cleanup(struct hwrng *rng) in virtio_cleanup() 104 vi->hwrng = (struct hwrng) { in probe_common() 139 hwrng_unregister(&vi->hwrng); in remove_common() 160 err = hwrng_register(&vi->hwrng); in virtrng_scan() 186 err = hwrng_register(&vi->hwrng); in virtrng_restore()
|
| D | octeon-rng.c | 23 struct hwrng ops; 28 static int octeon_rng_init(struct hwrng *rng) in octeon_rng_init() 40 static void octeon_rng_cleanup(struct hwrng *rng) in octeon_rng_cleanup() 50 static int octeon_rng_data_read(struct hwrng *rng, u32 *data) in octeon_rng_data_read() 64 struct hwrng ops = { in octeon_rng_probe()
|
| D | pasemi-rng.c | 34 static int pasemi_rng_data_present(struct hwrng *rng, int wait) in pasemi_rng_data_present() 49 static int pasemi_rng_data_read(struct hwrng *rng, u32 *data) in pasemi_rng_data_read() 56 static int pasemi_rng_init(struct hwrng *rng) in pasemi_rng_init() 68 static void pasemi_rng_cleanup(struct hwrng *rng) in pasemi_rng_cleanup() 78 static struct hwrng pasemi_rng = {
|
| D | ks-sa-rng.c | 84 struct hwrng rng; 90 static int ks_sa_rng_init(struct hwrng *rng) in ks_sa_rng_init() 126 static void ks_sa_rng_cleanup(struct hwrng *rng) in ks_sa_rng_cleanup() 137 static int ks_sa_rng_data_read(struct hwrng *rng, u32 *data) in ks_sa_rng_data_read() 151 static int ks_sa_rng_data_present(struct hwrng *rng, int wait) in ks_sa_rng_data_present() 184 ks_sa_rng->rng = (struct hwrng) { in ks_sa_rng_probe()
|
| D | hisi-rng.c | 31 struct hwrng rng; 34 static int hisi_rng_init(struct hwrng *rng) in hisi_rng_init() 57 static void hisi_rng_cleanup(struct hwrng *rng) in hisi_rng_cleanup() 64 static int hisi_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait) in hisi_rng_read()
|
| D | bcm2835-rng.c | 31 struct hwrng rng; 37 static inline struct bcm2835_rng_priv *to_rng_priv(struct hwrng *rng) in to_rng_priv() 62 static int bcm2835_rng_read(struct hwrng *rng, void *buf, size_t max, in bcm2835_rng_read() 85 static int bcm2835_rng_init(struct hwrng *rng) in bcm2835_rng_init() 111 static void bcm2835_rng_cleanup(struct hwrng *rng) in bcm2835_rng_cleanup()
|
| D | mxc-rnga.c | 56 struct hwrng rng; 61 static int mxc_rnga_data_present(struct hwrng *rng, int wait) in mxc_rnga_data_present() 77 static int mxc_rnga_data_read(struct hwrng *rng, u32 * data) in mxc_rnga_data_read() 100 static int mxc_rnga_init(struct hwrng *rng) in mxc_rnga_init() 123 static void mxc_rnga_cleanup(struct hwrng *rng) in mxc_rnga_cleanup()
|
| D | via-rng.c | 87 static int via_rng_data_present(struct hwrng *rng, int wait) in via_rng_data_present() 120 static int via_rng_data_read(struct hwrng *rng, u32 *data) in via_rng_data_read() 129 static int via_rng_init(struct hwrng *rng) in via_rng_init() 187 static struct hwrng via_rng = {
|
| D | mtk-rng.c | 38 struct hwrng rng; 41 static int mtk_rng_init(struct hwrng *rng) in mtk_rng_init() 58 static void mtk_rng_cleanup(struct hwrng *rng) in mtk_rng_cleanup() 70 static bool mtk_rng_wait_ready(struct hwrng *rng, bool wait) in mtk_rng_wait_ready() 83 static int mtk_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait) in mtk_rng_read()
|
| D | geode-rng.c | 55 static int geode_rng_data_read(struct hwrng *rng, u32 *data) in geode_rng_data_read() 64 static int geode_rng_data_present(struct hwrng *rng, int wait) in geode_rng_data_present() 79 static struct hwrng geode_rng = {
|
| D | amd-rng.c | 61 static int amd_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait) in amd_rng_read() 94 static int amd_rng_init(struct hwrng *rng) in amd_rng_init() 110 static void amd_rng_cleanup(struct hwrng *rng) in amd_rng_cleanup() 120 static struct hwrng amd_rng = {
|
| D | timeriomem-rng.c | 41 struct hwrng rng_ops; 44 static int timeriomem_rng_read(struct hwrng *hwrng, void *data, in timeriomem_rng_read() argument 48 container_of(hwrng, struct timeriomem_rng_private, rng_ops); in timeriomem_rng_read()
|
| D | intel-rng.c | 167 static int intel_rng_data_present(struct hwrng *rng, int wait) in intel_rng_data_present() 182 static int intel_rng_data_read(struct hwrng *rng, u32 *data) in intel_rng_data_read() 191 static int intel_rng_init(struct hwrng *rng) in intel_rng_init() 210 static void intel_rng_cleanup(struct hwrng *rng) in intel_rng_cleanup() 223 static struct hwrng intel_rng = {
|
| D | iproc-rng200.c | 51 struct hwrng rng; 94 static int iproc_rng200_read(struct hwrng *rng, void *buf, size_t max, in iproc_rng200_read() 155 static int iproc_rng200_init(struct hwrng *rng) in iproc_rng200_init() 169 static void iproc_rng200_cleanup(struct hwrng *rng) in iproc_rng200_cleanup()
|
| D | stm32-rng.c | 31 struct hwrng rng; 38 static int stm32_rng_read(struct hwrng *rng, void *data, size_t max, bool wait) in stm32_rng_read() 82 static int stm32_rng_init(struct hwrng *rng) in stm32_rng_init() 104 static void stm32_rng_cleanup(struct hwrng *rng) in stm32_rng_cleanup()
|
| D | ixp4xx-rng.c | 29 static int ixp4xx_rng_data_read(struct hwrng *rng, u32 *buffer) in ixp4xx_rng_data_read() 38 static struct hwrng ixp4xx_rng_ops = {
|
| D | tx4939-rng.c | 29 struct hwrng rng; 65 static int tx4939_rng_data_present(struct hwrng *rng, int wait) in tx4939_rng_data_present() 98 static int tx4939_rng_data_read(struct hwrng *rng, u32 *buffer) in tx4939_rng_data_read()
|
| /Linux-v5.4/drivers/crypto/ |
| D | atmel-sha204a.c | 25 struct hwrng *rng = areq; in atmel_sha204a_rng_done() 36 static int atmel_sha204a_rng_read_nonblocking(struct hwrng *rng, void *data, in atmel_sha204a_rng_read_nonblocking() 42 i2c_priv = container_of(rng, struct atmel_i2c_client_priv, hwrng); in atmel_sha204a_rng_read_nonblocking() 70 static int atmel_sha204a_rng_read(struct hwrng *rng, void *data, size_t max, in atmel_sha204a_rng_read() 80 i2c_priv = container_of(rng, struct atmel_i2c_client_priv, hwrng); in atmel_sha204a_rng_read() 106 memset(&i2c_priv->hwrng, 0, sizeof(i2c_priv->hwrng)); in atmel_sha204a_probe() 108 i2c_priv->hwrng.name = dev_name(&client->dev); in atmel_sha204a_probe() 109 i2c_priv->hwrng.read = atmel_sha204a_rng_read; in atmel_sha204a_probe() 110 i2c_priv->hwrng.quality = 1024; in atmel_sha204a_probe() 112 ret = devm_hwrng_register(&client->dev, &i2c_priv->hwrng); in atmel_sha204a_probe() [all …]
|
| /Linux-v5.4/drivers/hid/ |
| D | hid-u2fzero.c | 63 struct hwrng hwrng; /* Embedded struct for hwrng */ member 176 static int u2fzero_rng_read(struct hwrng *rng, void *data, in u2fzero_rng_read() 180 struct u2fzero_device, hwrng); in u2fzero_rng_read() 237 dev->hwrng.name = dev->rng_name; in u2fzero_init_hwrng() 238 dev->hwrng.read = u2fzero_rng_read; in u2fzero_init_hwrng() 239 dev->hwrng.quality = 1; in u2fzero_init_hwrng() 241 return devm_hwrng_register(&dev->hdev->dev, &dev->hwrng); in u2fzero_init_hwrng()
|
| /Linux-v5.4/drivers/usb/misc/ |
| D | chaoskey.c | 27 static int chaoskey_rng_read(struct hwrng *rng, void *data, 87 struct hwrng hwrng; /* Embedded struct for hwrng */ member 201 dev->hwrng.name = dev->name ? dev->name : chaoskey_driver.name; in chaoskey_probe() 202 dev->hwrng.read = chaoskey_rng_read; in chaoskey_probe() 203 dev->hwrng.quality = 1024; in chaoskey_probe() 205 dev->hwrng_registered = (hwrng_register(&dev->hwrng) == 0); in chaoskey_probe() 232 hwrng_unregister(&dev->hwrng); in chaoskey_disconnect() 475 static int chaoskey_rng_read(struct hwrng *rng, void *data, in chaoskey_rng_read() 478 struct chaoskey *dev = container_of(rng, struct chaoskey, hwrng); in chaoskey_rng_read()
|
| /Linux-v5.4/drivers/firmware/ |
| D | turris-mox-rwtm.c | 53 struct hwrng hwrng; member 241 static int mox_hwrng_read(struct hwrng *rng, void *data, size_t max, bool wait) in mox_hwrng_read() 332 rwtm->hwrng.name = DRIVER_NAME "_hwrng"; in turris_mox_rwtm_probe() 333 rwtm->hwrng.read = mox_hwrng_read; in turris_mox_rwtm_probe() 334 rwtm->hwrng.priv = (unsigned long) rwtm; in turris_mox_rwtm_probe() 335 rwtm->hwrng.quality = 1024; in turris_mox_rwtm_probe() 337 ret = devm_hwrng_register(dev, &rwtm->hwrng); in turris_mox_rwtm_probe()
|
| /Linux-v5.4/drivers/crypto/amcc/ |
| D | crypto4xx_trng.c | 28 static int ppc4xx_trng_data_present(struct hwrng *rng, int wait) in ppc4xx_trng_data_present() 45 static int ppc4xx_trng_data_read(struct hwrng *rng, u32 *data) in ppc4xx_trng_data_read() 75 struct hwrng *rng = NULL; in ppc4xx_trng_probe()
|
| /Linux-v5.4/drivers/crypto/ccp/ |
| D | ccp-dev.c | 188 ccp->hwrng.name = ccp->rngname; in ccp_register_rng() 189 ccp->hwrng.read = ccp_trng_read; in ccp_register_rng() 190 ret = hwrng_register(&ccp->hwrng); in ccp_register_rng() 199 if (ccp->hwrng.name) in ccp_unregister_rng() 200 hwrng_unregister(&ccp->hwrng); in ccp_unregister_rng() 506 int ccp_trng_read(struct hwrng *rng, void *data, size_t max, bool wait) in ccp_trng_read() 508 struct ccp_device *ccp = container_of(rng, struct ccp_device, hwrng); in ccp_trng_read()
|