Home
last modified time | relevance | path

Searched refs:hwrng (Results 1 - 25 of 150) sorted by relevance

123456

/kernel/linux/linux-6.6/include/linux/
H A Dhw_random.h21 * 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...]
/kernel/linux/linux-5.10/include/linux/
H A Dhw_random.h21 * 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);
58 extern int hwrng_register(struct hwrng *rng);
59 extern int devm_hwrng_register(struct device *dev, struct hwrng *rng);
61 extern void hwrng_unregister(struct hwrng *rn
[all...]
/kernel/linux/linux-6.6/drivers/char/hw_random/
H A Dcore.c33 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) in add_early_randomness()
82 struct hwrng *rng = container_of(kref, struct hwrng, ref); in cleanup_rng()
90 static int set_current_rng(struct hwrng *rng) in set_current_rng()
103 /* if necessary, start hwrng threa in set_current_rng()
[all...]
H A Dvirtio-rng.c20 struct hwrng hwrng; member
78 static int virtio_read(struct hwrng *rng, void *buf, size_t size, bool wait) in virtio_read()
122 static void virtio_cleanup(struct hwrng *rng) in virtio_cleanup()
146 vi->hwrng = (struct hwrng) { in probe_common()
184 hwrng_unregister(&vi->hwrng); in remove_common()
206 err = hwrng_register(&vi->hwrng); in virtrng_scan()
232 err = hwrng_register(&vi->hwrng); in virtrng_restore()
H A Docteon-rng.c23 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()
H A Dpasemi-rng.c33 static int pasemi_rng_data_present(struct hwrng *rng, int wait) in pasemi_rng_data_present()
48 static int pasemi_rng_data_read(struct hwrng *rng, u32 *data) in pasemi_rng_data_read()
55 static int pasemi_rng_init(struct hwrng *rng) in pasemi_rng_init()
67 static void pasemi_rng_cleanup(struct hwrng *rng) in pasemi_rng_cleanup()
77 static struct hwrng pasemi_rng = {
H A Dmxc-rnga.c56 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()
H A Dks-sa-rng.c85 struct hwrng rng;
113 static int ks_sa_rng_init(struct hwrng *rng) in ks_sa_rng_init()
154 static void ks_sa_rng_cleanup(struct hwrng *rng) in ks_sa_rng_cleanup()
165 static int ks_sa_rng_data_read(struct hwrng *rng, u32 *data) in ks_sa_rng_data_read()
180 static int ks_sa_rng_data_present(struct hwrng *rng, int wait) in ks_sa_rng_data_present()
221 ks_sa_rng->rng = (struct hwrng) { in ks_sa_rng_probe()
/kernel/linux/linux-5.10/drivers/char/hw_random/
H A Dcore.c34 static struct hwrng *current_rng;
51 "current hwrng entropy estimation per 1024 bits of input");
54 "default entropy content of hwrng per 1024 bits of input");
57 static int hwrng_init(struct hwrng *rng);
60 static inline int rng_get_data(struct hwrng *rng, u8 *buffer, size_t size,
68 static void add_early_randomness(struct hwrng *rng) in add_early_randomness()
82 struct hwrng *rng = container_of(kref, struct hwrng, ref); in cleanup_rng()
90 static int set_current_rng(struct hwrng *rng) in set_current_rng()
117 /* Returns ERR_PTR(), NULL or refcounted hwrng */
[all...]
H A Dvirtio-rng.c20 struct hwrng hwrng; member
78 static int virtio_read(struct hwrng *rng, void *buf, size_t size, bool wait) in virtio_read()
122 static void virtio_cleanup(struct hwrng *rng) in virtio_cleanup()
146 vi->hwrng = (struct hwrng) { in probe_common()
184 hwrng_unregister(&vi->hwrng); in remove_common()
205 err = hwrng_register(&vi->hwrng); in virtrng_scan()
231 err = hwrng_register(&vi->hwrng); in virtrng_restore()
H A Docteon-rng.c23 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()
H A Dpasemi-rng.c34 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 = {
H A Dmxc-rnga.c56 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()
H A Dbcm2835-rng.c31 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()
181 dev_err(dev, "hwrng registration failed\n"); in bcm2835_rng_probe()
183 dev_info(dev, "hwrng registered\n"); in bcm2835_rng_probe()
H A Dks-sa-rng.c85 struct hwrng rng;
113 static int ks_sa_rng_init(struct hwrng *rng) in ks_sa_rng_init()
154 static void ks_sa_rng_cleanup(struct hwrng *rng) in ks_sa_rng_cleanup()
165 static int ks_sa_rng_data_read(struct hwrng *rng, u32 *data) in ks_sa_rng_data_read()
180 static int ks_sa_rng_data_present(struct hwrng *rng, int wait) in ks_sa_rng_data_present()
221 ks_sa_rng->rng = (struct hwrng) { in ks_sa_rng_probe()
H A Dingenic-rng.c36 struct hwrng rng;
39 static int ingenic_rng_init(struct hwrng *rng) in ingenic_rng_init()
48 static void ingenic_rng_cleanup(struct hwrng *rng) in ingenic_rng_cleanup()
55 static int ingenic_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait) in ingenic_rng_read()
107 dev_err(&pdev->dev, "Failed to register hwrng\n"); in ingenic_rng_probe()
H A Dhisi-rng.c31 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()
95 dev_err(&pdev->dev, "failed to register hwrng\n"); in hisi_rng_probe()
H A Dvia-rng.c87 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 = {
/kernel/linux/linux-5.10/drivers/crypto/
H A Datmel-sha204a.c25 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 in atmel_sha204a_probe()
[all...]
/kernel/linux/linux-5.10/arch/um/drivers/
H A Drandom.c31 static struct hwrng hwrng; variable
34 static int rng_dev_read(struct hwrng *rng, void *buf, size_t max, bool block) in rng_dev_read()
83 hwrng.name = RNG_MODULE_NAME; in rng_init()
84 hwrng.read = rng_dev_read; in rng_init()
85 hwrng.quality = 1024; in rng_init()
87 err = hwrng_register(&hwrng); in rng_init()
113 hwrng_unregister(&hwrng); in rng_cleanup()
/kernel/linux/linux-6.6/drivers/crypto/
H A Datmel-sha204a.c25 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()
105 memset(&i2c_priv->hwrng, 0, sizeof(i2c_priv->hwrng)); in atmel_sha204a_probe()
107 i2c_priv->hwrng.name = dev_name(&client->dev); in atmel_sha204a_probe()
108 i2c_priv->hwrng.read = atmel_sha204a_rng_read; in atmel_sha204a_probe()
110 ret = devm_hwrng_register(&client->dev, &i2c_priv->hwrng); in atmel_sha204a_probe()
[all...]
/kernel/linux/linux-6.6/arch/um/drivers/
H A Drandom.c31 static struct hwrng hwrng; variable
34 static int rng_dev_read(struct hwrng *rng, void *buf, size_t max, bool block) in rng_dev_read()
83 hwrng.name = RNG_MODULE_NAME; in rng_init()
84 hwrng.read = rng_dev_read; in rng_init()
86 err = hwrng_register(&hwrng); in rng_init()
112 hwrng_unregister(&hwrng); in rng_cleanup()
/kernel/linux/linux-5.10/drivers/hid/
H A Dhid-u2fzero.c63 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()
241 dev->hwrng.name = dev->rng_name; in u2fzero_init_hwrng()
242 dev->hwrng.read = u2fzero_rng_read; in u2fzero_init_hwrng()
243 dev->hwrng.quality = 1; in u2fzero_init_hwrng()
245 return devm_hwrng_register(&dev->hdev->dev, &dev->hwrng); in u2fzero_init_hwrng()
/kernel/linux/linux-6.6/drivers/crypto/caam/
H A Dcaamrng.c38 struct hwrng rng;
52 static struct caam_rng_ctx *to_caam_rng_ctx(struct hwrng *r) in to_caam_rng_ctx()
147 static int caam_read(struct hwrng *rng, void *dst, size_t max, bool wait) in caam_read()
166 static void caam_cleanup(struct hwrng *rng) in caam_cleanup()
176 static inline void test_len(struct hwrng *rng, size_t len, bool wait) in test_len()
205 static inline void test_mode_once(struct hwrng *rng, bool wait) in test_mode_once()
212 static void self_test(struct hwrng *rng) in self_test()
219 static int caam_init(struct hwrng *rng) in caam_init()
/kernel/linux/linux-5.10/drivers/usb/misc/
H A Dchaoskey.c27 static int chaoskey_rng_read(struct hwrng *rng, void *data,
87 struct hwrng hwrng; /* Embedded struct for hwrng */ member
88 int hwrng_registered; /* registered with hwrng API */
170 * device needs a unique name for the hwrng code in chaoskey_probe()
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) in chaoskey_probe()
[all...]

Completed in 10 milliseconds

123456