#include <linux/clk.h>
#include <linux/crypto.h>
#include <linux/err.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <crypto/internal/rng.h>
#define EXYNOS_RNG_CONTROL …
#define EXYNOS_RNG_STATUS …
#define EXYNOS_RNG_SEED_CONF …
#define EXYNOS_RNG_GEN_PRNG …
#define EXYNOS_RNG_SEED_BASE …
#define EXYNOS_RNG_SEED(n) …
#define EXYNOS_RNG_OUT_BASE …
#define EXYNOS_RNG_OUT(n) …
#define EXYNOS_RNG_CONTROL_START …
#define EXYNOS_RNG_STATUS_SEED_SETTING_DONE …
#define EXYNOS_RNG_STATUS_RNG_DONE …
#define EXYNOS_RNG_SEED_REGS …
#define EXYNOS_RNG_SEED_SIZE …
enum exynos_prng_type { … };
#define EXYNOS_RNG_RESEED_TIME …
#define EXYNOS_RNG_RESEED_BYTES …
#define EXYNOS_RNG_WAIT_RETRIES …
struct exynos_rng_ctx { … };
struct exynos_rng_dev { … };
static struct exynos_rng_dev *exynos_rng_dev;
static u32 exynos_rng_readl(struct exynos_rng_dev *rng, u32 offset)
{ … }
static void exynos_rng_writel(struct exynos_rng_dev *rng, u32 val, u32 offset)
{ … }
static int exynos_rng_set_seed(struct exynos_rng_dev *rng,
const u8 *seed, unsigned int slen)
{ … }
static int exynos_rng_get_random(struct exynos_rng_dev *rng,
u8 *dst, unsigned int dlen,
unsigned int *read)
{ … }
static void exynos_rng_reseed(struct exynos_rng_dev *rng)
{ … }
static int exynos_rng_generate(struct crypto_rng *tfm,
const u8 *src, unsigned int slen,
u8 *dst, unsigned int dlen)
{ … }
static int exynos_rng_seed(struct crypto_rng *tfm, const u8 *seed,
unsigned int slen)
{ … }
static int exynos_rng_kcapi_init(struct crypto_tfm *tfm)
{ … }
static struct rng_alg exynos_rng_alg = …;
static int exynos_rng_probe(struct platform_device *pdev)
{ … }
static void exynos_rng_remove(struct platform_device *pdev)
{ … }
static int __maybe_unused exynos_rng_suspend(struct device *dev)
{ … }
static int __maybe_unused exynos_rng_resume(struct device *dev)
{ … }
static SIMPLE_DEV_PM_OPS(exynos_rng_pm_ops, exynos_rng_suspend,
exynos_rng_resume);
static const struct of_device_id exynos_rng_dt_match[] = …;
MODULE_DEVICE_TABLE(of, exynos_rng_dt_match);
static struct platform_driver exynos_rng_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;