Home
last modified time | relevance | path

Searched refs:trng (Results 1 – 25 of 28) sorted by relevance

12

/kernel/linux/linux-5.10/drivers/char/hw_random/
Datmel-rng.c42 struct atmel_trng *trng = container_of(rng, struct atmel_trng, rng); in atmel_trng_read() local
46 if (readl(trng->base + TRNG_ISR) & 1) { in atmel_trng_read()
47 *data = readl(trng->base + TRNG_ODATA); in atmel_trng_read()
54 readl(trng->base + TRNG_ISR); in atmel_trng_read()
60 static void atmel_trng_enable(struct atmel_trng *trng) in atmel_trng_enable() argument
62 writel(TRNG_KEY | 1, trng->base + TRNG_CR); in atmel_trng_enable()
65 static void atmel_trng_disable(struct atmel_trng *trng) in atmel_trng_disable() argument
67 writel(TRNG_KEY, trng->base + TRNG_CR); in atmel_trng_disable()
72 struct atmel_trng *trng; in atmel_trng_probe() local
76 trng = devm_kzalloc(&pdev->dev, sizeof(*trng), GFP_KERNEL); in atmel_trng_probe()
[all …]
Dingenic-trng.c40 struct ingenic_trng *trng = container_of(rng, struct ingenic_trng, rng); in ingenic_trng_init() local
43 ctrl = readl(trng->base + TRNG_REG_CFG_OFFSET); in ingenic_trng_init()
45 writel(ctrl, trng->base + TRNG_REG_CFG_OFFSET); in ingenic_trng_init()
52 struct ingenic_trng *trng = container_of(rng, struct ingenic_trng, rng); in ingenic_trng_cleanup() local
55 ctrl = readl(trng->base + TRNG_REG_CFG_OFFSET); in ingenic_trng_cleanup()
57 writel(ctrl, trng->base + TRNG_REG_CFG_OFFSET); in ingenic_trng_cleanup()
62 struct ingenic_trng *trng = container_of(rng, struct ingenic_trng, rng); in ingenic_trng_read() local
67 ret = readl_poll_timeout(trng->base + TRNG_REG_STATUS_OFFSET, status, in ingenic_trng_read()
74 *data = readl(trng->base + TRNG_REG_RANDOMNUM_OFFSET); in ingenic_trng_read()
81 struct ingenic_trng *trng; in ingenic_trng_probe() local
[all …]
Dexynos-trng.c58 struct exynos_trng_dev *trng; in exynos_trng_do_read() local
63 trng = (struct exynos_trng_dev *)rng->priv; in exynos_trng_do_read()
65 writel_relaxed(max * 8, trng->mem + EXYNOS_TRNG_FIFO_CTRL); in exynos_trng_do_read()
66 val = readl_poll_timeout(trng->mem + EXYNOS_TRNG_FIFO_CTRL, val, in exynos_trng_do_read()
71 memcpy_fromio(data, trng->mem + EXYNOS_TRNG_FIFO_0, max); in exynos_trng_do_read()
78 struct exynos_trng_dev *trng = (struct exynos_trng_dev *)rng->priv; in exynos_trng_init() local
82 sss_rate = clk_get_rate(trng->clk); in exynos_trng_init()
90 dev_err(trng->dev, "clock divider too large: %d", val); in exynos_trng_init()
94 writel_relaxed(val, trng->mem + EXYNOS_TRNG_CLKDIV); in exynos_trng_init()
98 writel_relaxed(val, trng->mem + EXYNOS_TRNG_CTRL); in exynos_trng_init()
[all …]
Dxiphera-trng.c38 struct xiphera_trng *trng = container_of(rng, struct xiphera_trng, rng); in xiphera_trng_read() local
43 if (readl(trng->mem + STATUS_REG) == TRNG_NEW_RAND_AVAILABLE) { in xiphera_trng_read()
44 *(u32 *)buf = readl(trng->mem + RAND_REG); in xiphera_trng_read()
49 writel(HOST_TO_TRNG_READ, trng->mem + CONTROL_REG); in xiphera_trng_read()
50 writel(HOST_TO_TRNG_ENABLE, trng->mem + CONTROL_REG); in xiphera_trng_read()
64 struct xiphera_trng *trng; in xiphera_trng_probe() local
68 trng = devm_kzalloc(dev, sizeof(*trng), GFP_KERNEL); in xiphera_trng_probe()
69 if (!trng) in xiphera_trng_probe()
73 trng->mem = devm_ioremap_resource(dev, res); in xiphera_trng_probe()
74 if (IS_ERR(trng->mem)) in xiphera_trng_probe()
[all …]
Dhisi-trng-v2.c27 struct hisi_trng *trng; in hisi_trng_read() local
32 trng = container_of(rng, struct hisi_trng, rng); in hisi_trng_read()
35 ret = readl_poll_timeout(trng->base + HISI_TRNG_REG, val, in hisi_trng_read()
58 struct hisi_trng *trng; in hisi_trng_probe() local
61 trng = devm_kzalloc(&pdev->dev, sizeof(*trng), GFP_KERNEL); in hisi_trng_probe()
62 if (!trng) in hisi_trng_probe()
65 trng->base = devm_platform_ioremap_resource(pdev, 0); in hisi_trng_probe()
66 if (IS_ERR(trng->base)) in hisi_trng_probe()
67 return PTR_ERR(trng->base); in hisi_trng_probe()
69 trng->rng.name = pdev->name; in hisi_trng_probe()
[all …]
DMakefile17 obj-$(CONFIG_HW_RANDOM_EXYNOS) += exynos-trng.o
27 obj-$(CONFIG_HW_RANDOM_INGENIC_TRNG) += ingenic-trng.o
33 obj-$(CONFIG_HW_RANDOM_HISI_V2) += hisi-trng-v2.o
43 obj-$(CONFIG_HW_RANDOM_S390) += s390-trng.o
48 obj-$(CONFIG_HW_RANDOM_XIPHERA) += xiphera-trng.o
DKconfig295 module will be called ingenic-trng.
360 module will be called hisi-trng-v2.
465 module will be called s390-trng.
478 will be called exynos-trng.
537 module will be called xiphera-trng.
/kernel/linux/linux-5.10/drivers/crypto/amcc/
Dcrypto4xx_trng.c74 struct device_node *trng = NULL; in ppc4xx_trng_probe() local
79 trng = of_find_matching_node(NULL, ppc4xx_trng_match); in ppc4xx_trng_probe()
80 if (!trng || !of_device_is_available(trng)) { in ppc4xx_trng_probe()
81 of_node_put(trng); in ppc4xx_trng_probe()
85 dev->trng_base = of_iomap(trng, 0); in ppc4xx_trng_probe()
86 of_node_put(trng); in ppc4xx_trng_probe()
98 core_dev->trng = rng; in ppc4xx_trng_probe()
101 err = devm_hwrng_register(core_dev->device, core_dev->trng); in ppc4xx_trng_probe()
114 core_dev->trng = NULL; in ppc4xx_trng_probe()
119 if (core_dev && core_dev->trng) { in ppc4xx_trng_remove()
[all …]
Dcrypto4xx_core.h110 struct hwrng *trng; member
/kernel/linux/linux-5.10/drivers/crypto/allwinner/sun8i-ce/
Dsun8i-ce-trng.c35 ce = container_of(rng, struct sun8i_ce_dev, trng); in sun8i_ce_trng_read()
70 common = ce->variant->trng | CE_COMM_INT; in sun8i_ce_trng_read()
108 if (ce->variant->trng == CE_ID_NOTSUPP) { in sun8i_ce_hwrng_register()
112 ce->trng.name = "sun8i Crypto Engine TRNG"; in sun8i_ce_hwrng_register()
113 ce->trng.read = sun8i_ce_trng_read; in sun8i_ce_hwrng_register()
114 ce->trng.quality = 1000; in sun8i_ce_hwrng_register()
116 ret = hwrng_register(&ce->trng); in sun8i_ce_hwrng_register()
124 if (ce->variant->trng == CE_ID_NOTSUPP) in sun8i_ce_hwrng_unregister()
126 hwrng_unregister(&ce->trng); in sun8i_ce_hwrng_unregister()
DMakefile5 sun8i-ce-$(CONFIG_CRYPTO_DEV_SUN8I_CE_TRNG) += sun8i-ce-trng.o
Dsun8i-ce.h153 unsigned char trng; member
230 struct hwrng trng; member
Dsun8i-ce-core.c50 .trng = CE_ID_NOTSUPP,
67 .trng = CE_ID_NOTSUPP,
89 .trng = CE_ALG_TRNG_V2,
106 .trng = CE_ID_NOTSUPP,
123 .trng = CE_ID_NOTSUPP,
/kernel/linux/linux-5.10/Documentation/devicetree/bindings/rng/
Datmel-trng.txt4 - compatible : Should be "atmel,at91sam9g45-trng" or "microchip,sam9x60-trng"
11 trng@fffcc000 {
12 compatible = "atmel,at91sam9g45-trng";
Dsamsung,exynos5250-trng.txt5 - compatible : Should be "samsung,exynos5250-trng".
13 compatible = "samsung,exynos5250-trng";
Domap_rng.txt15 - clocks: the trng clock source. Only mandatory for the
33 trng: rng@f2760000 {
/kernel/linux/linux-5.10/arch/arm/boot/dts/
Dexynos5.dtsi218 trng: rng@10830600 { label
219 compatible = "samsung,exynos5250-trng";
Dsam9x60.dtsi286 trng: trng@f0030000 { label
287 compatible = "microchip,sam9x60-trng";
Dexynos5410.dtsi385 &trng {
Dsama5d2.dtsi1004 trng@fc01c000 {
1005 compatible = "atmel,at91sam9g45-trng";
Dat91sam9g45.dtsi750 trng@fffcc000 {
751 compatible = "atmel,at91sam9g45-trng";
Dsama5d3.dtsi440 trng@f8040000 {
441 compatible = "atmel,at91sam9g45-trng";
Dsama5d4.dtsi646 trng@fc030000 {
647 compatible = "atmel,at91sam9g45-trng";
/kernel/linux/linux-5.10/arch/arm64/boot/dts/marvell/
Darmada-cp11x.dtsi456 CP11X_LABEL(trng): trng@760000 {
/kernel/linux/linux-5.10/drivers/crypto/caam/
Dregs.h297 u32 trng; /* TRNG_VERSION */ member

12