Home
last modified time | relevance | path

Searched refs:hwrng (Results 1 – 25 of 57) sorted by relevance

123

/linux/drivers/char/hw_random/
H A Dpasemi-rng.c32 static int pasemi_rng_data_present(struct hwrng *rng, int wait) in pasemi_rng_data_present()
47 static int pasemi_rng_data_read(struct hwrng *rng, u32 *data) in pasemi_rng_data_read()
54 static int pasemi_rng_init(struct hwrng *rng) in pasemi_rng_init()
66 static void pasemi_rng_cleanup(struct hwrng *rng) in pasemi_rng_cleanup()
76 static struct hwrng pasemi_rng = {
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 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()
H A Dpic32-rng.c29 struct hwrng rng;
39 static int pic32_rng_init(struct hwrng *rng) in pic32_rng_init()
48 static int pic32_rng_read(struct hwrng *rng, void *buf, size_t max, in pic32_rng_read()
69 static void pic32_rng_cleanup(struct hwrng *rng) in pic32_rng_cleanup()
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;
38 static inline struct bcm2835_rng_priv *to_rng_priv(struct hwrng *rng) in to_rng_priv()
63 static int bcm2835_rng_read(struct hwrng *rng, void *buf, size_t max, in bcm2835_rng_read()
86 static int bcm2835_rng_init(struct hwrng *rng) in bcm2835_rng_init()
116 static void bcm2835_rng_cleanup(struct hwrng *rng) in bcm2835_rng_cleanup()
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 = {
H A Dingenic-trng.c31 struct hwrng rng;
34 static int ingenic_trng_init(struct hwrng *rng) in ingenic_trng_init()
46 static void ingenic_trng_cleanup(struct hwrng *rng) in ingenic_trng_cleanup()
56 static int ingenic_trng_read(struct hwrng *rng, void *buf, size_t max, bool wait) in ingenic_trng_read()
H A Dmeson-rng.c26 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) in meson_rng_read()
59 static int meson_s4_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait) in meson_s4_rng_read()
H A Diproc-rng200.c41 struct hwrng rng;
89 static int iproc_rng200_read(struct hwrng *rng, void *buf, size_t max, in iproc_rng200_read()
150 static int iproc_rng200_init(struct hwrng *rng) in iproc_rng200_init()
159 static void iproc_rng200_cleanup(struct hwrng *rng) in iproc_rng200_cleanup()
H A Dba431-rng.c41 struct hwrng rng;
114 static int ba431_trng_read(struct hwrng *rng, void *buf, size_t max, bool wait) in ba431_trng_read()
154 static void ba431_trng_cleanup(struct hwrng *rng) in ba431_trng_cleanup()
162 static int ba431_trng_init(struct hwrng *rng) in ba431_trng_init()
H A Dxilinx-trng.c54 struct hwrng trng;
249 static int xtrng_hwrng_trng_read(struct hwrng *hwrng, void *data, size_t max, bool wait) in xtrng_hwrng_trng_read() argument
255 rng = container_of(hwrng, struct xilinx_rng, trng); in xtrng_hwrng_trng_read()
270 static int xtrng_hwrng_register(struct hwrng *trng) in xtrng_hwrng_register()
284 static void xtrng_hwrng_unregister(struct hwrng *trng) in xtrng_hwrng_unregister()
H A Dintel-rng.c167 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 = {
H A Dexynos-trng.c77 struct hwrng rng;
81 static int exynos_trng_do_read_reg(struct hwrng *rng, void *data, size_t max, in exynos_trng_do_read_reg()
99 static int exynos_trng_do_read_smc(struct hwrng *rng, void *data, size_t max, in exynos_trng_do_read_smc()
132 static int exynos_trng_init_reg(struct hwrng *rng) in exynos_trng_init_reg()
165 static int exynos_trng_init_smc(struct hwrng *rng) in exynos_trng_init_smc()
H A Dixp4xx-rng.c27 static int ixp4xx_rng_data_read(struct hwrng *rng, u32 *buffer) in ixp4xx_rng_data_read()
36 static struct hwrng ixp4xx_rng_ops = {
H A Dpowernv-rng.c15 static int powernv_rng_read(struct hwrng *rng, void *data, size_t max, bool wait) in powernv_rng_read()
31 static struct hwrng powernv_hwrng = {
H A Dairoha-trng.c47 struct hwrng rng;
75 static int airoha_trng_init(struct hwrng *rng) in airoha_trng_init()
124 static void airoha_trng_cleanup(struct hwrng *rng) in airoha_trng_cleanup()
137 static int airoha_trng_read(struct hwrng *rng, void *buf, size_t max, bool wait) in airoha_trng_read()
H A Dpseries-rng.c16 static int pseries_rng_read(struct hwrng *rng, void *data, size_t max, bool wait) in pseries_rng_read()
46 static struct hwrng pseries_rng = {
/linux/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()
207 static inline void test_mode_once(struct hwrng *rng, bool wait) in test_mode_once()
214 static void self_test(struct hwrng *rng) in self_test()
221 static int caam_init(struct hwrng *rng) in caam_init()
/linux/drivers/usb/misc/
H A Dchaoskey.c27 static int chaoskey_rng_read(struct hwrng *rng, void *data,
89 struct hwrng hwrng; /* Embedded struct for hwrng */ member
203 dev->hwrng.name = dev->name ? dev->name : chaoskey_driver.name; in chaoskey_probe()
204 dev->hwrng.read = chaoskey_rng_read; in chaoskey_probe()
206 dev->hwrng_registered = (hwrng_register(&dev->hwrng) == 0); in chaoskey_probe()
233 hwrng_unregister(&dev->hwrng); in chaoskey_disconnect()
500 static int chaoskey_rng_read(struct hwrng *rng, void *data, in chaoskey_rng_read()
503 struct chaoskey *dev = container_of(rng, struct chaoskey, hwrng); in chaoskey_rng_read()
/linux/drivers/hid/
H A Dhid-u2fzero.c83 struct hwrng hwrng; /* Embedded struct for hwrng */ member
197 static int u2fzero_rng_read(struct hwrng *rng, void *data, in u2fzero_rng_read()
201 struct u2fzero_device, hwrng); in u2fzero_rng_read()
262 dev->hwrng.name = dev->rng_name; in u2fzero_init_hwrng()
263 dev->hwrng.read = u2fzero_rng_read; in u2fzero_init_hwrng()
265 return devm_hwrng_register(&dev->hdev->dev, &dev->hwrng); in u2fzero_init_hwrng()
/linux/drivers/firmware/
H A Dturris-mox-rwtm.c90 struct hwrng hwrng; member
252 static int mox_hwrng_read(struct hwrng *rng, void *data, size_t max, bool wait) in mox_hwrng_read()
254 struct mox_rwtm *rwtm = container_of(rng, struct mox_rwtm, hwrng); in mox_hwrng_read()
475 rwtm->hwrng.name = DRIVER_NAME "_hwrng"; in turris_mox_rwtm_probe()
476 rwtm->hwrng.read = mox_hwrng_read; in turris_mox_rwtm_probe()
478 ret = devm_hwrng_register(dev, &rwtm->hwrng); in turris_mox_rwtm_probe()
/linux/drivers/crypto/amcc/
H A Dcrypto4xx_trng.c28 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/drivers/crypto/ccp/
H A Dccp-dev.c188 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()
/linux/drivers/char/tpm/
H A Dtpm-chip.c493 static int tpm_hwrng_read(struct hwrng *rng, void *data, size_t max, bool wait) in tpm_hwrng_read()
495 struct tpm_chip *chip = container_of(rng, struct tpm_chip, hwrng); in tpm_hwrng_read()
518 chip->hwrng.name = chip->hwrng_name; in tpm_add_hwrng()
519 chip->hwrng.read = tpm_hwrng_read; in tpm_add_hwrng()
520 return hwrng_register(&chip->hwrng); in tpm_add_hwrng()
619 hwrng_unregister(&chip->hwrng); in tpm_chip_register()
654 hwrng_unregister(&chip->hwrng); in tpm_chip_unregister()

123