Home
last modified time | relevance | path

Searched refs:rng (Results 1 – 25 of 302) sorted by relevance

12345678910>>...13

/linux/drivers/crypto/
A Dexynos-rng.c127 rng->bytes_seeding = 0; in exynos_rng_set_seed()
199 struct exynos_rng_dev *rng = ctx->rng; in exynos_rng_generate() local
229 struct exynos_rng_dev *rng = ctx->rng; in exynos_rng_seed() local
276 rng = devm_kzalloc(&pdev->dev, sizeof(*rng), GFP_KERNEL); in exynos_rng_probe()
277 if (!rng) in exynos_rng_probe()
284 rng->dev = &pdev->dev; in exynos_rng_probe()
292 if (IS_ERR(rng->mem)) in exynos_rng_probe()
297 exynos_rng_dev = rng; in exynos_rng_probe()
335 exynos_rng_get_random(rng, rng->seed_save, sizeof(rng->seed_save), in exynos_rng_suspend()
341 rng->seed_save_len); in exynos_rng_suspend()
[all …]
A Dqcom-rng.c37 struct qcom_rng *rng; member
76 struct qcom_rng *rng = ctx->rng; in qcom_rng_generate() local
83 mutex_lock(&rng->lock); in qcom_rng_generate()
132 ctx->rng = qcom_rng_dev; in qcom_rng_init()
157 struct qcom_rng *rng; in qcom_rng_probe() local
160 rng = devm_kzalloc(&pdev->dev, sizeof(*rng), GFP_KERNEL); in qcom_rng_probe()
161 if (!rng) in qcom_rng_probe()
165 mutex_init(&rng->lock); in qcom_rng_probe()
168 if (IS_ERR(rng->base)) in qcom_rng_probe()
174 if (IS_ERR(rng->clk)) in qcom_rng_probe()
[all …]
/linux/drivers/char/hw_random/
A Dcore.c81 rng->cleanup(rng); in cleanup_rng()
132 return rng; in get_current_rng()
142 if (rng) in put_rng()
155 ret = rng->init(rng); in hwrng_init()
192 return rng->read(rng, (void *)buffer, size, wait); in rng_get_data()
195 present = rng->data_present(rng, wait); in rng_get_data()
200 return rng->data_read(rng, (u32 *)buffer); in rng_get_data()
219 if (!rng) { in rng_dev_read()
433 if (IS_ERR(rng) || !rng) in hwrng_fillfn()
469 if (!rng->name || (!rng->data_read && !rng->read)) in hwrng_register()
[all …]
A DMakefile6 obj-$(CONFIG_HW_RANDOM) += rng-core.o
7 rng-core-y := core.o
9 obj-$(CONFIG_HW_RANDOM_INTEL) += intel-rng.o
10 obj-$(CONFIG_HW_RANDOM_AMD) += amd-rng.o
11 obj-$(CONFIG_HW_RANDOM_ATMEL) += atmel-rng.o
14 obj-$(CONFIG_HW_RANDOM_N2RNG) += n2-rng.o
15 n2-rng-y := n2-drv.o n2-asm.o
16 obj-$(CONFIG_HW_RANDOM_VIA) += via-rng.o
19 obj-$(CONFIG_HW_RANDOM_OMAP) += omap-rng.o
35 obj-$(CONFIG_HW_RANDOM_ST) += st-rng.o
[all …]
A Dhisi-rng.c31 struct hwrng rng; member
75 struct hisi_rng *rng; in hisi_rng_probe() local
78 rng = devm_kzalloc(&pdev->dev, sizeof(*rng), GFP_KERNEL); in hisi_rng_probe()
79 if (!rng) in hisi_rng_probe()
85 if (IS_ERR(rng->base)) in hisi_rng_probe()
86 return PTR_ERR(rng->base); in hisi_rng_probe()
88 rng->rng.name = pdev->name; in hisi_rng_probe()
89 rng->rng.init = hisi_rng_init; in hisi_rng_probe()
90 rng->rng.cleanup = hisi_rng_cleanup; in hisi_rng_probe()
91 rng->rng.read = hisi_rng_read; in hisi_rng_probe()
[all …]
A Dmtk-rng.c38 struct hwrng rng; member
43 struct mtk_rng *priv = to_mtk_rng(rng); in mtk_rng_init()
60 struct mtk_rng *priv = to_mtk_rng(rng); in mtk_rng_cleanup()
91 if (!mtk_rng_wait_ready(rng, wait)) in mtk_rng_read()
115 priv->rng.name = pdev->name; in mtk_rng_probe()
117 priv->rng.init = mtk_rng_init; in mtk_rng_probe()
118 priv->rng.cleanup = mtk_rng_cleanup; in mtk_rng_probe()
120 priv->rng.read = mtk_rng_read; in mtk_rng_probe()
122 priv->rng.quality = 900; in mtk_rng_probe()
157 mtk_rng_cleanup(&priv->rng); in mtk_rng_runtime_suspend()
[all …]
A Docteon-rng.c28 static int octeon_rng_init(struct hwrng *rng) in octeon_rng_init() argument
40 static void octeon_rng_cleanup(struct hwrng *rng) in octeon_rng_cleanup() argument
62 struct octeon_rng *rng; in octeon_rng_probe() local
71 rng = devm_kzalloc(&pdev->dev, sizeof(*rng), GFP_KERNEL); in octeon_rng_probe()
72 if (!rng) in octeon_rng_probe()
84 rng->control_status = devm_ioremap(&pdev->dev, in octeon_rng_probe()
87 if (!rng->control_status) in octeon_rng_probe()
90 rng->result = devm_ioremap(&pdev->dev, in octeon_rng_probe()
93 if (!rng->result) in octeon_rng_probe()
96 rng->ops = ops; in octeon_rng_probe()
[all …]
A Dstm32-rng.c31 struct hwrng rng; member
41 container_of(rng, struct stm32_rng_private, rng); in stm32_rng_read()
85 container_of(rng, struct stm32_rng_private, rng); in stm32_rng_init()
107 container_of(rng, struct stm32_rng_private, rng); in stm32_rng_cleanup()
150 priv->rng.init = stm32_rng_init; in stm32_rng_probe()
151 priv->rng.cleanup = stm32_rng_cleanup; in stm32_rng_probe()
153 priv->rng.read = stm32_rng_read; in stm32_rng_probe()
154 priv->rng.priv = (unsigned long) dev; in stm32_rng_probe()
155 priv->rng.quality = 900; in stm32_rng_probe()
176 stm32_rng_cleanup(&priv->rng); in stm32_rng_runtime_suspend()
[all …]
A Dnpcm-rng.c33 struct hwrng rng; member
36 static int npcm_rng_init(struct hwrng *rng) in npcm_rng_init() argument
38 struct npcm_rng *priv = to_npcm_rng(rng); in npcm_rng_init()
48 struct npcm_rng *priv = to_npcm_rng(rng); in npcm_rng_cleanup()
106 priv->rng.init = npcm_rng_init; in npcm_rng_probe()
107 priv->rng.cleanup = npcm_rng_cleanup; in npcm_rng_probe()
109 priv->rng.name = pdev->name; in npcm_rng_probe()
110 priv->rng.read = npcm_rng_read; in npcm_rng_probe()
112 priv->rng.quality = 1000; in npcm_rng_probe()
144 npcm_rng_cleanup(&priv->rng); in npcm_rng_runtime_suspend()
[all …]
A Dmxc-rnga.c56 struct hwrng rng; member
64 struct mxc_rng *mxc_rng = container_of(rng, struct mxc_rng, rng); in mxc_rnga_data_present()
81 struct mxc_rng *mxc_rng = container_of(rng, struct mxc_rng, rng); in mxc_rnga_data_read()
100 static int mxc_rnga_init(struct hwrng *rng) in mxc_rnga_init() argument
103 struct mxc_rng *mxc_rng = container_of(rng, struct mxc_rng, rng); in mxc_rnga_init()
126 struct mxc_rng *mxc_rng = container_of(rng, struct mxc_rng, rng); in mxc_rnga_cleanup()
144 mxc_rng->rng.name = "mxc-rnga"; in mxc_rnga_probe()
145 mxc_rng->rng.init = mxc_rnga_init; in mxc_rnga_probe()
146 mxc_rng->rng.cleanup = mxc_rnga_cleanup; in mxc_rnga_probe()
166 err = hwrng_register(&mxc_rng->rng); in mxc_rnga_probe()
[all …]
A Dcavium-rng-vf.c46 struct cavium_rng *rng; in cavium_rng_probe_vf() local
49 rng = devm_kzalloc(&pdev->dev, sizeof(*rng), GFP_KERNEL); in cavium_rng_probe_vf()
50 if (!rng) in cavium_rng_probe_vf()
54 rng->result = pcim_iomap(pdev, 0, 0); in cavium_rng_probe_vf()
55 if (!rng->result) { in cavium_rng_probe_vf()
60 rng->ops.name = devm_kasprintf(&pdev->dev, GFP_KERNEL, in cavium_rng_probe_vf()
62 if (!rng->ops.name) in cavium_rng_probe_vf()
65 rng->ops.read = cavium_rng_read; in cavium_rng_probe_vf()
66 rng->ops.quality = 1000; in cavium_rng_probe_vf()
68 pci_set_drvdata(pdev, rng); in cavium_rng_probe_vf()
[all …]
A Dingenic-rng.c36 struct hwrng rng; member
39 static int ingenic_rng_init(struct hwrng *rng) in ingenic_rng_init() argument
41 struct ingenic_rng *priv = container_of(rng, struct ingenic_rng, rng); in ingenic_rng_init()
50 struct ingenic_rng *priv = container_of(rng, struct ingenic_rng, rng); in ingenic_rng_cleanup()
57 struct ingenic_rng *priv = container_of(rng, struct ingenic_rng, rng); in ingenic_rng_read()
100 priv->rng.name = pdev->name; in ingenic_rng_probe()
101 priv->rng.init = ingenic_rng_init; in ingenic_rng_probe()
102 priv->rng.cleanup = ingenic_rng_cleanup; in ingenic_rng_probe()
103 priv->rng.read = ingenic_rng_read; in ingenic_rng_probe()
105 ret = hwrng_register(&priv->rng); in ingenic_rng_probe()
[all …]
A Dcavium-rng.c29 struct cavium_rng_pf *rng; in cavium_rng_probe() local
32 rng = devm_kzalloc(&pdev->dev, sizeof(*rng), GFP_KERNEL); in cavium_rng_probe()
33 if (!rng) in cavium_rng_probe()
37 rng->control_status = pcim_iomap(pdev, 0, 0); in cavium_rng_probe()
38 if (!rng->control_status) { in cavium_rng_probe()
46 rng->control_status); in cavium_rng_probe()
48 pci_set_drvdata(pdev, rng); in cavium_rng_probe()
54 writeq(0, rng->control_status); in cavium_rng_probe()
67 struct cavium_rng_pf *rng; in cavium_rng_remove() local
69 rng = pci_get_drvdata(pdev); in cavium_rng_remove()
[all …]
A Dingenic-trng.c35 struct hwrng rng; member
38 static int ingenic_trng_init(struct hwrng *rng) in ingenic_trng_init() argument
40 struct ingenic_trng *trng = container_of(rng, struct ingenic_trng, rng); in ingenic_trng_init()
52 struct ingenic_trng *trng = container_of(rng, struct ingenic_trng, rng); in ingenic_trng_cleanup()
62 struct ingenic_trng *trng = container_of(rng, struct ingenic_trng, rng); in ingenic_trng_read()
108 trng->rng.name = pdev->name; in ingenic_trng_probe()
109 trng->rng.init = ingenic_trng_init; in ingenic_trng_probe()
110 trng->rng.cleanup = ingenic_trng_cleanup; in ingenic_trng_probe()
111 trng->rng.read = ingenic_trng_read; in ingenic_trng_probe()
113 ret = hwrng_register(&trng->rng); in ingenic_trng_probe()
[all …]
A Dbuilt-in.a5 omap-rng.o/
6 virtio-rng.o/
7 hisi-rng.o/
8 bcm2835-rng.o/
10 xgene-rng.o/
11 meson-rng.o/
12 cavium-rng.o/
13 cavium-rng-vf.o/
14 mtk-rng.o/
15 optee-rng.o/
A Diproc-rng200.c50 struct hwrng rng; member
54 #define to_rng_priv(rng) container_of(rng, struct iproc_rng200_dev, rng) argument
101 struct iproc_rng200_dev *priv = to_rng_priv(rng); in iproc_rng200_read()
159 static int iproc_rng200_init(struct hwrng *rng) in iproc_rng200_init() argument
161 struct iproc_rng200_dev *priv = to_rng_priv(rng); in iproc_rng200_init()
170 struct iproc_rng200_dev *priv = to_rng_priv(rng); in iproc_rng200_cleanup()
192 priv->rng.name = "iproc-rng200"; in iproc_rng200_probe()
193 priv->rng.read = iproc_rng200_read; in iproc_rng200_probe()
194 priv->rng.init = iproc_rng200_init; in iproc_rng200_probe()
195 priv->rng.cleanup = iproc_rng200_cleanup; in iproc_rng200_probe()
[all …]
A Dba431-rng.c42 struct hwrng rng; member
117 struct ba431_trng *ba431 = container_of(rng, struct ba431_trng, rng); in ba431_trng_read()
155 static void ba431_trng_cleanup(struct hwrng *rng) in ba431_trng_cleanup() argument
157 struct ba431_trng *ba431 = container_of(rng, struct ba431_trng, rng); in ba431_trng_cleanup()
163 static int ba431_trng_init(struct hwrng *rng) in ba431_trng_init() argument
165 struct ba431_trng *ba431 = container_of(rng, struct ba431_trng, rng); in ba431_trng_init()
187 ba431->rng.name = pdev->name; in ba431_trng_probe()
188 ba431->rng.init = ba431_trng_init; in ba431_trng_probe()
189 ba431->rng.cleanup = ba431_trng_cleanup; in ba431_trng_probe()
190 ba431->rng.read = ba431_trng_read; in ba431_trng_probe()
[all …]
A Dbcm2835-rng.c32 struct hwrng rng; member
41 return container_of(rng, struct bcm2835_rng_priv, rng); in to_rng_priv()
67 struct bcm2835_rng_priv *priv = to_rng_priv(rng); in bcm2835_rng_read()
87 static int bcm2835_rng_init(struct hwrng *rng) in bcm2835_rng_init() argument
89 struct bcm2835_rng_priv *priv = to_rng_priv(rng); in bcm2835_rng_init()
115 static void bcm2835_rng_cleanup(struct hwrng *rng) in bcm2835_rng_cleanup() argument
169 priv->rng.name = pdev->name; in bcm2835_rng_probe()
170 priv->rng.init = bcm2835_rng_init; in bcm2835_rng_probe()
171 priv->rng.read = bcm2835_rng_read; in bcm2835_rng_probe()
172 priv->rng.cleanup = bcm2835_rng_cleanup; in bcm2835_rng_probe()
[all …]
A Dtx4939-rng.c29 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()
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()
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()
/linux/arch/powerpc/platforms/powernv/
A Drng.c37 put_cpu_var(rng); in powernv_hwrng_present()
38 return rng != NULL; in powernv_hwrng_present()
49 val ^= rng->mask; in rng_whiten()
52 rng->mask = (rng->mask << 1) | (parity & 1); in rng_whiten()
63 *v = rng_whiten(rng, __raw_rm_readq(rng->regs_real)); in powernv_get_random_real_mode()
109 *v = rng_whiten(rng, in_be64(rng->regs)); in powernv_get_random_long()
140 rng = kzalloc(sizeof(*rng), GFP_KERNEL); in rng_create()
141 if (!rng) in rng_create()
145 kfree(rng); in rng_create()
153 kfree(rng); in rng_create()
[all …]
/linux/Documentation/devicetree/bindings/rng/
A Dmtk-rng.yaml4 $id: "http://devicetree.org/schemas/rng/mtk-rng.yaml#"
14 pattern: "^rng@[0-9a-f]+$"
19 - mediatek,mt7623-rng
22 - mediatek,mt7622-rng
23 - mediatek,mt7629-rng
24 - mediatek,mt7986-rng
25 - mediatek,mt8365-rng
26 - mediatek,mt8516-rng
37 - const: rng
50 rng: rng@1020f000 {
[all …]
A Dbrcm,bcm2835.yaml17 - brcm,bcm2835-rng
18 - brcm,bcm-nsp-rng
19 - brcm,bcm5301x-rng
20 - brcm,bcm6368-rng
48 - brcm,bcm6368-rng
60 rng@7e104000 {
61 compatible = "brcm,bcm2835-rng";
67 rng@18033000 {
68 compatible = "brcm,bcm-nsp-rng";
73 rng@10004180 {
[all …]
/linux/crypto/
A Djitterentropy-kcapi.c120 if (!rng->entropy_collector) in jent_kcapi_init()
123 spin_lock_init(&rng->jent_lock); in jent_kcapi_init()
131 spin_lock(&rng->jent_lock); in jent_kcapi_cleanup()
132 if (rng->entropy_collector) in jent_kcapi_cleanup()
134 rng->entropy_collector = NULL; in jent_kcapi_cleanup()
135 spin_unlock(&rng->jent_lock); in jent_kcapi_cleanup()
145 spin_lock(&rng->jent_lock); in jent_kcapi_random()
148 if (rng->reset_cnt > (1<<10)) { in jent_kcapi_random()
161 rng->reset_cnt++; in jent_kcapi_random()
165 rng->reset_cnt = 0; in jent_kcapi_random()
[all …]
/linux/drivers/crypto/amcc/
A Dcrypto4xx_trng.c30 struct crypto4xx_device *dev = (void *)rng->priv; in ppc4xx_trng_data_present()
47 struct crypto4xx_device *dev = (void *)rng->priv; in ppc4xx_trng_data_read()
75 struct hwrng *rng = NULL; in ppc4xx_trng_probe() local
90 rng = kzalloc(sizeof(*rng), GFP_KERNEL); in ppc4xx_trng_probe()
91 if (!rng) in ppc4xx_trng_probe()
94 rng->name = KBUILD_MODNAME; in ppc4xx_trng_probe()
95 rng->data_present = ppc4xx_trng_data_present; in ppc4xx_trng_probe()
96 rng->data_read = ppc4xx_trng_data_read; in ppc4xx_trng_probe()
97 rng->priv = (unsigned long) dev; in ppc4xx_trng_probe()
98 core_dev->trng = rng; in ppc4xx_trng_probe()
[all …]
/linux/include/linux/
A Dhw_random.h41 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 *rng);
62 extern void devm_hwrng_unregister(struct device *dve, struct hwrng *rng);

Completed in 56 milliseconds

12345678910>>...13