linux/drivers/char/hw_random/mxc-rnga.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * RNG driver for Freescale RNGA
 *
 * Copyright 2008-2009 Freescale Semiconductor, Inc. All Rights Reserved.
 * Author: Alan Carvalho de Assis <[email protected]>
 */

/*
 *
 * This driver is based on other RNG drivers.
 */

#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/hw_random.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>

/* RNGA Registers */
#define RNGA_CONTROL
#define RNGA_STATUS
#define RNGA_ENTROPY
#define RNGA_OUTPUT_FIFO
#define RNGA_MODE
#define RNGA_VERIFICATION_CONTROL
#define RNGA_OSC_CONTROL_COUNTER
#define RNGA_OSC1_COUNTER
#define RNGA_OSC2_COUNTER
#define RNGA_OSC_COUNTER_STATUS

/* RNGA Registers Range */
#define RNG_ADDR_RANGE

/* RNGA Control Register */
#define RNGA_CONTROL_SLEEP
#define RNGA_CONTROL_CLEAR_INT
#define RNGA_CONTROL_MASK_INTS
#define RNGA_CONTROL_HIGH_ASSURANCE
#define RNGA_CONTROL_GO

#define RNGA_STATUS_LEVEL_MASK

/* RNGA Status Register */
#define RNGA_STATUS_OSC_DEAD
#define RNGA_STATUS_SLEEP
#define RNGA_STATUS_ERROR_INT
#define RNGA_STATUS_FIFO_UNDERFLOW
#define RNGA_STATUS_LAST_READ_STATUS
#define RNGA_STATUS_SECURITY_VIOLATION

struct mxc_rng {};

static int mxc_rnga_data_present(struct hwrng *rng, int wait)
{}

static int mxc_rnga_data_read(struct hwrng *rng, u32 * data)
{}

static int mxc_rnga_init(struct hwrng *rng)
{}

static void mxc_rnga_cleanup(struct hwrng *rng)
{}

static int mxc_rnga_probe(struct platform_device *pdev)
{}

static void mxc_rnga_remove(struct platform_device *pdev)
{}

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

static struct platform_driver mxc_rnga_driver =;

module_platform_driver();

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