Home
last modified time | relevance | path

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

/drivers/char/hw_random/
Datmel-rng.c34 struct atmel_trng *trng = container_of(rng, struct atmel_trng, rng); in atmel_trng_read() local
38 if (readl(trng->base + TRNG_ISR) & 1) { in atmel_trng_read()
39 *data = readl(trng->base + TRNG_ODATA); in atmel_trng_read()
46 readl(trng->base + TRNG_ISR); in atmel_trng_read()
52 static void atmel_trng_enable(struct atmel_trng *trng) in atmel_trng_enable() argument
54 writel(TRNG_KEY | 1, trng->base + TRNG_CR); in atmel_trng_enable()
57 static void atmel_trng_disable(struct atmel_trng *trng) in atmel_trng_disable() argument
59 writel(TRNG_KEY, trng->base + TRNG_CR); in atmel_trng_disable()
64 struct atmel_trng *trng; in atmel_trng_probe() local
68 trng = devm_kzalloc(&pdev->dev, sizeof(*trng), GFP_KERNEL); in atmel_trng_probe()
[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 …]
DMakefile16 obj-$(CONFIG_HW_RANDOM_EXYNOS) += exynos-trng.o
39 obj-$(CONFIG_HW_RANDOM_S390) += s390-trng.o
DKconfig412 module will be called s390-trng.
425 will be called exynos-trng.
/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.h109 struct hwrng *trng; member
/drivers/crypto/caam/
Dregs.h292 u32 trng; /* TRNG_VERSION */ member