rng 34 arch/powerpc/platforms/powernv/rng.c struct powernv_rng *rng; rng 36 arch/powerpc/platforms/powernv/rng.c rng = get_cpu_var(powernv_rng); rng 37 arch/powerpc/platforms/powernv/rng.c put_cpu_var(rng); rng 38 arch/powerpc/platforms/powernv/rng.c return rng != NULL; rng 41 arch/powerpc/platforms/powernv/rng.c static unsigned long rng_whiten(struct powernv_rng *rng, unsigned long val) rng 49 arch/powerpc/platforms/powernv/rng.c val ^= rng->mask; rng 52 arch/powerpc/platforms/powernv/rng.c rng->mask = (rng->mask << 1) | (parity & 1); rng 59 arch/powerpc/platforms/powernv/rng.c struct powernv_rng *rng; rng 61 arch/powerpc/platforms/powernv/rng.c rng = raw_cpu_read(powernv_rng); rng 63 arch/powerpc/platforms/powernv/rng.c *v = rng_whiten(rng, __raw_rm_readq(rng->regs_real)); rng 105 arch/powerpc/platforms/powernv/rng.c struct powernv_rng *rng; rng 107 arch/powerpc/platforms/powernv/rng.c rng = get_cpu_var(powernv_rng); rng 109 arch/powerpc/platforms/powernv/rng.c *v = rng_whiten(rng, in_be64(rng->regs)); rng 111 arch/powerpc/platforms/powernv/rng.c put_cpu_var(rng); rng 117 arch/powerpc/platforms/powernv/rng.c static __init void rng_init_per_cpu(struct powernv_rng *rng, rng 129 arch/powerpc/platforms/powernv/rng.c per_cpu(powernv_rng, cpu) = rng; rng 136 arch/powerpc/platforms/powernv/rng.c struct powernv_rng *rng; rng 140 arch/powerpc/platforms/powernv/rng.c rng = kzalloc(sizeof(*rng), GFP_KERNEL); rng 141 arch/powerpc/platforms/powernv/rng.c if (!rng) rng 145 arch/powerpc/platforms/powernv/rng.c kfree(rng); rng 149 arch/powerpc/platforms/powernv/rng.c rng->regs_real = (void __iomem *)res.start; rng 151 arch/powerpc/platforms/powernv/rng.c rng->regs = of_iomap(dn, 0); rng 152 arch/powerpc/platforms/powernv/rng.c if (!rng->regs) { rng 153 arch/powerpc/platforms/powernv/rng.c kfree(rng); rng 157 arch/powerpc/platforms/powernv/rng.c val = in_be64(rng->regs); rng 158 arch/powerpc/platforms/powernv/rng.c rng->mask = val; rng 160 arch/powerpc/platforms/powernv/rng.c rng_init_per_cpu(rng, dn); rng 1244 crypto/algapi.c atomic64_inc(&alg->stats.rng.err_cnt); rng 1246 crypto/algapi.c atomic64_inc(&alg->stats.rng.seed_cnt); rng 1255 crypto/algapi.c atomic64_inc(&alg->stats.rng.err_cnt); rng 1257 crypto/algapi.c atomic64_inc(&alg->stats.rng.generate_cnt); rng 1258 crypto/algapi.c atomic64_add(dlen, &alg->stats.rng.generate_tlen); rng 170 crypto/crypto_user_stat.c rrng.stat_generate_cnt = atomic64_read(&alg->stats.rng.generate_cnt); rng 171 crypto/crypto_user_stat.c rrng.stat_generate_tlen = atomic64_read(&alg->stats.rng.generate_tlen); rng 172 crypto/crypto_user_stat.c rrng.stat_seed_cnt = atomic64_read(&alg->stats.rng.seed_cnt); rng 173 crypto/crypto_user_stat.c rrng.stat_err_cnt = atomic64_read(&alg->stats.rng.err_cnt); rng 121 crypto/jitterentropy-kcapi.c struct jitterentropy *rng = crypto_tfm_ctx(tfm); rng 124 crypto/jitterentropy-kcapi.c rng->entropy_collector = jent_entropy_collector_alloc(1, 0); rng 125 crypto/jitterentropy-kcapi.c if (!rng->entropy_collector) rng 128 crypto/jitterentropy-kcapi.c spin_lock_init(&rng->jent_lock); rng 134 crypto/jitterentropy-kcapi.c struct jitterentropy *rng = crypto_tfm_ctx(tfm); rng 136 crypto/jitterentropy-kcapi.c spin_lock(&rng->jent_lock); rng 137 crypto/jitterentropy-kcapi.c if (rng->entropy_collector) rng 138 crypto/jitterentropy-kcapi.c jent_entropy_collector_free(rng->entropy_collector); rng 139 crypto/jitterentropy-kcapi.c rng->entropy_collector = NULL; rng 140 crypto/jitterentropy-kcapi.c spin_unlock(&rng->jent_lock); rng 147 crypto/jitterentropy-kcapi.c struct jitterentropy *rng = crypto_rng_ctx(tfm); rng 150 crypto/jitterentropy-kcapi.c spin_lock(&rng->jent_lock); rng 151 crypto/jitterentropy-kcapi.c ret = jent_read_entropy(rng->entropy_collector, rdata, dlen); rng 152 crypto/jitterentropy-kcapi.c spin_unlock(&rng->jent_lock); rng 122 crypto/rng.c struct crypto_rng *rng; rng 127 crypto/rng.c rng = crypto_alloc_rng("stdrng", 0, 0); rng 128 crypto/rng.c err = PTR_ERR(rng); rng 129 crypto/rng.c if (IS_ERR(rng)) rng 132 crypto/rng.c err = crypto_rng_reset(rng, NULL, crypto_rng_seedsize(rng)); rng 134 crypto/rng.c crypto_free_rng(rng); rng 138 crypto/rng.c crypto_default_rng = rng; rng 3362 crypto/testmgr.c struct crypto_rng *rng; rng 3365 crypto/testmgr.c rng = crypto_alloc_rng(driver, type, mask); rng 3366 crypto/testmgr.c if (IS_ERR(rng)) { rng 3368 crypto/testmgr.c "%ld\n", driver, PTR_ERR(rng)); rng 3369 crypto/testmgr.c return PTR_ERR(rng); rng 3372 crypto/testmgr.c err = test_cprng(rng, desc->suite.cprng.vecs, desc->suite.cprng.count); rng 3374 crypto/testmgr.c crypto_free_rng(rng); rng 61 drivers/char/hw_random/amd-rng.c static int amd_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait) rng 64 drivers/char/hw_random/amd-rng.c struct amd768_priv *priv = (struct amd768_priv *)rng->priv; rng 94 drivers/char/hw_random/amd-rng.c static int amd_rng_init(struct hwrng *rng) rng 96 drivers/char/hw_random/amd-rng.c struct amd768_priv *priv = (struct amd768_priv *)rng->priv; rng 110 drivers/char/hw_random/amd-rng.c static void amd_rng_cleanup(struct hwrng *rng) rng 112 drivers/char/hw_random/amd-rng.c struct amd768_priv *priv = (struct amd768_priv *)rng->priv; rng 28 drivers/char/hw_random/atmel-rng.c struct hwrng rng; rng 31 drivers/char/hw_random/atmel-rng.c static int atmel_trng_read(struct hwrng *rng, void *buf, size_t max, rng 34 drivers/char/hw_random/atmel-rng.c struct atmel_trng *trng = container_of(rng, struct atmel_trng, rng); rng 86 drivers/char/hw_random/atmel-rng.c trng->rng.name = pdev->name; rng 87 drivers/char/hw_random/atmel-rng.c trng->rng.read = atmel_trng_read; rng 89 drivers/char/hw_random/atmel-rng.c ret = devm_hwrng_register(&pdev->dev, &trng->rng); rng 31 drivers/char/hw_random/bcm2835-rng.c struct hwrng rng; rng 37 drivers/char/hw_random/bcm2835-rng.c static inline struct bcm2835_rng_priv *to_rng_priv(struct hwrng *rng) rng 39 drivers/char/hw_random/bcm2835-rng.c return container_of(rng, struct bcm2835_rng_priv, rng); rng 62 drivers/char/hw_random/bcm2835-rng.c static int bcm2835_rng_read(struct hwrng *rng, void *buf, size_t max, rng 65 drivers/char/hw_random/bcm2835-rng.c struct bcm2835_rng_priv *priv = to_rng_priv(rng); rng 85 drivers/char/hw_random/bcm2835-rng.c static int bcm2835_rng_init(struct hwrng *rng) rng 87 drivers/char/hw_random/bcm2835-rng.c struct bcm2835_rng_priv *priv = to_rng_priv(rng); rng 111 drivers/char/hw_random/bcm2835-rng.c static void bcm2835_rng_cleanup(struct hwrng *rng) rng 113 drivers/char/hw_random/bcm2835-rng.c struct bcm2835_rng_priv *priv = to_rng_priv(rng); rng 166 drivers/char/hw_random/bcm2835-rng.c priv->rng.name = pdev->name; rng 167 drivers/char/hw_random/bcm2835-rng.c priv->rng.init = bcm2835_rng_init; rng 168 drivers/char/hw_random/bcm2835-rng.c priv->rng.read = bcm2835_rng_read; rng 169 drivers/char/hw_random/bcm2835-rng.c priv->rng.cleanup = bcm2835_rng_cleanup; rng 183 drivers/char/hw_random/bcm2835-rng.c err = devm_hwrng_register(dev, &priv->rng); rng 24 drivers/char/hw_random/cavium-rng-vf.c static int cavium_rng_read(struct hwrng *rng, void *dat, size_t max, bool wait) rng 26 drivers/char/hw_random/cavium-rng-vf.c struct cavium_rng *p = container_of(rng, struct cavium_rng, ops); rng 46 drivers/char/hw_random/cavium-rng-vf.c struct cavium_rng *rng; rng 49 drivers/char/hw_random/cavium-rng-vf.c rng = devm_kzalloc(&pdev->dev, sizeof(*rng), GFP_KERNEL); rng 50 drivers/char/hw_random/cavium-rng-vf.c if (!rng) rng 54 drivers/char/hw_random/cavium-rng-vf.c rng->result = pcim_iomap(pdev, 0, 0); rng 55 drivers/char/hw_random/cavium-rng-vf.c if (!rng->result) { rng 60 drivers/char/hw_random/cavium-rng-vf.c rng->ops.name = devm_kasprintf(&pdev->dev, GFP_KERNEL, rng 62 drivers/char/hw_random/cavium-rng-vf.c if (!rng->ops.name) rng 65 drivers/char/hw_random/cavium-rng-vf.c rng->ops.read = cavium_rng_read; rng 66 drivers/char/hw_random/cavium-rng-vf.c rng->ops.quality = 1000; rng 68 drivers/char/hw_random/cavium-rng-vf.c pci_set_drvdata(pdev, rng); rng 70 drivers/char/hw_random/cavium-rng-vf.c ret = devm_hwrng_register(&pdev->dev, &rng->ops); rng 29 drivers/char/hw_random/cavium-rng.c struct cavium_rng_pf *rng; rng 32 drivers/char/hw_random/cavium-rng.c rng = devm_kzalloc(&pdev->dev, sizeof(*rng), GFP_KERNEL); rng 33 drivers/char/hw_random/cavium-rng.c if (!rng) rng 37 drivers/char/hw_random/cavium-rng.c rng->control_status = pcim_iomap(pdev, 0, 0); rng 38 drivers/char/hw_random/cavium-rng.c if (!rng->control_status) { rng 46 drivers/char/hw_random/cavium-rng.c rng->control_status); rng 48 drivers/char/hw_random/cavium-rng.c pci_set_drvdata(pdev, rng); rng 54 drivers/char/hw_random/cavium-rng.c writeq(0, rng->control_status); rng 67 drivers/char/hw_random/cavium-rng.c struct cavium_rng_pf *rng; rng 69 drivers/char/hw_random/cavium-rng.c rng = pci_get_drvdata(pdev); rng 75 drivers/char/hw_random/cavium-rng.c writeq(0, rng->control_status); rng 53 drivers/char/hw_random/core.c static int hwrng_init(struct hwrng *rng); rng 56 drivers/char/hw_random/core.c static inline int rng_get_data(struct hwrng *rng, u8 *buffer, size_t size, rng 64 drivers/char/hw_random/core.c static void add_early_randomness(struct hwrng *rng) rng 70 drivers/char/hw_random/core.c bytes_read = rng_get_data(rng, rng_buffer, size, 0); rng 78 drivers/char/hw_random/core.c struct hwrng *rng = container_of(kref, struct hwrng, ref); rng 80 drivers/char/hw_random/core.c if (rng->cleanup) rng 81 drivers/char/hw_random/core.c rng->cleanup(rng); rng 83 drivers/char/hw_random/core.c complete(&rng->cleanup_done); rng 86 drivers/char/hw_random/core.c static int set_current_rng(struct hwrng *rng) rng 92 drivers/char/hw_random/core.c err = hwrng_init(rng); rng 97 drivers/char/hw_random/core.c current_rng = rng; rng 116 drivers/char/hw_random/core.c struct hwrng *rng; rng 121 drivers/char/hw_random/core.c rng = current_rng; rng 122 drivers/char/hw_random/core.c if (rng) rng 123 drivers/char/hw_random/core.c kref_get(&rng->ref); rng 126 drivers/char/hw_random/core.c return rng; rng 129 drivers/char/hw_random/core.c static void put_rng(struct hwrng *rng) rng 136 drivers/char/hw_random/core.c if (rng) rng 137 drivers/char/hw_random/core.c kref_put(&rng->ref, cleanup_rng); rng 141 drivers/char/hw_random/core.c static int hwrng_init(struct hwrng *rng) rng 143 drivers/char/hw_random/core.c if (kref_get_unless_zero(&rng->ref)) rng 146 drivers/char/hw_random/core.c if (rng->init) { rng 149 drivers/char/hw_random/core.c ret = rng->init(rng); rng 154 drivers/char/hw_random/core.c kref_init(&rng->ref); rng 155 drivers/char/hw_random/core.c reinit_completion(&rng->cleanup_done); rng 158 drivers/char/hw_random/core.c add_early_randomness(rng); rng 160 drivers/char/hw_random/core.c current_quality = rng->quality ? : default_quality; rng 182 drivers/char/hw_random/core.c static inline int rng_get_data(struct hwrng *rng, u8 *buffer, size_t size, rng 187 drivers/char/hw_random/core.c if (rng->read) rng 188 drivers/char/hw_random/core.c return rng->read(rng, (void *)buffer, size, wait); rng 190 drivers/char/hw_random/core.c if (rng->data_present) rng 191 drivers/char/hw_random/core.c present = rng->data_present(rng, wait); rng 196 drivers/char/hw_random/core.c return rng->data_read(rng, (u32 *)buffer); rng 207 drivers/char/hw_random/core.c struct hwrng *rng; rng 210 drivers/char/hw_random/core.c rng = get_current_rng(); rng 211 drivers/char/hw_random/core.c if (IS_ERR(rng)) { rng 212 drivers/char/hw_random/core.c err = PTR_ERR(rng); rng 215 drivers/char/hw_random/core.c if (!rng) { rng 225 drivers/char/hw_random/core.c bytes_read = rng_get_data(rng, rng_buffer, rng 258 drivers/char/hw_random/core.c put_rng(rng); rng 274 drivers/char/hw_random/core.c put_rng(rng); rng 323 drivers/char/hw_random/core.c struct hwrng *rng; rng 332 drivers/char/hw_random/core.c list_for_each_entry(rng, &rng_list, list) { rng 333 drivers/char/hw_random/core.c if (sysfs_streq(rng->name, buf)) { rng 335 drivers/char/hw_random/core.c err = set_current_rng(rng); rng 351 drivers/char/hw_random/core.c struct hwrng *rng; rng 353 drivers/char/hw_random/core.c rng = get_current_rng(); rng 354 drivers/char/hw_random/core.c if (IS_ERR(rng)) rng 355 drivers/char/hw_random/core.c return PTR_ERR(rng); rng 357 drivers/char/hw_random/core.c ret = snprintf(buf, PAGE_SIZE, "%s\n", rng ? rng->name : "none"); rng 358 drivers/char/hw_random/core.c put_rng(rng); rng 368 drivers/char/hw_random/core.c struct hwrng *rng; rng 374 drivers/char/hw_random/core.c list_for_each_entry(rng, &rng_list, list) { rng 375 drivers/char/hw_random/core.c strlcat(buf, rng->name, PAGE_SIZE); rng 425 drivers/char/hw_random/core.c struct hwrng *rng; rng 427 drivers/char/hw_random/core.c rng = get_current_rng(); rng 428 drivers/char/hw_random/core.c if (IS_ERR(rng) || !rng) rng 431 drivers/char/hw_random/core.c rc = rng_get_data(rng, rng_fillbuf, rng 434 drivers/char/hw_random/core.c put_rng(rng); rng 457 drivers/char/hw_random/core.c int hwrng_register(struct hwrng *rng) rng 463 drivers/char/hw_random/core.c if (!rng->name || (!rng->data_read && !rng->read)) rng 470 drivers/char/hw_random/core.c if (strcmp(tmp->name, rng->name) == 0) rng 474 drivers/char/hw_random/core.c init_completion(&rng->cleanup_done); rng 475 drivers/char/hw_random/core.c complete(&rng->cleanup_done); rng 480 drivers/char/hw_random/core.c if (tmp->quality < rng->quality) rng 483 drivers/char/hw_random/core.c list_add_tail(&rng->list, rng_list_ptr); rng 488 drivers/char/hw_random/core.c (!cur_rng_set_by_user && rng->quality > old_rng->quality)) { rng 494 drivers/char/hw_random/core.c err = set_current_rng(rng); rng 499 drivers/char/hw_random/core.c if (old_rng && !rng->init) { rng 507 drivers/char/hw_random/core.c add_early_randomness(rng); rng 517 drivers/char/hw_random/core.c void hwrng_unregister(struct hwrng *rng) rng 523 drivers/char/hw_random/core.c list_del(&rng->list); rng 524 drivers/char/hw_random/core.c if (current_rng == rng) { rng 539 drivers/char/hw_random/core.c wait_for_completion(&rng->cleanup_done); rng 558 drivers/char/hw_random/core.c int devm_hwrng_register(struct device *dev, struct hwrng *rng) rng 567 drivers/char/hw_random/core.c error = hwrng_register(rng); rng 573 drivers/char/hw_random/core.c *ptr = rng; rng 579 drivers/char/hw_random/core.c void devm_hwrng_unregister(struct device *dev, struct hwrng *rng) rng 581 drivers/char/hw_random/core.c devres_release(dev, devm_hwrng_release, devm_hwrng_match, rng); rng 52 drivers/char/hw_random/exynos-trng.c struct hwrng rng; rng 55 drivers/char/hw_random/exynos-trng.c static int exynos_trng_do_read(struct hwrng *rng, void *data, size_t max, rng 63 drivers/char/hw_random/exynos-trng.c trng = (struct exynos_trng_dev *)rng->priv; rng 76 drivers/char/hw_random/exynos-trng.c static int exynos_trng_init(struct hwrng *rng) rng 78 drivers/char/hw_random/exynos-trng.c struct exynos_trng_dev *trng = (struct exynos_trng_dev *)rng->priv; rng 119 drivers/char/hw_random/exynos-trng.c trng->rng.name = devm_kstrdup(&pdev->dev, dev_name(&pdev->dev), rng 121 drivers/char/hw_random/exynos-trng.c if (!trng->rng.name) rng 124 drivers/char/hw_random/exynos-trng.c trng->rng.init = exynos_trng_init; rng 125 drivers/char/hw_random/exynos-trng.c trng->rng.read = exynos_trng_do_read; rng 126 drivers/char/hw_random/exynos-trng.c trng->rng.priv = (unsigned long) trng; rng 156 drivers/char/hw_random/exynos-trng.c ret = devm_hwrng_register(&pdev->dev, &trng->rng); rng 55 drivers/char/hw_random/geode-rng.c static int geode_rng_data_read(struct hwrng *rng, u32 *data) rng 57 drivers/char/hw_random/geode-rng.c void __iomem *mem = (void __iomem *)rng->priv; rng 64 drivers/char/hw_random/geode-rng.c static int geode_rng_data_present(struct hwrng *rng, int wait) rng 66 drivers/char/hw_random/geode-rng.c void __iomem *mem = (void __iomem *)rng->priv; rng 23 drivers/char/hw_random/hisi-rng.c #define to_hisi_rng(p) container_of(p, struct hisi_rng, rng) rng 31 drivers/char/hw_random/hisi-rng.c struct hwrng rng; rng 34 drivers/char/hw_random/hisi-rng.c static int hisi_rng_init(struct hwrng *rng) rng 36 drivers/char/hw_random/hisi-rng.c struct hisi_rng *hrng = to_hisi_rng(rng); rng 57 drivers/char/hw_random/hisi-rng.c static void hisi_rng_cleanup(struct hwrng *rng) rng 59 drivers/char/hw_random/hisi-rng.c struct hisi_rng *hrng = to_hisi_rng(rng); rng 64 drivers/char/hw_random/hisi-rng.c static int hisi_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait) rng 66 drivers/char/hw_random/hisi-rng.c struct hisi_rng *hrng = to_hisi_rng(rng); rng 75 drivers/char/hw_random/hisi-rng.c struct hisi_rng *rng; rng 79 drivers/char/hw_random/hisi-rng.c rng = devm_kzalloc(&pdev->dev, sizeof(*rng), GFP_KERNEL); rng 80 drivers/char/hw_random/hisi-rng.c if (!rng) rng 83 drivers/char/hw_random/hisi-rng.c platform_set_drvdata(pdev, rng); rng 86 drivers/char/hw_random/hisi-rng.c rng->base = devm_ioremap_resource(&pdev->dev, res); rng 87 drivers/char/hw_random/hisi-rng.c if (IS_ERR(rng->base)) rng 88 drivers/char/hw_random/hisi-rng.c return PTR_ERR(rng->base); rng 90 drivers/char/hw_random/hisi-rng.c rng->rng.name = pdev->name; rng 91 drivers/char/hw_random/hisi-rng.c rng->rng.init = hisi_rng_init; rng 92 drivers/char/hw_random/hisi-rng.c rng->rng.cleanup = hisi_rng_cleanup; rng 93 drivers/char/hw_random/hisi-rng.c rng->rng.read = hisi_rng_read; rng 95 drivers/char/hw_random/hisi-rng.c ret = devm_hwrng_register(&pdev->dev, &rng->rng); rng 53 drivers/char/hw_random/imx-rngc.c struct hwrng rng; rng 116 drivers/char/hw_random/imx-rngc.c static int imx_rngc_read(struct hwrng *rng, void *data, size_t max, bool wait) rng 118 drivers/char/hw_random/imx-rngc.c struct imx_rngc *rngc = container_of(rng, struct imx_rngc, rng); rng 167 drivers/char/hw_random/imx-rngc.c static int imx_rngc_init(struct hwrng *rng) rng 169 drivers/char/hw_random/imx-rngc.c struct imx_rngc *rngc = container_of(rng, struct imx_rngc, rng); rng 237 drivers/char/hw_random/imx-rngc.c rngc->rng.name = pdev->name; rng 238 drivers/char/hw_random/imx-rngc.c rngc->rng.init = imx_rngc_init; rng 239 drivers/char/hw_random/imx-rngc.c rngc->rng.read = imx_rngc_read; rng 254 drivers/char/hw_random/imx-rngc.c ret = hwrng_register(&rngc->rng); rng 273 drivers/char/hw_random/imx-rngc.c hwrng_unregister(&rngc->rng); rng 167 drivers/char/hw_random/intel-rng.c static int intel_rng_data_present(struct hwrng *rng, int wait) rng 169 drivers/char/hw_random/intel-rng.c void __iomem *mem = (void __iomem *)rng->priv; rng 182 drivers/char/hw_random/intel-rng.c static int intel_rng_data_read(struct hwrng *rng, u32 *data) rng 184 drivers/char/hw_random/intel-rng.c void __iomem *mem = (void __iomem *)rng->priv; rng 191 drivers/char/hw_random/intel-rng.c static int intel_rng_init(struct hwrng *rng) rng 193 drivers/char/hw_random/intel-rng.c void __iomem *mem = (void __iomem *)rng->priv; rng 210 drivers/char/hw_random/intel-rng.c static void intel_rng_cleanup(struct hwrng *rng) rng 212 drivers/char/hw_random/intel-rng.c void __iomem *mem = (void __iomem *)rng->priv; rng 51 drivers/char/hw_random/iproc-rng200.c struct hwrng rng; rng 55 drivers/char/hw_random/iproc-rng200.c #define to_rng_priv(rng) container_of(rng, struct iproc_rng200_dev, rng) rng 94 drivers/char/hw_random/iproc-rng200.c static int iproc_rng200_read(struct hwrng *rng, void *buf, size_t max, rng 97 drivers/char/hw_random/iproc-rng200.c struct iproc_rng200_dev *priv = to_rng_priv(rng); rng 155 drivers/char/hw_random/iproc-rng200.c static int iproc_rng200_init(struct hwrng *rng) rng 157 drivers/char/hw_random/iproc-rng200.c struct iproc_rng200_dev *priv = to_rng_priv(rng); rng 169 drivers/char/hw_random/iproc-rng200.c static void iproc_rng200_cleanup(struct hwrng *rng) rng 171 drivers/char/hw_random/iproc-rng200.c struct iproc_rng200_dev *priv = to_rng_priv(rng); rng 205 drivers/char/hw_random/iproc-rng200.c priv->rng.name = "iproc-rng200", rng 206 drivers/char/hw_random/iproc-rng200.c priv->rng.read = iproc_rng200_read, rng 207 drivers/char/hw_random/iproc-rng200.c priv->rng.init = iproc_rng200_init, rng 208 drivers/char/hw_random/iproc-rng200.c priv->rng.cleanup = iproc_rng200_cleanup, rng 211 drivers/char/hw_random/iproc-rng200.c ret = devm_hwrng_register(dev, &priv->rng); rng 29 drivers/char/hw_random/ixp4xx-rng.c static int ixp4xx_rng_data_read(struct hwrng *rng, u32 *buffer) rng 31 drivers/char/hw_random/ixp4xx-rng.c void __iomem * rng_base = (void __iomem *)rng->priv; rng 84 drivers/char/hw_random/ks-sa-rng.c struct hwrng rng; rng 90 drivers/char/hw_random/ks-sa-rng.c static int ks_sa_rng_init(struct hwrng *rng) rng 93 drivers/char/hw_random/ks-sa-rng.c struct device *dev = (struct device *)rng->priv; rng 126 drivers/char/hw_random/ks-sa-rng.c static void ks_sa_rng_cleanup(struct hwrng *rng) rng 128 drivers/char/hw_random/ks-sa-rng.c struct device *dev = (struct device *)rng->priv; rng 137 drivers/char/hw_random/ks-sa-rng.c static int ks_sa_rng_data_read(struct hwrng *rng, u32 *data) rng 139 drivers/char/hw_random/ks-sa-rng.c struct device *dev = (struct device *)rng->priv; rng 151 drivers/char/hw_random/ks-sa-rng.c static int ks_sa_rng_data_present(struct hwrng *rng, int wait) rng 153 drivers/char/hw_random/ks-sa-rng.c struct device *dev = (struct device *)rng->priv; rng 184 drivers/char/hw_random/ks-sa-rng.c ks_sa_rng->rng = (struct hwrng) { rng 191 drivers/char/hw_random/ks-sa-rng.c ks_sa_rng->rng.priv = (unsigned long)dev; rng 217 drivers/char/hw_random/ks-sa-rng.c return devm_hwrng_register(&pdev->dev, &ks_sa_rng->rng); rng 22 drivers/char/hw_random/meson-rng.c struct hwrng rng; rng 26 drivers/char/hw_random/meson-rng.c static int meson_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait) rng 29 drivers/char/hw_random/meson-rng.c container_of(rng, struct meson_rng_data, rng); rng 73 drivers/char/hw_random/meson-rng.c data->rng.name = pdev->name; rng 74 drivers/char/hw_random/meson-rng.c data->rng.read = meson_rng_read; rng 78 drivers/char/hw_random/meson-rng.c return devm_hwrng_register(dev, &data->rng); rng 33 drivers/char/hw_random/mtk-rng.c #define to_mtk_rng(p) container_of(p, struct mtk_rng, rng) rng 38 drivers/char/hw_random/mtk-rng.c struct hwrng rng; rng 41 drivers/char/hw_random/mtk-rng.c static int mtk_rng_init(struct hwrng *rng) rng 43 drivers/char/hw_random/mtk-rng.c struct mtk_rng *priv = to_mtk_rng(rng); rng 58 drivers/char/hw_random/mtk-rng.c static void mtk_rng_cleanup(struct hwrng *rng) rng 60 drivers/char/hw_random/mtk-rng.c struct mtk_rng *priv = to_mtk_rng(rng); rng 70 drivers/char/hw_random/mtk-rng.c static bool mtk_rng_wait_ready(struct hwrng *rng, bool wait) rng 72 drivers/char/hw_random/mtk-rng.c struct mtk_rng *priv = to_mtk_rng(rng); rng 83 drivers/char/hw_random/mtk-rng.c static int mtk_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait) rng 85 drivers/char/hw_random/mtk-rng.c struct mtk_rng *priv = to_mtk_rng(rng); rng 88 drivers/char/hw_random/mtk-rng.c pm_runtime_get_sync((struct device *)priv->rng.priv); rng 91 drivers/char/hw_random/mtk-rng.c if (!mtk_rng_wait_ready(rng, wait)) rng 100 drivers/char/hw_random/mtk-rng.c pm_runtime_mark_last_busy((struct device *)priv->rng.priv); rng 101 drivers/char/hw_random/mtk-rng.c pm_runtime_put_sync_autosuspend((struct device *)priv->rng.priv); rng 122 drivers/char/hw_random/mtk-rng.c priv->rng.name = pdev->name; rng 124 drivers/char/hw_random/mtk-rng.c priv->rng.init = mtk_rng_init; rng 125 drivers/char/hw_random/mtk-rng.c priv->rng.cleanup = mtk_rng_cleanup; rng 127 drivers/char/hw_random/mtk-rng.c priv->rng.read = mtk_rng_read; rng 128 drivers/char/hw_random/mtk-rng.c priv->rng.priv = (unsigned long)&pdev->dev; rng 129 drivers/char/hw_random/mtk-rng.c priv->rng.quality = 900; rng 142 drivers/char/hw_random/mtk-rng.c ret = devm_hwrng_register(&pdev->dev, &priv->rng); rng 164 drivers/char/hw_random/mtk-rng.c mtk_rng_cleanup(&priv->rng); rng 173 drivers/char/hw_random/mtk-rng.c return mtk_rng_init(&priv->rng); rng 56 drivers/char/hw_random/mxc-rnga.c struct hwrng rng; rng 61 drivers/char/hw_random/mxc-rnga.c static int mxc_rnga_data_present(struct hwrng *rng, int wait) rng 64 drivers/char/hw_random/mxc-rnga.c struct mxc_rng *mxc_rng = container_of(rng, struct mxc_rng, rng); rng 77 drivers/char/hw_random/mxc-rnga.c static int mxc_rnga_data_read(struct hwrng *rng, u32 * data) rng 81 drivers/char/hw_random/mxc-rnga.c struct mxc_rng *mxc_rng = container_of(rng, struct mxc_rng, rng); rng 100 drivers/char/hw_random/mxc-rnga.c static int mxc_rnga_init(struct hwrng *rng) rng 103 drivers/char/hw_random/mxc-rnga.c struct mxc_rng *mxc_rng = container_of(rng, struct mxc_rng, rng); rng 123 drivers/char/hw_random/mxc-rnga.c static void mxc_rnga_cleanup(struct hwrng *rng) rng 126 drivers/char/hw_random/mxc-rnga.c struct mxc_rng *mxc_rng = container_of(rng, struct mxc_rng, rng); rng 144 drivers/char/hw_random/mxc-rnga.c mxc_rng->rng.name = "mxc-rnga"; rng 145 drivers/char/hw_random/mxc-rnga.c mxc_rng->rng.init = mxc_rnga_init; rng 146 drivers/char/hw_random/mxc-rnga.c mxc_rng->rng.cleanup = mxc_rnga_cleanup, rng 147 drivers/char/hw_random/mxc-rnga.c mxc_rng->rng.data_present = mxc_rnga_data_present, rng 148 drivers/char/hw_random/mxc-rnga.c mxc_rng->rng.data_read = mxc_rnga_data_read, rng 166 drivers/char/hw_random/mxc-rnga.c err = hwrng_register(&mxc_rng->rng); rng 183 drivers/char/hw_random/mxc-rnga.c hwrng_unregister(&mxc_rng->rng); rng 419 drivers/char/hw_random/n2-drv.c static int n2rng_data_read(struct hwrng *rng, u32 *data) rng 421 drivers/char/hw_random/n2-drv.c struct n2rng *np = (struct n2rng *) rng->priv; rng 18 drivers/char/hw_random/nomadik-rng.c static int nmk_rng_read(struct hwrng *rng, void *data, size_t max, bool wait) rng 20 drivers/char/hw_random/nomadik-rng.c void __iomem *base = (void __iomem *)rng->priv; rng 28 drivers/char/hw_random/octeon-rng.c static int octeon_rng_init(struct hwrng *rng) rng 31 drivers/char/hw_random/octeon-rng.c struct octeon_rng *p = container_of(rng, struct octeon_rng, ops); rng 40 drivers/char/hw_random/octeon-rng.c static void octeon_rng_cleanup(struct hwrng *rng) rng 43 drivers/char/hw_random/octeon-rng.c struct octeon_rng *p = container_of(rng, struct octeon_rng, ops); rng 50 drivers/char/hw_random/octeon-rng.c static int octeon_rng_data_read(struct hwrng *rng, u32 *data) rng 52 drivers/char/hw_random/octeon-rng.c struct octeon_rng *p = container_of(rng, struct octeon_rng, ops); rng 62 drivers/char/hw_random/octeon-rng.c struct octeon_rng *rng; rng 71 drivers/char/hw_random/octeon-rng.c rng = devm_kzalloc(&pdev->dev, sizeof(*rng), GFP_KERNEL); rng 72 drivers/char/hw_random/octeon-rng.c if (!rng) rng 84 drivers/char/hw_random/octeon-rng.c rng->control_status = devm_ioremap_nocache(&pdev->dev, rng 87 drivers/char/hw_random/octeon-rng.c if (!rng->control_status) rng 90 drivers/char/hw_random/octeon-rng.c rng->result = devm_ioremap_nocache(&pdev->dev, rng 93 drivers/char/hw_random/octeon-rng.c if (!rng->result) rng 96 drivers/char/hw_random/octeon-rng.c rng->ops = ops; rng 98 drivers/char/hw_random/octeon-rng.c platform_set_drvdata(pdev, &rng->ops); rng 99 drivers/char/hw_random/octeon-rng.c ret = devm_hwrng_register(&pdev->dev, &rng->ops); rng 158 drivers/char/hw_random/omap-rng.c struct hwrng rng; rng 175 drivers/char/hw_random/omap-rng.c static int omap_rng_do_read(struct hwrng *rng, void *data, size_t max, rng 181 drivers/char/hw_random/omap-rng.c priv = (struct omap_rng_dev *)rng->priv; rng 205 drivers/char/hw_random/omap-rng.c static int omap_rng_init(struct hwrng *rng) rng 209 drivers/char/hw_random/omap-rng.c priv = (struct omap_rng_dev *)rng->priv; rng 213 drivers/char/hw_random/omap-rng.c static void omap_rng_cleanup(struct hwrng *rng) rng 217 drivers/char/hw_random/omap-rng.c priv = (struct omap_rng_dev *)rng->priv; rng 450 drivers/char/hw_random/omap-rng.c priv->rng.read = omap_rng_do_read; rng 451 drivers/char/hw_random/omap-rng.c priv->rng.init = omap_rng_init; rng 452 drivers/char/hw_random/omap-rng.c priv->rng.cleanup = omap_rng_cleanup; rng 453 drivers/char/hw_random/omap-rng.c priv->rng.quality = 900; rng 455 drivers/char/hw_random/omap-rng.c priv->rng.priv = (unsigned long)priv; rng 466 drivers/char/hw_random/omap-rng.c priv->rng.name = devm_kstrdup(dev, dev_name(dev), GFP_KERNEL); rng 467 drivers/char/hw_random/omap-rng.c if (!priv->rng.name) { rng 510 drivers/char/hw_random/omap-rng.c ret = devm_hwrng_register(&pdev->dev, &priv->rng); rng 79 drivers/char/hw_random/omap3-rom-rng.c static int omap3_rom_rng_read(struct hwrng *rng, void *data, size_t max, bool w) rng 115 drivers/char/hw_random/optee-rng.c static int optee_rng_read(struct hwrng *rng, void *buf, size_t max, bool wait) rng 117 drivers/char/hw_random/optee-rng.c struct optee_rng_private *pvt_data = to_optee_rng_private(rng); rng 143 drivers/char/hw_random/optee-rng.c static int optee_rng_init(struct hwrng *rng) rng 145 drivers/char/hw_random/optee-rng.c struct optee_rng_private *pvt_data = to_optee_rng_private(rng); rng 160 drivers/char/hw_random/optee-rng.c static void optee_rng_cleanup(struct hwrng *rng) rng 162 drivers/char/hw_random/optee-rng.c struct optee_rng_private *pvt_data = to_optee_rng_private(rng); rng 34 drivers/char/hw_random/pasemi-rng.c static int pasemi_rng_data_present(struct hwrng *rng, int wait) rng 36 drivers/char/hw_random/pasemi-rng.c void __iomem *rng_regs = (void __iomem *)rng->priv; rng 49 drivers/char/hw_random/pasemi-rng.c static int pasemi_rng_data_read(struct hwrng *rng, u32 *data) rng 51 drivers/char/hw_random/pasemi-rng.c void __iomem *rng_regs = (void __iomem *)rng->priv; rng 56 drivers/char/hw_random/pasemi-rng.c static int pasemi_rng_init(struct hwrng *rng) rng 58 drivers/char/hw_random/pasemi-rng.c void __iomem *rng_regs = (void __iomem *)rng->priv; rng 68 drivers/char/hw_random/pasemi-rng.c static void pasemi_rng_cleanup(struct hwrng *rng) rng 70 drivers/char/hw_random/pasemi-rng.c void __iomem *rng_regs = (void __iomem *)rng->priv; rng 38 drivers/char/hw_random/pic32-rng.c struct hwrng rng; rng 49 drivers/char/hw_random/pic32-rng.c static int pic32_rng_read(struct hwrng *rng, void *buf, size_t max, rng 52 drivers/char/hw_random/pic32-rng.c struct pic32_rng *priv = container_of(rng, struct pic32_rng, rng); rng 98 drivers/char/hw_random/pic32-rng.c priv->rng.name = pdev->name; rng 99 drivers/char/hw_random/pic32-rng.c priv->rng.read = pic32_rng_read; rng 101 drivers/char/hw_random/pic32-rng.c ret = hwrng_register(&priv->rng); rng 116 drivers/char/hw_random/pic32-rng.c struct pic32_rng *rng = platform_get_drvdata(pdev); rng 118 drivers/char/hw_random/pic32-rng.c hwrng_unregister(&rng->rng); rng 119 drivers/char/hw_random/pic32-rng.c writel(0, rng->base + RNGCON); rng 120 drivers/char/hw_random/pic32-rng.c clk_disable_unprepare(rng->clk); rng 15 drivers/char/hw_random/powernv-rng.c static int powernv_rng_read(struct hwrng *rng, void *data, size_t max, bool wait) rng 16 drivers/char/hw_random/pseries-rng.c static int pseries_rng_read(struct hwrng *rng, void *data, size_t max, bool wait) rng 171 drivers/char/hw_random/s390-trng.c static int trng_hwrng_data_read(struct hwrng *rng, u32 *data) rng 182 drivers/char/hw_random/s390-trng.c static int trng_hwrng_read(struct hwrng *rng, void *data, size_t max, bool wait) rng 48 drivers/char/hw_random/st-rng.c static int st_rng_read(struct hwrng *rng, void *data, size_t max, bool wait) rng 50 drivers/char/hw_random/st-rng.c struct st_rng_data *ddata = (struct st_rng_data *)rng->priv; rng 31 drivers/char/hw_random/stm32-rng.c struct hwrng rng; rng 38 drivers/char/hw_random/stm32-rng.c static int stm32_rng_read(struct hwrng *rng, void *data, size_t max, bool wait) rng 41 drivers/char/hw_random/stm32-rng.c container_of(rng, struct stm32_rng_private, rng); rng 45 drivers/char/hw_random/stm32-rng.c pm_runtime_get_sync((struct device *) priv->rng.priv); rng 57 drivers/char/hw_random/stm32-rng.c dev_err((struct device *)priv->rng.priv, rng 76 drivers/char/hw_random/stm32-rng.c pm_runtime_mark_last_busy((struct device *) priv->rng.priv); rng 77 drivers/char/hw_random/stm32-rng.c pm_runtime_put_sync_autosuspend((struct device *) priv->rng.priv); rng 82 drivers/char/hw_random/stm32-rng.c static int stm32_rng_init(struct hwrng *rng) rng 85 drivers/char/hw_random/stm32-rng.c container_of(rng, struct stm32_rng_private, rng); rng 104 drivers/char/hw_random/stm32-rng.c static void stm32_rng_cleanup(struct hwrng *rng) rng 107 drivers/char/hw_random/stm32-rng.c container_of(rng, struct stm32_rng_private, rng); rng 148 drivers/char/hw_random/stm32-rng.c priv->rng.name = dev_driver_string(dev), rng 150 drivers/char/hw_random/stm32-rng.c priv->rng.init = stm32_rng_init, rng 151 drivers/char/hw_random/stm32-rng.c priv->rng.cleanup = stm32_rng_cleanup, rng 153 drivers/char/hw_random/stm32-rng.c priv->rng.read = stm32_rng_read, rng 154 drivers/char/hw_random/stm32-rng.c priv->rng.priv = (unsigned long) dev; rng 155 drivers/char/hw_random/stm32-rng.c priv->rng.quality = 900; rng 161 drivers/char/hw_random/stm32-rng.c return devm_hwrng_register(dev, &priv->rng); rng 176 drivers/char/hw_random/stm32-rng.c stm32_rng_cleanup(&priv->rng); rng 185 drivers/char/hw_random/stm32-rng.c return stm32_rng_init(&priv->rng); rng 29 drivers/char/hw_random/tx4939-rng.c struct hwrng rng; rng 65 drivers/char/hw_random/tx4939-rng.c static int tx4939_rng_data_present(struct hwrng *rng, int wait) rng 67 drivers/char/hw_random/tx4939-rng.c struct tx4939_rng *rngdev = container_of(rng, struct tx4939_rng, rng); rng 98 drivers/char/hw_random/tx4939-rng.c static int tx4939_rng_data_read(struct hwrng *rng, u32 *buffer) rng 100 drivers/char/hw_random/tx4939-rng.c struct tx4939_rng *rngdev = container_of(rng, struct tx4939_rng, rng); rng 121 drivers/char/hw_random/tx4939-rng.c rngdev->rng.name = dev_name(&dev->dev); rng 122 drivers/char/hw_random/tx4939-rng.c rngdev->rng.data_present = tx4939_rng_data_present; rng 123 drivers/char/hw_random/tx4939-rng.c rngdev->rng.data_read = tx4939_rng_data_read; rng 142 drivers/char/hw_random/tx4939-rng.c if (!tx4939_rng_data_present(&rngdev->rng, 1)) rng 147 drivers/char/hw_random/tx4939-rng.c return devm_hwrng_register(&dev->dev, &rngdev->rng); rng 87 drivers/char/hw_random/via-rng.c static int via_rng_data_present(struct hwrng *rng, int wait) rng 116 drivers/char/hw_random/via-rng.c rng->priv = *via_rng_datum; rng 120 drivers/char/hw_random/via-rng.c static int via_rng_data_read(struct hwrng *rng, u32 *data) rng 122 drivers/char/hw_random/via-rng.c u32 via_rng_datum = (u32)rng->priv; rng 129 drivers/char/hw_random/via-rng.c static int via_rng_init(struct hwrng *rng) rng 53 drivers/char/hw_random/virtio-rng.c static int virtio_read(struct hwrng *rng, void *buf, size_t size, bool wait) rng 56 drivers/char/hw_random/virtio-rng.c struct virtrng_info *vi = (struct virtrng_info *)rng->priv; rng 79 drivers/char/hw_random/virtio-rng.c static void virtio_cleanup(struct hwrng *rng) rng 81 drivers/char/hw_random/virtio-rng.c struct virtrng_info *vi = (struct virtrng_info *)rng->priv; rng 211 drivers/char/hw_random/xgene-rng.c static int xgene_rng_data_present(struct hwrng *rng, int wait) rng 213 drivers/char/hw_random/xgene-rng.c struct xgene_rng_dev *ctx = (struct xgene_rng_dev *) rng->priv; rng 226 drivers/char/hw_random/xgene-rng.c static int xgene_rng_data_read(struct hwrng *rng, u32 *data) rng 228 drivers/char/hw_random/xgene-rng.c struct xgene_rng_dev *ctx = (struct xgene_rng_dev *) rng->priv; rng 275 drivers/char/hw_random/xgene-rng.c static int xgene_rng_init(struct hwrng *rng) rng 277 drivers/char/hw_random/xgene-rng.c struct xgene_rng_dev *ctx = (struct xgene_rng_dev *) rng->priv; rng 1140 drivers/char/pcmcia/synclink_cs.c info->icount.rng++; rng 2090 drivers/char/pcmcia/synclink_cs.c if (cnow.rng == cprev.rng && cnow.dsr == cprev.dsr && rng 2097 drivers/char/pcmcia/synclink_cs.c if ((arg & TIOCM_RNG && cnow.rng != cprev.rng) || rng 2204 drivers/char/pcmcia/synclink_cs.c icount->rng = cnow.rng; rng 535 drivers/char/tpm/tpm-chip.c static int tpm_hwrng_read(struct hwrng *rng, void *data, size_t max, bool wait) rng 537 drivers/char/tpm/tpm-chip.c struct tpm_chip *chip = container_of(rng, struct tpm_chip, hwrng); rng 1031 drivers/crypto/amcc/crypto4xx_core.c rc = crypto_register_rng(&alg->alg.u.rng); rng 1064 drivers/crypto/amcc/crypto4xx_core.c crypto_unregister_rng(&alg->alg.u.rng); rng 1172 drivers/crypto/amcc/crypto4xx_core.c amcc_alg = container_of(alg, struct crypto4xx_alg, alg.u.rng); rng 1357 drivers/crypto/amcc/crypto4xx_core.c { .type = CRYPTO_ALG_TYPE_RNG, .u.rng = { rng 139 drivers/crypto/amcc/crypto4xx_core.h struct rng_alg rng; rng 28 drivers/crypto/amcc/crypto4xx_trng.c static int ppc4xx_trng_data_present(struct hwrng *rng, int wait) rng 30 drivers/crypto/amcc/crypto4xx_trng.c struct crypto4xx_device *dev = (void *)rng->priv; rng 45 drivers/crypto/amcc/crypto4xx_trng.c static int ppc4xx_trng_data_read(struct hwrng *rng, u32 *data) rng 47 drivers/crypto/amcc/crypto4xx_trng.c struct crypto4xx_device *dev = (void *)rng->priv; rng 75 drivers/crypto/amcc/crypto4xx_trng.c struct hwrng *rng = NULL; rng 90 drivers/crypto/amcc/crypto4xx_trng.c rng = kzalloc(sizeof(*rng), GFP_KERNEL); rng 91 drivers/crypto/amcc/crypto4xx_trng.c if (!rng) rng 94 drivers/crypto/amcc/crypto4xx_trng.c rng->name = KBUILD_MODNAME; rng 95 drivers/crypto/amcc/crypto4xx_trng.c rng->data_present = ppc4xx_trng_data_present; rng 96 drivers/crypto/amcc/crypto4xx_trng.c rng->data_read = ppc4xx_trng_data_read; rng 97 drivers/crypto/amcc/crypto4xx_trng.c rng->priv = (unsigned long) dev; rng 98 drivers/crypto/amcc/crypto4xx_trng.c core_dev->trng = rng; rng 112 drivers/crypto/amcc/crypto4xx_trng.c kfree(rng); rng 25 drivers/crypto/atmel-sha204a.c struct hwrng *rng = areq; rng 32 drivers/crypto/atmel-sha204a.c rng->priv = (unsigned long)work_data; rng 36 drivers/crypto/atmel-sha204a.c static int atmel_sha204a_rng_read_nonblocking(struct hwrng *rng, void *data, rng 42 drivers/crypto/atmel-sha204a.c i2c_priv = container_of(rng, struct atmel_i2c_client_priv, hwrng); rng 48 drivers/crypto/atmel-sha204a.c if (rng->priv) { rng 49 drivers/crypto/atmel-sha204a.c work_data = (struct atmel_i2c_work_data *)rng->priv; rng 52 drivers/crypto/atmel-sha204a.c rng->priv = 0; rng 65 drivers/crypto/atmel-sha204a.c atmel_i2c_enqueue(work_data, atmel_sha204a_rng_done, rng); rng 70 drivers/crypto/atmel-sha204a.c static int atmel_sha204a_rng_read(struct hwrng *rng, void *data, size_t max, rng 78 drivers/crypto/atmel-sha204a.c return atmel_sha204a_rng_read_nonblocking(rng, data, max); rng 80 drivers/crypto/atmel-sha204a.c i2c_priv = container_of(rng, struct atmel_i2c_client_priv, hwrng); rng 144 drivers/crypto/caam/caamrng.c static int caam_read(struct hwrng *rng, void *data, size_t max, bool wait) rng 193 drivers/crypto/caam/caamrng.c return copied_idx + caam_read(rng, data + copied_idx, rng 247 drivers/crypto/caam/caamrng.c static void caam_cleanup(struct hwrng *rng) rng 326 drivers/crypto/caam/caamrng.c rng_inst = rd_reg32(&priv->ctrl->vreg.rng) & CHA_VER_NUM_MASK; rng 788 drivers/crypto/caam/ctrl.c rng_vid = (rd_reg32(&ctrl->vreg.rng) & CHA_VER_VID_MASK) >> rng 291 drivers/crypto/caam/regs.h u32 rng; /* RNG_VERSION */ rng 506 drivers/crypto/ccp/ccp-dev.c int ccp_trng_read(struct hwrng *rng, void *data, size_t max, bool wait) rng 508 drivers/crypto/ccp/ccp-dev.c struct ccp_device *ccp = container_of(rng, struct ccp_device, hwrng); rng 638 drivers/crypto/ccp/ccp-dev.h int ccp_trng_read(struct hwrng *rng, void *data, size_t max, bool wait); rng 66 drivers/crypto/exynos-rng.c struct exynos_rng_dev *rng; rng 87 drivers/crypto/exynos-rng.c static u32 exynos_rng_readl(struct exynos_rng_dev *rng, u32 offset) rng 89 drivers/crypto/exynos-rng.c return readl_relaxed(rng->mem + offset); rng 92 drivers/crypto/exynos-rng.c static void exynos_rng_writel(struct exynos_rng_dev *rng, u32 val, u32 offset) rng 94 drivers/crypto/exynos-rng.c writel_relaxed(val, rng->mem + offset); rng 97 drivers/crypto/exynos-rng.c static int exynos_rng_set_seed(struct exynos_rng_dev *rng, rng 117 drivers/crypto/exynos-rng.c exynos_rng_writel(rng, val, EXYNOS_RNG_SEED(seed_reg)); rng 120 drivers/crypto/exynos-rng.c val = exynos_rng_readl(rng, EXYNOS_RNG_STATUS); rng 122 drivers/crypto/exynos-rng.c dev_warn(rng->dev, "Seed setting not finished\n"); rng 126 drivers/crypto/exynos-rng.c rng->last_seeding = jiffies; rng 127 drivers/crypto/exynos-rng.c rng->bytes_seeding = 0; rng 140 drivers/crypto/exynos-rng.c static int exynos_rng_get_random(struct exynos_rng_dev *rng, rng 146 drivers/crypto/exynos-rng.c if (rng->type == EXYNOS_PRNG_EXYNOS4) { rng 147 drivers/crypto/exynos-rng.c exynos_rng_writel(rng, EXYNOS_RNG_CONTROL_START, rng 149 drivers/crypto/exynos-rng.c } else if (rng->type == EXYNOS_PRNG_EXYNOS5) { rng 150 drivers/crypto/exynos-rng.c exynos_rng_writel(rng, EXYNOS_RNG_GEN_PRNG, rng 154 drivers/crypto/exynos-rng.c while (!(exynos_rng_readl(rng, rng 162 drivers/crypto/exynos-rng.c exynos_rng_writel(rng, EXYNOS_RNG_STATUS_RNG_DONE, rng 165 drivers/crypto/exynos-rng.c memcpy_fromio(dst, rng->mem + EXYNOS_RNG_OUT_BASE, *read); rng 166 drivers/crypto/exynos-rng.c rng->bytes_seeding += *read; rng 172 drivers/crypto/exynos-rng.c static void exynos_rng_reseed(struct exynos_rng_dev *rng) rng 174 drivers/crypto/exynos-rng.c unsigned long next_seeding = rng->last_seeding + \ rng 181 drivers/crypto/exynos-rng.c rng->bytes_seeding < EXYNOS_RNG_RESEED_BYTES) rng 184 drivers/crypto/exynos-rng.c if (exynos_rng_get_random(rng, seed, sizeof(seed), &read)) rng 187 drivers/crypto/exynos-rng.c exynos_rng_set_seed(rng, seed, read); rng 190 drivers/crypto/exynos-rng.c mutex_unlock(&rng->lock); rng 191 drivers/crypto/exynos-rng.c mutex_lock(&rng->lock); rng 199 drivers/crypto/exynos-rng.c struct exynos_rng_dev *rng = ctx->rng; rng 203 drivers/crypto/exynos-rng.c ret = clk_prepare_enable(rng->clk); rng 207 drivers/crypto/exynos-rng.c mutex_lock(&rng->lock); rng 209 drivers/crypto/exynos-rng.c ret = exynos_rng_get_random(rng, dst, dlen, &read); rng 216 drivers/crypto/exynos-rng.c exynos_rng_reseed(rng); rng 218 drivers/crypto/exynos-rng.c mutex_unlock(&rng->lock); rng 220 drivers/crypto/exynos-rng.c clk_disable_unprepare(rng->clk); rng 229 drivers/crypto/exynos-rng.c struct exynos_rng_dev *rng = ctx->rng; rng 232 drivers/crypto/exynos-rng.c ret = clk_prepare_enable(rng->clk); rng 236 drivers/crypto/exynos-rng.c mutex_lock(&rng->lock); rng 237 drivers/crypto/exynos-rng.c ret = exynos_rng_set_seed(ctx->rng, seed, slen); rng 238 drivers/crypto/exynos-rng.c mutex_unlock(&rng->lock); rng 240 drivers/crypto/exynos-rng.c clk_disable_unprepare(rng->clk); rng 249 drivers/crypto/exynos-rng.c ctx->rng = exynos_rng_dev; rng 270 drivers/crypto/exynos-rng.c struct exynos_rng_dev *rng; rng 276 drivers/crypto/exynos-rng.c rng = devm_kzalloc(&pdev->dev, sizeof(*rng), GFP_KERNEL); rng 277 drivers/crypto/exynos-rng.c if (!rng) rng 280 drivers/crypto/exynos-rng.c rng->type = (enum exynos_prng_type)of_device_get_match_data(&pdev->dev); rng 282 drivers/crypto/exynos-rng.c mutex_init(&rng->lock); rng 284 drivers/crypto/exynos-rng.c rng->dev = &pdev->dev; rng 285 drivers/crypto/exynos-rng.c rng->clk = devm_clk_get(&pdev->dev, "secss"); rng 286 drivers/crypto/exynos-rng.c if (IS_ERR(rng->clk)) { rng 288 drivers/crypto/exynos-rng.c return PTR_ERR(rng->clk); rng 291 drivers/crypto/exynos-rng.c rng->mem = devm_platform_ioremap_resource(pdev, 0); rng 292 drivers/crypto/exynos-rng.c if (IS_ERR(rng->mem)) rng 293 drivers/crypto/exynos-rng.c return PTR_ERR(rng->mem); rng 295 drivers/crypto/exynos-rng.c platform_set_drvdata(pdev, rng); rng 297 drivers/crypto/exynos-rng.c exynos_rng_dev = rng; rng 320 drivers/crypto/exynos-rng.c struct exynos_rng_dev *rng = dev_get_drvdata(dev); rng 324 drivers/crypto/exynos-rng.c if (!rng->last_seeding) rng 327 drivers/crypto/exynos-rng.c rng->seed_save_len = 0; rng 328 drivers/crypto/exynos-rng.c ret = clk_prepare_enable(rng->clk); rng 332 drivers/crypto/exynos-rng.c mutex_lock(&rng->lock); rng 335 drivers/crypto/exynos-rng.c exynos_rng_get_random(rng, rng->seed_save, sizeof(rng->seed_save), rng 336 drivers/crypto/exynos-rng.c &(rng->seed_save_len)); rng 338 drivers/crypto/exynos-rng.c mutex_unlock(&rng->lock); rng 340 drivers/crypto/exynos-rng.c dev_dbg(rng->dev, "Stored %u bytes for seeding on system resume\n", rng 341 drivers/crypto/exynos-rng.c rng->seed_save_len); rng 343 drivers/crypto/exynos-rng.c clk_disable_unprepare(rng->clk); rng 350 drivers/crypto/exynos-rng.c struct exynos_rng_dev *rng = dev_get_drvdata(dev); rng 354 drivers/crypto/exynos-rng.c if (!rng->last_seeding) rng 357 drivers/crypto/exynos-rng.c ret = clk_prepare_enable(rng->clk); rng 361 drivers/crypto/exynos-rng.c mutex_lock(&rng->lock); rng 363 drivers/crypto/exynos-rng.c ret = exynos_rng_set_seed(rng, rng->seed_save, rng->seed_save_len); rng 365 drivers/crypto/exynos-rng.c mutex_unlock(&rng->lock); rng 367 drivers/crypto/exynos-rng.c clk_disable_unprepare(rng->clk); rng 435 drivers/crypto/hifn_795x.c struct hwrng rng; rng 749 drivers/crypto/hifn_795x.c static int hifn_rng_data_present(struct hwrng *rng, int wait) rng 751 drivers/crypto/hifn_795x.c struct hifn_device *dev = (struct hifn_device *)rng->priv; rng 764 drivers/crypto/hifn_795x.c static int hifn_rng_data_read(struct hwrng *rng, u32 *data) rng 766 drivers/crypto/hifn_795x.c struct hifn_device *dev = (struct hifn_device *)rng->priv; rng 781 drivers/crypto/hifn_795x.c dev->rng.name = dev->name; rng 782 drivers/crypto/hifn_795x.c dev->rng.data_present = hifn_rng_data_present, rng 783 drivers/crypto/hifn_795x.c dev->rng.data_read = hifn_rng_data_read, rng 784 drivers/crypto/hifn_795x.c dev->rng.priv = (unsigned long)dev; rng 786 drivers/crypto/hifn_795x.c return hwrng_register(&dev->rng); rng 791 drivers/crypto/hifn_795x.c hwrng_unregister(&dev->rng); rng 36 drivers/crypto/qcom-rng.c struct qcom_rng *rng; rng 41 drivers/crypto/qcom-rng.c static int qcom_rng_read(struct qcom_rng *rng, u8 *data, unsigned int max) rng 48 drivers/crypto/qcom-rng.c val = readl_relaxed(rng->base + PRNG_STATUS); rng 52 drivers/crypto/qcom-rng.c val = readl_relaxed(rng->base + PRNG_DATA_OUT); rng 75 drivers/crypto/qcom-rng.c struct qcom_rng *rng = ctx->rng; rng 78 drivers/crypto/qcom-rng.c ret = clk_prepare_enable(rng->clk); rng 82 drivers/crypto/qcom-rng.c mutex_lock(&rng->lock); rng 84 drivers/crypto/qcom-rng.c ret = qcom_rng_read(rng, dstn, dlen); rng 86 drivers/crypto/qcom-rng.c mutex_unlock(&rng->lock); rng 87 drivers/crypto/qcom-rng.c clk_disable_unprepare(rng->clk); rng 98 drivers/crypto/qcom-rng.c static int qcom_rng_enable(struct qcom_rng *rng) rng 103 drivers/crypto/qcom-rng.c ret = clk_prepare_enable(rng->clk); rng 108 drivers/crypto/qcom-rng.c val = readl_relaxed(rng->base + PRNG_CONFIG); rng 112 drivers/crypto/qcom-rng.c val = readl_relaxed(rng->base + PRNG_LFSR_CFG); rng 115 drivers/crypto/qcom-rng.c writel(val, rng->base + PRNG_LFSR_CFG); rng 117 drivers/crypto/qcom-rng.c val = readl_relaxed(rng->base + PRNG_CONFIG); rng 119 drivers/crypto/qcom-rng.c writel(val, rng->base + PRNG_CONFIG); rng 122 drivers/crypto/qcom-rng.c clk_disable_unprepare(rng->clk); rng 131 drivers/crypto/qcom-rng.c ctx->rng = qcom_rng_dev; rng 133 drivers/crypto/qcom-rng.c if (!ctx->rng->skip_init) rng 134 drivers/crypto/qcom-rng.c return qcom_rng_enable(ctx->rng); rng 156 drivers/crypto/qcom-rng.c struct qcom_rng *rng; rng 159 drivers/crypto/qcom-rng.c rng = devm_kzalloc(&pdev->dev, sizeof(*rng), GFP_KERNEL); rng 160 drivers/crypto/qcom-rng.c if (!rng) rng 163 drivers/crypto/qcom-rng.c platform_set_drvdata(pdev, rng); rng 164 drivers/crypto/qcom-rng.c mutex_init(&rng->lock); rng 166 drivers/crypto/qcom-rng.c rng->base = devm_platform_ioremap_resource(pdev, 0); rng 167 drivers/crypto/qcom-rng.c if (IS_ERR(rng->base)) rng 168 drivers/crypto/qcom-rng.c return PTR_ERR(rng->base); rng 172 drivers/crypto/qcom-rng.c rng->clk = devm_clk_get(&pdev->dev, "core"); rng 173 drivers/crypto/qcom-rng.c if (IS_ERR(rng->clk)) rng 174 drivers/crypto/qcom-rng.c return PTR_ERR(rng->clk); rng 178 drivers/crypto/qcom-rng.c rng->skip_init = (unsigned long)device_get_match_data(&pdev->dev); rng 180 drivers/crypto/qcom-rng.c qcom_rng_dev = rng; rng 210 drivers/crypto/sunxi-ss/sun4i-ss-core.c .alg.rng = { rng 365 drivers/crypto/sunxi-ss/sun4i-ss-core.c err = crypto_register_rng(&ss_algs[i].alg.rng); rng 368 drivers/crypto/sunxi-ss/sun4i-ss-core.c ss_algs[i].alg.rng.base.cra_name); rng 386 drivers/crypto/sunxi-ss/sun4i-ss-core.c crypto_unregister_rng(&ss_algs[i].alg.rng); rng 413 drivers/crypto/sunxi-ss/sun4i-ss-core.c crypto_unregister_rng(&ss_algs[i].alg.rng); rng 9 drivers/crypto/sunxi-ss/sun4i-ss-prng.c algt = container_of(alg, struct sun4i_ss_alg_template, alg.rng); rng 28 drivers/crypto/sunxi-ss/sun4i-ss-prng.c algt = container_of(alg, struct sun4i_ss_alg_template, alg.rng); rng 153 drivers/crypto/sunxi-ss/sun4i-ss.h struct rng_alg rng; rng 752 drivers/crypto/talitos.c static int talitos_rng_data_present(struct hwrng *rng, int wait) rng 754 drivers/crypto/talitos.c struct device *dev = (struct device *)rng->priv; rng 770 drivers/crypto/talitos.c static int talitos_rng_data_read(struct hwrng *rng, u32 *data) rng 772 drivers/crypto/talitos.c struct device *dev = (struct device *)rng->priv; rng 782 drivers/crypto/talitos.c static int talitos_rng_init(struct hwrng *rng) rng 784 drivers/crypto/talitos.c struct device *dev = (struct device *)rng->priv; rng 809 drivers/crypto/talitos.c priv->rng.name = dev_driver_string(dev), rng 810 drivers/crypto/talitos.c priv->rng.init = talitos_rng_init, rng 811 drivers/crypto/talitos.c priv->rng.data_present = talitos_rng_data_present, rng 812 drivers/crypto/talitos.c priv->rng.data_read = talitos_rng_data_read, rng 813 drivers/crypto/talitos.c priv->rng.priv = (unsigned long)dev; rng 815 drivers/crypto/talitos.c err = hwrng_register(&priv->rng); rng 829 drivers/crypto/talitos.c hwrng_unregister(&priv->rng); rng 154 drivers/crypto/talitos.h struct hwrng rng; rng 24 drivers/firmware/efi/libstub/random.c struct efi_rng_protocol *rng; rng 27 drivers/firmware/efi/libstub/random.c (void **)&rng); rng 31 drivers/firmware/efi/libstub/random.c return rng->get_rng(rng, NULL, size, out); rng 149 drivers/firmware/efi/libstub/random.c struct efi_rng_protocol *rng; rng 154 drivers/firmware/efi/libstub/random.c (void **)&rng); rng 164 drivers/firmware/efi/libstub/random.c status = rng->get_rng(rng, &rng_algo_raw, EFI_RANDOM_SEED_SIZE, rng 171 drivers/firmware/efi/libstub/random.c status = rng->get_rng(rng, NULL, EFI_RANDOM_SEED_SIZE, rng 241 drivers/firmware/turris-mox-rwtm.c static int mox_hwrng_read(struct hwrng *rng, void *data, size_t max, bool wait) rng 243 drivers/firmware/turris-mox-rwtm.c struct mox_rwtm *rwtm = (struct mox_rwtm *) rng->priv; rng 176 drivers/hid/hid-u2fzero.c static int u2fzero_rng_read(struct hwrng *rng, void *data, rng 179 drivers/hid/hid-u2fzero.c struct u2fzero_device *dev = container_of(rng, rng 137 drivers/ipack/devices/ipoctal.c icount->rng = 0; rng 53 drivers/mmc/core/sdio_uart.c __u32 rng; rng 474 drivers/mmc/core/sdio_uart.c port->icount.rng++; rng 993 drivers/mmc/core/sdio_uart.c if (port->icount.rng) rng 995 drivers/mmc/core/sdio_uart.c port->icount.rng); rng 1511 drivers/net/usb/hso.c icount->rng++; rng 1564 drivers/net/usb/hso.c if (((arg & TIOCM_RNG) && (cnow.rng != cprev.rng)) || rng 1607 drivers/net/usb/hso.c icount->rng = cnow.rng; rng 457 drivers/net/wireless/ath/carl9170/carl9170.h struct hwrng rng; rng 462 drivers/net/wireless/ath/carl9170/carl9170.h } rng; rng 1558 drivers/net/wireless/ath/carl9170/main.c if (!IS_ACCEPTING_CMD(ar) || !ar->rng.initialized) rng 1561 drivers/net/wireless/ath/carl9170/main.c count = ARRAY_SIZE(ar->rng.cache); rng 1571 drivers/net/wireless/ath/carl9170/main.c ar->rng.cache[off + i] = buf[i]; rng 1577 drivers/net/wireless/ath/carl9170/main.c ar->rng.cache_idx = 0; rng 1584 drivers/net/wireless/ath/carl9170/main.c static int carl9170_rng_read(struct hwrng *rng, u32 *data) rng 1586 drivers/net/wireless/ath/carl9170/main.c struct ar9170 *ar = (struct ar9170 *)rng->priv; rng 1590 drivers/net/wireless/ath/carl9170/main.c if (ar->rng.cache_idx >= ARRAY_SIZE(ar->rng.cache)) { rng 1598 drivers/net/wireless/ath/carl9170/main.c *data = ar->rng.cache[ar->rng.cache_idx++]; rng 1606 drivers/net/wireless/ath/carl9170/main.c if (ar->rng.initialized) { rng 1607 drivers/net/wireless/ath/carl9170/main.c hwrng_unregister(&ar->rng.rng); rng 1608 drivers/net/wireless/ath/carl9170/main.c ar->rng.initialized = false; rng 1616 drivers/net/wireless/ath/carl9170/main.c snprintf(ar->rng.name, ARRAY_SIZE(ar->rng.name), rng 1618 drivers/net/wireless/ath/carl9170/main.c ar->rng.rng.name = ar->rng.name; rng 1619 drivers/net/wireless/ath/carl9170/main.c ar->rng.rng.data_read = carl9170_rng_read; rng 1620 drivers/net/wireless/ath/carl9170/main.c ar->rng.rng.priv = (unsigned long)ar; rng 1622 drivers/net/wireless/ath/carl9170/main.c if (WARN_ON(ar->rng.initialized)) rng 1625 drivers/net/wireless/ath/carl9170/main.c err = hwrng_register(&ar->rng.rng); rng 1632 drivers/net/wireless/ath/carl9170/main.c ar->rng.initialized = true; rng 933 drivers/net/wireless/broadcom/b43/b43.h struct hwrng rng; rng 3532 drivers/net/wireless/broadcom/b43/main.c static int b43_rng_read(struct hwrng *rng, u32 *data) rng 3534 drivers/net/wireless/broadcom/b43/main.c struct b43_wl *wl = (struct b43_wl *)rng->priv; rng 3554 drivers/net/wireless/broadcom/b43/main.c hwrng_unregister(&wl->rng); rng 3565 drivers/net/wireless/broadcom/b43/main.c wl->rng.name = wl->rng_name; rng 3566 drivers/net/wireless/broadcom/b43/main.c wl->rng.data_read = b43_rng_read; rng 3567 drivers/net/wireless/broadcom/b43/main.c wl->rng.priv = (unsigned long)wl; rng 3569 drivers/net/wireless/broadcom/b43/main.c err = hwrng_register(&wl->rng); rng 608 drivers/net/wireless/broadcom/b43legacy/b43legacy.h struct hwrng rng; rng 2398 drivers/net/wireless/broadcom/b43legacy/main.c static int b43legacy_rng_read(struct hwrng *rng, u32 *data) rng 2400 drivers/net/wireless/broadcom/b43legacy/main.c struct b43legacy_wl *wl = (struct b43legacy_wl *)rng->priv; rng 2419 drivers/net/wireless/broadcom/b43legacy/main.c hwrng_unregister(&wl->rng); rng 2430 drivers/net/wireless/broadcom/b43legacy/main.c wl->rng.name = wl->rng_name; rng 2431 drivers/net/wireless/broadcom/b43legacy/main.c wl->rng.data_read = b43legacy_rng_read; rng 2432 drivers/net/wireless/broadcom/b43legacy/main.c wl->rng.priv = (unsigned long)wl; rng 2434 drivers/net/wireless/broadcom/b43legacy/main.c err = hwrng_register(&wl->rng); rng 1060 drivers/s390/crypto/zcrypt_api.c if (!zq->online || !zq->ops->rng) rng 1079 drivers/s390/crypto/zcrypt_api.c rc = pref_zq->ops->rng(pref_zq, buffer, &ap_msg); rng 1694 drivers/s390/crypto/zcrypt_api.c static int zcrypt_rng_data_read(struct hwrng *rng, u32 *data) rng 66 drivers/s390/crypto/zcrypt_api.h long (*rng)(struct zcrypt_queue *, char *, struct ap_message *); rng 1332 drivers/s390/crypto/zcrypt_msgtype6.c .rng = zcrypt_msgtype6_rng, rng 180 drivers/s390/crypto/zcrypt_queue.c if (zq->ops->rng) { rng 219 drivers/s390/crypto/zcrypt_queue.c if (zq->ops->rng) rng 56 drivers/staging/comedi/comedi.h #define CR_PACK(chan, rng, aref) \ rng 57 drivers/staging/comedi/comedi.h ((((aref) & 0x3) << 24) | (((rng) & 0xff) << 16) | (chan)) rng 306 drivers/staging/fwserial/fwserial.c ++port->icount.rng; rng 1195 drivers/staging/fwserial/fwserial.c delta = ((mask & TIOCM_RNG && prev->rng != now.rng) || rng 1387 drivers/staging/fwserial/fwserial.c icount->rng = port->icount.rng; rng 1410 drivers/staging/fwserial/fwserial.c port->icount.dsr, port->icount.rng, port->icount.dcd); rng 683 drivers/staging/greybus/uart.c if ((arg & TIOCM_RI) && (old.rng != new.rng)) rng 708 drivers/staging/greybus/uart.c icount->rng = gb_tty->iocount.rng; rng 1192 drivers/tty/amiserial.c icount->rng = cnow.rng; rng 1248 drivers/tty/amiserial.c if (cnow.rng == cprev.rng && cnow.dsr == cprev.dsr && rng 1253 drivers/tty/amiserial.c if ( ((arg & TIOCM_RNG) && (cnow.rng != cprev.rng)) || rng 1648 drivers/tty/amiserial.c state->icount.rng = state->icount.dcd = 0; rng 710 drivers/tty/cyclades.c info->icount.rng++; rng 1132 drivers/tty/cyclades.c info->icount.rng++; rng 2604 drivers/tty/cyclades.c ret = ((arg & TIOCM_RNG) && (cnow.rng != cprev->rng)) || rng 2749 drivers/tty/cyclades.c sic->rng = cnow.rng; rng 815 drivers/tty/mxser.c port->icount.rng++; rng 1588 drivers/tty/mxser.c ip->icount.rng++; rng 1664 drivers/tty/mxser.c ret = ((arg & TIOCM_RNG) && (cnow.rng != cprev->rng)) || rng 1843 drivers/tty/mxser.c icount->rng = cnow.rng; rng 964 drivers/tty/nozomi.c dc->port[port].tty_icount.rng++; rng 973 drivers/tty/nozomi.c dc->port[port].tty_icount.rng, dc->port[port].tty_icount.dsr); rng 1717 drivers/tty/nozomi.c ret = ((flags & TIOCM_RNG) && (cnow.rng != cprev->rng)) rng 1735 drivers/tty/nozomi.c icount->rng = cnow.rng; rng 1784 drivers/tty/serial/8250/8250_port.c port->icount.rng++; rng 1385 drivers/tty/serial/atmel_serial.c port->icount.rng++; rng 676 drivers/tty/serial/icom.c icom_port->uart_port.icount.rng++; rng 864 drivers/tty/serial/imx.c sport->port.icount.rng++; rng 764 drivers/tty/serial/mxs-auart.c s->port.icount.rng++; rng 478 drivers/tty/serial/omap-serial.c up->port.icount.rng++; rng 91 drivers/tty/serial/pnx8xxx_uart.c sport->port.icount.rng++; rng 232 drivers/tty/serial/pxa.c up->port.icount.rng++; rng 101 drivers/tty/serial/sa1100.c sport->port.icount.rng++; rng 794 drivers/tty/serial/serial-tegra.c tup->uport.icount.rng++; rng 1222 drivers/tty/serial/serial_core.c if (((arg & TIOCM_RNG) && (cnow.rng != cprev.rng)) || rng 1270 drivers/tty/serial/serial_core.c icount->rng = cnow.rng; rng 173 drivers/tty/serial/serial_mctrl_gpio.c port->icount.rng++; rng 446 drivers/tty/serial/sunsu.c up->port.icount.rng++; rng 368 drivers/tty/serial/vr41xx_siu.c port->icount.rng++; rng 688 drivers/tty/serial/zs.c uport->icount.rng++; rng 1297 drivers/tty/synclink.c icount->rng++; rng 2805 drivers/tty/synclink.c if (cnow.rng == cprev.rng && cnow.dsr == cprev.dsr && rng 2812 drivers/tty/synclink.c if ((arg & TIOCM_RNG && cnow.rng != cprev.rng) || rng 2928 drivers/tty/synclink.c icount->rng = cnow.rng; rng 1110 drivers/tty/synclink_gt.c icount->rng = cnow.rng; rng 2083 drivers/tty/synclink_gt.c info->icount.rng++; rng 3124 drivers/tty/synclink_gt.c if (cnow.rng == cprev.rng && cnow.dsr == cprev.dsr && rng 3131 drivers/tty/synclink_gt.c if ((arg & TIOCM_RNG && cnow.rng != cprev.rng) || rng 1319 drivers/tty/synclinkmp.c icount->rng = cnow.rng; rng 2404 drivers/tty/synclinkmp.c icount->rng++; rng 3149 drivers/tty/synclinkmp.c if (cnow.rng == cprev.rng && cnow.dsr == cprev.dsr && rng 3156 drivers/tty/synclinkmp.c if ((arg & TIOCM_RNG && cnow.rng != cprev.rng) || rng 318 drivers/usb/class/cdc-acm.c acm->iocount.rng++; rng 983 drivers/usb/class/cdc-acm.c old.rng != new.rng) rng 1012 drivers/usb/class/cdc-acm.c icount->rng = acm->iocount.rng; rng 27 drivers/usb/misc/chaoskey.c static int chaoskey_rng_read(struct hwrng *rng, void *data, rng 479 drivers/usb/misc/chaoskey.c static int chaoskey_rng_read(struct hwrng *rng, void *data, rng 482 drivers/usb/misc/chaoskey.c struct chaoskey *dev = container_of(rng, struct chaoskey, hwrng); rng 500 drivers/usb/serial/ark3116.c port->icount.rng++; rng 568 drivers/usb/serial/ch341.c port->icount.rng++; rng 1111 drivers/usb/serial/cypress_m8.c port->icount.rng++; rng 201 drivers/usb/serial/f81232.c port->icount.rng++; rng 1040 drivers/usb/serial/f81534.c port->icount.rng++; rng 2507 drivers/usb/serial/ftdi_sio.c port->icount.rng++; rng 517 drivers/usb/serial/generic.c ret = ((arg & TIOCM_RNG) && (cnow.rng != cprev->rng)) || rng 560 drivers/usb/serial/generic.c icount->rng = cnow.rng; rng 2022 drivers/usb/serial/io_edgeport.c icount->rng++; rng 1574 drivers/usb/serial/io_ti.c icount->rng++; rng 345 drivers/usb/serial/mct_u232.c icount->rng++; rng 404 drivers/usb/serial/mos7840.c icount->rng++; rng 706 drivers/usb/serial/oti6858.c port->icount.rng++; rng 935 drivers/usb/serial/pl2303.c port->icount.rng++; rng 862 drivers/usb/serial/quatech2.c port->icount.rng++; rng 453 drivers/usb/serial/ssu100.c port->icount.rng++; rng 1454 drivers/usb/serial/ti_usb_3410_5052.c icount->rng++; rng 2169 fs/nfs/pnfs.c struct pnfs_layout_range rng = { rng 2179 fs/nfs/pnfs.c if (rng.iomode == IOMODE_READ && rng 2187 fs/nfs/pnfs.c &rng, GFP_KERNEL); rng 2201 fs/nfs/pnfs.c struct pnfs_layout_range rng = { rng 2210 fs/nfs/pnfs.c &rng, GFP_KERNEL); rng 587 include/linux/crypto.h struct crypto_istat_rng rng; rng 105 include/linux/cyclades.h __u32 cts, dsr, rng, dcd, tx, rx; rng 41 include/linux/hw_random.h int (*init)(struct hwrng *rng); rng 42 include/linux/hw_random.h void (*cleanup)(struct hwrng *rng); rng 43 include/linux/hw_random.h int (*data_present)(struct hwrng *rng, int wait); rng 44 include/linux/hw_random.h int (*data_read)(struct hwrng *rng, u32 *data); rng 45 include/linux/hw_random.h int (*read)(struct hwrng *rng, void *data, size_t max, bool wait); rng 58 include/linux/hw_random.h extern int hwrng_register(struct hwrng *rng); rng 59 include/linux/hw_random.h extern int devm_hwrng_register(struct device *dev, struct hwrng *rng); rng 61 include/linux/hw_random.h extern void hwrng_unregister(struct hwrng *rng); rng 62 include/linux/hw_random.h extern void devm_hwrng_unregister(struct device *dve, struct hwrng *rng); rng 21 include/linux/serial.h __u32 cts, dsr, rng, dcd, tx, rx; rng 91 include/linux/serial_core.h __u32 rng; rng 103 include/uapi/linux/serial.h int cts, dsr, rng, dcd; rng 214 include/uapi/linux/synclink.h __u32 cts, dsr, rng, dcd, tx, rx;