linux/drivers/crypto/caam/caamrng.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * caam - Freescale FSL CAAM support for hw_random
 *
 * Copyright 2011 Freescale Semiconductor, Inc.
 * Copyright 2018-2019, 2023 NXP
 *
 * Based on caamalg.c crypto API driver.
 *
 */

#include <linux/hw_random.h>
#include <linux/completion.h>
#include <linux/atomic.h>
#include <linux/dma-mapping.h>
#include <linux/kernel.h>
#include <linux/kfifo.h>

#include "compat.h"

#include "regs.h"
#include "intern.h"
#include "desc_constr.h"
#include "jr.h"
#include "error.h"

#define CAAM_RNG_MAX_FIFO_STORE_SIZE

/*
 * Length of used descriptors, see caam_init_desc()
 */
#define CAAM_RNG_DESC_LEN

/* rng per-device context */
struct caam_rng_ctx {};

struct caam_rng_job_ctx {};

static struct caam_rng_ctx *to_caam_rng_ctx(struct hwrng *r)
{}

static void caam_rng_done(struct device *jrdev, u32 *desc, u32 err,
			  void *context)
{}

static u32 *caam_init_desc(u32 *desc, dma_addr_t dst_dma)
{}

static int caam_rng_read_one(struct device *jrdev,
			     void *dst, int len,
			     void *desc,
			     struct completion *done)
{}

static void caam_rng_fill_async(struct caam_rng_ctx *ctx)
{}

static void caam_rng_worker(struct work_struct *work)
{}

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

static void caam_cleanup(struct hwrng *rng)
{}

#ifdef CONFIG_CRYPTO_DEV_FSL_CAAM_RNG_TEST
static inline void test_len(struct hwrng *rng, size_t len, bool wait)
{}

static inline void test_mode_once(struct hwrng *rng, bool wait)
{}

static void self_test(struct hwrng *rng)
{}
#endif

static int caam_init(struct hwrng *rng)
{}

int caam_rng_init(struct device *ctrldev);

void caam_rng_exit(struct device *ctrldev)
{}

int caam_rng_init(struct device *ctrldev)
{}