Lines Matching +full:iproc +full:- +full:rng200
1 // SPDX-License-Identifier: GPL-2.0-only
7 * DESCRIPTION: The Broadcom iProc RNG200 Driver
106 status = ioread32(priv->base + RNG_INT_STATUS_OFFSET); in iproc_rng200_read()
111 return max - num_remaining; in iproc_rng200_read()
113 iproc_rng200_restart(priv->base); in iproc_rng200_read()
118 if ((ioread32(priv->base + RNG_FIFO_COUNT_OFFSET) & in iproc_rng200_read()
123 *(uint32_t *)buf = ioread32(priv->base + in iproc_rng200_read()
126 num_remaining -= sizeof(uint32_t); in iproc_rng200_read()
129 uint32_t rnd_number = ioread32(priv->base + in iproc_rng200_read()
141 return max - num_remaining; in iproc_rng200_read()
148 return max - num_remaining; in iproc_rng200_read()
155 iproc_rng200_enable_set(priv->base, true); in iproc_rng200_init()
164 iproc_rng200_enable_set(priv->base, false); in iproc_rng200_cleanup()
170 struct device *dev = &pdev->dev; in iproc_rng200_probe()
175 return -ENOMEM; in iproc_rng200_probe()
178 priv->base = devm_platform_ioremap_resource(pdev, 0); in iproc_rng200_probe()
179 if (IS_ERR(priv->base)) { in iproc_rng200_probe()
181 return PTR_ERR(priv->base); in iproc_rng200_probe()
186 priv->rng.name = "iproc-rng200"; in iproc_rng200_probe()
187 priv->rng.read = iproc_rng200_read; in iproc_rng200_probe()
188 priv->rng.init = iproc_rng200_init; in iproc_rng200_probe()
189 priv->rng.cleanup = iproc_rng200_cleanup; in iproc_rng200_probe()
192 ret = devm_hwrng_register(dev, &priv->rng); in iproc_rng200_probe()
207 iproc_rng200_cleanup(&priv->rng); in iproc_rng200_suspend()
216 iproc_rng200_init(&priv->rng); in iproc_rng200_resume()
226 { .compatible = "brcm,bcm2711-rng200", },
227 { .compatible = "brcm,bcm7211-rng200", },
228 { .compatible = "brcm,bcm7278-rng200", },
229 { .compatible = "brcm,iproc-rng200", },
236 .name = "iproc-rng200",
245 MODULE_DESCRIPTION("iProc RNG200 Random Number Generator driver");