linux/drivers/char/hw_random/bcm2835-rng.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (c) 2010-2012 Broadcom. All rights reserved.
 * Copyright (c) 2013 Lubomir Rintel
 */

#include <linux/hw_random.h>
#include <linux/io.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/printk.h>
#include <linux/clk.h>
#include <linux/reset.h>

#define RNG_CTRL
#define RNG_STATUS
#define RNG_DATA
#define RNG_INT_MASK

/* enable rng */
#define RNG_RBGEN

/* the initial numbers generated are "less random" so will be discarded */
#define RNG_WARMUP_COUNT

#define RNG_INT_OFF

struct bcm2835_rng_priv {};

static inline struct bcm2835_rng_priv *to_rng_priv(struct hwrng *rng)
{}

static inline u32 rng_readl(struct bcm2835_rng_priv *priv, u32 offset)
{}

static inline void rng_writel(struct bcm2835_rng_priv *priv, u32 val,
			      u32 offset)
{}

static int bcm2835_rng_read(struct hwrng *rng, void *buf, size_t max,
			       bool wait)
{}

static int bcm2835_rng_init(struct hwrng *rng)
{}

static void bcm2835_rng_cleanup(struct hwrng *rng)
{}

struct bcm2835_rng_of_data {};

static const struct bcm2835_rng_of_data nsp_rng_of_data =;

static const struct of_device_id bcm2835_rng_of_match[] =;

static int bcm2835_rng_probe(struct platform_device *pdev)
{}

MODULE_DEVICE_TABLE(of, bcm2835_rng_of_match);

static const struct platform_device_id bcm2835_rng_devtype[] =;
MODULE_DEVICE_TABLE(platform, bcm2835_rng_devtype);

static struct platform_driver bcm2835_rng_driver =;
module_platform_driver();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();