linux/drivers/char/hw_random/ingenic-trng.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Ingenic True Random Number Generator driver
 * Copyright (c) 2019 漆鹏振 (Qi Pengzhen) <[email protected]>
 * Copyright (c) 2020 周琰杰 (Zhou Yanjie) <[email protected]>
 */

#include <linux/clk.h>
#include <linux/err.h>
#include <linux/kernel.h>
#include <linux/hw_random.h>
#include <linux/io.h>
#include <linux/iopoll.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/slab.h>

/* DTRNG register offsets */
#define TRNG_REG_CFG_OFFSET
#define TRNG_REG_RANDOMNUM_OFFSET
#define TRNG_REG_STATUS_OFFSET

/* bits within the CFG register */
#define CFG_GEN_EN

/* bits within the STATUS register */
#define STATUS_RANDOM_RDY

struct ingenic_trng {};

static int ingenic_trng_init(struct hwrng *rng)
{}

static void ingenic_trng_cleanup(struct hwrng *rng)
{}

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

static int ingenic_trng_probe(struct platform_device *pdev)
{}

static const struct of_device_id ingenic_trng_of_match[] =;
MODULE_DEVICE_TABLE(of, ingenic_trng_of_match);

static struct platform_driver ingenic_trng_driver =;

module_platform_driver();

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