/linux-master/include/linux/ |
H A D | hw_random.h | 21 * struct hwrng - Hardware Random Number Generator driver 39 struct hwrng { struct 41 int (*init)(struct hwrng *rng); 42 void (*cleanup)(struct hwrng *rng); 43 int (*data_present)(struct hwrng *rng, int wait); 44 int (*data_read)(struct hwrng *rng, u32 *data); 45 int (*read)(struct hwrng *rng, void *data, size_t max, bool wait); 59 extern int hwrng_register(struct hwrng *rng); 60 extern int devm_hwrng_register(struct device *dev, struct hwrng *rng); 62 extern void hwrng_unregister(struct hwrng *rn [all...] |
/linux-master/arch/um/drivers/ |
H A D | random.c | 31 static struct hwrng hwrng; variable in typeref:struct:hwrng 34 static int rng_dev_read(struct hwrng *rng, void *buf, size_t max, bool block) 83 hwrng.name = RNG_MODULE_NAME; 84 hwrng.read = rng_dev_read; 86 err = hwrng_register(&hwrng); 112 hwrng_unregister(&hwrng);
|
/linux-master/drivers/crypto/ |
H A D | atmel-sha204a.c | 25 struct hwrng *rng = areq; 36 static int atmel_sha204a_rng_read_nonblocking(struct hwrng *rng, void *data, 42 i2c_priv = container_of(rng, struct atmel_i2c_client_priv, hwrng); 70 static int atmel_sha204a_rng_read(struct hwrng *rng, void *data, size_t max, 80 i2c_priv = container_of(rng, struct atmel_i2c_client_priv, hwrng); 105 memset(&i2c_priv->hwrng, 0, sizeof(i2c_priv->hwrng)); 107 i2c_priv->hwrng.name = dev_name(&client->dev); 108 i2c_priv->hwrng.read = atmel_sha204a_rng_read; 110 ret = devm_hwrng_register(&client->dev, &i2c_priv->hwrng); [all...] |
H A D | qcom-rng.c | 38 struct hwrng hwrng; member in struct:qcom_rng 116 static int qcom_hwrng_read(struct hwrng *hwrng, void *data, size_t max, bool wait) argument 118 struct qcom_rng *qrng = container_of(hwrng, struct qcom_rng, hwrng); 210 rng->hwrng.name = "qcom_hwrng"; 211 rng->hwrng.read = qcom_hwrng_read; 212 rng->hwrng.quality = QCOM_TRNG_QUALITY; 213 ret = devm_hwrng_register(&pdev->dev, &rng->hwrng); [all...] |
H A D | atmel-i2c.h | 142 struct hwrng hwrng; member in struct:atmel_i2c_client_priv
|
/linux-master/drivers/char/hw_random/ |
H A D | core.c | 33 static struct hwrng *current_rng; 50 "current hwrng entropy estimation per 1024 bits of input -- obsolete, use rng_quality instead"); 53 "default maximum entropy content of hwrng per 1024 bits of input"); 56 static int hwrng_init(struct hwrng *rng); 59 static inline int rng_get_data(struct hwrng *rng, u8 *buffer, size_t size, 67 static void add_early_randomness(struct hwrng *rng) 82 struct hwrng *rng = container_of(kref, struct hwrng, ref); 90 static int set_current_rng(struct hwrng *rng) 103 /* if necessary, start hwrng threa [all...] |
H A D | pasemi-rng.c | 33 static int pasemi_rng_data_present(struct hwrng *rng, int wait) 48 static int pasemi_rng_data_read(struct hwrng *rng, u32 *data) 55 static int pasemi_rng_init(struct hwrng *rng) 67 static void pasemi_rng_cleanup(struct hwrng *rng) 77 static struct hwrng pasemi_rng = {
|
H A D | octeon-rng.c | 23 struct hwrng ops; 28 static int octeon_rng_init(struct hwrng *rng) 40 static void octeon_rng_cleanup(struct hwrng *rng) 50 static int octeon_rng_data_read(struct hwrng *rng, u32 *data) 64 struct hwrng ops = {
|
H A D | via-rng.c | 87 static int via_rng_data_present(struct hwrng *rng, int wait) 120 static int via_rng_data_read(struct hwrng *rng, u32 *data) 129 static int via_rng_init(struct hwrng *rng) 187 static struct hwrng via_rng = {
|
H A D | pic32-rng.c | 30 struct hwrng rng; 40 static int pic32_rng_init(struct hwrng *rng) 49 static int pic32_rng_read(struct hwrng *rng, void *buf, size_t max, 70 static void pic32_rng_cleanup(struct hwrng *rng)
|
H A D | ingenic-trng.c | 32 struct hwrng rng; 35 static int ingenic_trng_init(struct hwrng *rng) 47 static void ingenic_trng_cleanup(struct hwrng *rng) 57 static int ingenic_trng_read(struct hwrng *rng, void *buf, size_t max, bool wait) 103 return dev_err_probe(&pdev->dev, ret, "Failed to register hwrng\n");
|
H A D | ingenic-rng.c | 36 struct hwrng rng; 39 static int ingenic_rng_init(struct hwrng *rng) 48 static void ingenic_rng_cleanup(struct hwrng *rng) 55 static int ingenic_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait) 107 dev_err(&pdev->dev, "Failed to register hwrng\n");
|
H A D | hisi-rng.c | 31 struct hwrng rng; 34 static int hisi_rng_init(struct hwrng *rng) 57 static void hisi_rng_cleanup(struct hwrng *rng) 64 static int hisi_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait) 93 return dev_err_probe(&pdev->dev, ret, "failed to register hwrng\n");
|
H A D | virtio-rng.c | 20 struct hwrng hwrng; member in struct:virtrng_info 78 static int virtio_read(struct hwrng *rng, void *buf, size_t size, bool wait) 122 static void virtio_cleanup(struct hwrng *rng) 146 vi->hwrng = (struct hwrng) { 184 hwrng_unregister(&vi->hwrng); 206 err = hwrng_register(&vi->hwrng); 231 err = hwrng_register(&vi->hwrng);
|
H A D | pseries-rng.c | 16 static int pseries_rng_read(struct hwrng *rng, void *data, size_t max, bool wait) 46 static struct hwrng pseries_rng = {
|
H A D | ixp4xx-rng.c | 27 static int ixp4xx_rng_data_read(struct hwrng *rng, u32 *buffer) 36 static struct hwrng ixp4xx_rng_ops = {
|
H A D | powernv-rng.c | 16 static int powernv_rng_read(struct hwrng *rng, void *data, size_t max, bool wait) 32 static struct hwrng powernv_hwrng = { 50 pr_info("Registered powernv hwrng.\n");
|
H A D | geode-rng.c | 59 static int geode_rng_data_read(struct hwrng *rng, u32 *data) 69 static int geode_rng_data_present(struct hwrng *rng, int wait) 85 static struct hwrng geode_rng = {
|
H A D | amd-rng.c | 62 static int amd_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait) 95 static int amd_rng_init(struct hwrng *rng) 111 static void amd_rng_cleanup(struct hwrng *rng) 121 static struct hwrng amd_rng = {
|
H A D | meson-rng.c | 26 int (*read)(struct hwrng *rng, void *buf, size_t max, bool wait); 31 struct hwrng rng; 35 static int meson_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait) 59 static int meson_s4_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait)
|
H A D | timeriomem-rng.c | 41 struct hwrng rng_ops; 44 static int timeriomem_rng_read(struct hwrng *hwrng, void *data, argument 48 container_of(hwrng, struct timeriomem_rng_private, rng_ops);
|
H A D | npcm-rng.c | 34 struct hwrng rng; 38 static int npcm_rng_init(struct hwrng *rng) 47 static void npcm_rng_cleanup(struct hwrng *rng) 54 static int npcm_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait)
|
H A D | n2rng.h | 112 struct hwrng hwrng; member in struct:n2rng
|
/linux-master/drivers/crypto/caam/ |
H A D | caamrng.c | 38 struct hwrng rng; 52 static struct caam_rng_ctx *to_caam_rng_ctx(struct hwrng *r) 147 static int caam_read(struct hwrng *rng, void *dst, size_t max, bool wait) 166 static void caam_cleanup(struct hwrng *rng) 176 static inline void test_len(struct hwrng *rng, size_t len, bool wait) 205 static inline void test_mode_once(struct hwrng *rng, bool wait) 212 static void self_test(struct hwrng *rng) 219 static int caam_init(struct hwrng *rng)
|
/linux-master/drivers/crypto/amcc/ |
H A D | crypto4xx_trng.c | 28 static int ppc4xx_trng_data_present(struct hwrng *rng, int wait) 45 static int ppc4xx_trng_data_read(struct hwrng *rng, u32 *data) 75 struct hwrng *rng = NULL; 104 dev_err(core_dev->device, "failed to register hwrng (%d).\n",
|