Home
last modified time | relevance | path

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

12

/linux-6.1.9/drivers/char/hw_random/
Datmel-rng.c43 static bool atmel_trng_wait_ready(struct atmel_trng *trng, bool wait) in atmel_trng_wait_ready() argument
47 ready = readl(trng->base + TRNG_ISR) & TRNG_ISR_DATRDY; in atmel_trng_wait_ready()
49 readl_poll_timeout(trng->base + TRNG_ISR, ready, in atmel_trng_wait_ready()
58 struct atmel_trng *trng = container_of(rng, struct atmel_trng, rng); in atmel_trng_read() local
62 ret = pm_runtime_get_sync((struct device *)trng->rng.priv); in atmel_trng_read()
64 pm_runtime_put_sync((struct device *)trng->rng.priv); in atmel_trng_read()
68 ret = atmel_trng_wait_ready(trng, wait); in atmel_trng_read()
72 *data = readl(trng->base + TRNG_ODATA); in atmel_trng_read()
78 readl(trng->base + TRNG_ISR); in atmel_trng_read()
82 pm_runtime_mark_last_busy((struct device *)trng->rng.priv); in atmel_trng_read()
[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
67 trng = devm_kzalloc(dev, sizeof(*trng), GFP_KERNEL); in xiphera_trng_probe()
68 if (!trng) in xiphera_trng_probe()
71 trng->mem = devm_platform_ioremap_resource(pdev, 0); in xiphera_trng_probe()
72 if (IS_ERR(trng->mem)) in xiphera_trng_probe()
[all …]
Darm_smccc_trng.c99 struct hwrng *trng; in smccc_trng_probe() local
101 trng = devm_kzalloc(&pdev->dev, sizeof(*trng), GFP_KERNEL); in smccc_trng_probe()
102 if (!trng) in smccc_trng_probe()
105 trng->name = "smccc_trng"; in smccc_trng_probe()
106 trng->read = smccc_trng_read; in smccc_trng_probe()
108 platform_set_drvdata(pdev, trng); in smccc_trng_probe()
110 return devm_hwrng_register(&pdev->dev, trng); in smccc_trng_probe()
DMakefile17 obj-$(CONFIG_HW_RANDOM_EXYNOS) += exynos-trng.o
26 obj-$(CONFIG_HW_RANDOM_INGENIC_TRNG) += ingenic-trng.o
41 obj-$(CONFIG_HW_RANDOM_S390) += s390-trng.o
46 obj-$(CONFIG_HW_RANDOM_XIPHERA) += xiphera-trng.o
/linux-6.1.9/drivers/crypto/hisilicon/trng/
Dtrng.c61 struct hisi_trng *trng; member
67 static void hisi_trng_set_seed(struct hisi_trng *trng, const u8 *seed) in hisi_trng_set_seed() argument
79 writel(val, trng->base + SW_DRBG_SEED(seed_reg)); in hisi_trng_set_seed()
87 struct hisi_trng *trng = ctx->trng; in hisi_trng_seed() local
97 writel(0x0, trng->base + SW_DRBG_BLOCKS); in hisi_trng_seed()
98 hisi_trng_set_seed(trng, seed); in hisi_trng_seed()
101 trng->base + SW_DRBG_BLOCKS); in hisi_trng_seed()
102 writel(0x1, trng->base + SW_DRBG_INIT); in hisi_trng_seed()
104 ret = readl_relaxed_poll_timeout(trng->base + SW_DRBG_STATUS, in hisi_trng_seed()
116 struct hisi_trng *trng = ctx->trng; in hisi_trng_generate() local
[all …]
DMakefile1 obj-$(CONFIG_CRYPTO_DEV_HISI_TRNG) += hisi-trng-v2.o
2 hisi-trng-v2-objs = trng.o
/linux-6.1.9/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 …]
/linux-6.1.9/drivers/crypto/allwinner/sun8i-ce/
Dsun8i-ce-trng.c35 ce = container_of(rng, struct sun8i_ce_dev, trng); in sun8i_ce_trng_read()
68 common = ce->variant->trng | CE_COMM_INT; in sun8i_ce_trng_read()
105 if (ce->variant->trng == CE_ID_NOTSUPP) { in sun8i_ce_hwrng_register()
109 ce->trng.name = "sun8i Crypto Engine TRNG"; in sun8i_ce_hwrng_register()
110 ce->trng.read = sun8i_ce_trng_read; in sun8i_ce_hwrng_register()
111 ce->trng.quality = 1000; in sun8i_ce_hwrng_register()
113 ret = hwrng_register(&ce->trng); in sun8i_ce_hwrng_register()
121 if (ce->variant->trng == CE_ID_NOTSUPP) in sun8i_ce_hwrng_unregister()
123 hwrng_unregister(&ce->trng); in sun8i_ce_hwrng_unregister()
DMakefile5 sun8i-ce-$(CONFIG_CRYPTO_DEV_SUN8I_CE_TRNG) += sun8i-ce-trng.o
Dsun8i-ce.h155 unsigned char trng; member
236 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,
124 .trng = CE_ALG_TRNG,
141 .trng = CE_ID_NOTSUPP,
/linux-6.1.9/drivers/crypto/gemini/
Dsl3516-ce-rng.c20 ce = container_of(rng, struct sl3516_ce_dev, trng); in sl3516_ce_rng_read()
48 ce->trng.name = "SL3516 Crypto Engine RNG"; in sl3516_ce_rng_register()
49 ce->trng.read = sl3516_ce_rng_read; in sl3516_ce_rng_register()
50 ce->trng.quality = 700; in sl3516_ce_rng_register()
52 ret = hwrng_register(&ce->trng); in sl3516_ce_rng_register()
60 hwrng_unregister(&ce->trng); in sl3516_ce_rng_unregister()
Dsl3516-ce.h244 struct hwrng trng; member
/linux-6.1.9/Documentation/devicetree/bindings/rng/
Datmel,at91-trng.yaml4 $id: http://devicetree.org/schemas/rng/atmel,at91-trng.yaml#
18 - atmel,at91sam9g45-trng
19 - microchip,sam9x60-trng
22 - microchip,sama7g5-trng
23 - const: atmel,at91sam9g45-trng
47 compatible = "atmel,at91sam9g45-trng";
Dxiphera,xip8001b-trng.yaml4 $id: http://devicetree.org/schemas/rng/xiphera,xip8001b-trng.yaml#
7 title: Xiphera XIP8001B-trng bindings
17 const: xiphera,xip8001b-trng
31 compatible = "xiphera,xip8001b-trng";
Dsamsung,exynos5250-trng.yaml4 $id: http://devicetree.org/schemas/rng/samsung,exynos5250-trng.yaml#
15 const: samsung,exynos5250-trng
40 compatible = "samsung,exynos5250-trng";
Darm-cctrng.yaml18 - arm,cryptocell-713-trng
19 - arm,cryptocell-703-trng
48 compatible = "arm,cryptocell-713-trng";
Dingenic,trng.yaml4 $id: http://devicetree.org/schemas/rng/ingenic,trng.yaml#
37 dtrng: trng@10072000 {
Domap_rng.yaml74 trng: rng@f2760000 {
/linux-6.1.9/Documentation/devicetree/bindings/soc/imx/
Dfsl,imx8mp-hdmi-blk-ctrl.yaml40 - const: trng
90 power-domain-names = "bus", "irqsteer", "lcdif", "pai", "pvi", "trng",
/linux-6.1.9/drivers/crypto/hisilicon/
DMakefile8 obj-$(CONFIG_CRYPTO_DEV_HISI_TRNG) += trng/
/linux-6.1.9/arch/arm/boot/dts/
Dexynos5.dtsi218 trng: rng@10830600 { label
219 compatible = "samsung,exynos5250-trng";
/linux-6.1.9/arch/arm64/kvm/
DMakefile17 arch_timer.o trng.o vmid.o \

12