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

// SPDX-License-Identifier: GPL-2.0-only
/*
 * PIC32 RNG driver
 *
 * Joshua Henderson <[email protected]>
 * Copyright (C) 2016 Microchip Technology Inc.  All rights reserved.
 */

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

#define RNGCON
#define TRNGEN
#define TRNGMOD
#define RNGSEED1
#define RNGSEED2
#define RNGRCNT
#define RCNT_MASK

struct pic32_rng {};

/*
 * The TRNG can generate up to 24Mbps. This is a timeout that should be safe
 * enough given the instructions in the loop and that the TRNG may not always
 * be at maximum rate.
 */
#define RNG_TIMEOUT

static int pic32_rng_init(struct hwrng *rng)
{}

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

static void pic32_rng_cleanup(struct hwrng *rng)
{}

static int pic32_rng_probe(struct platform_device *pdev)
{}

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

static struct platform_driver pic32_rng_driver =;

module_platform_driver();

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