// SPDX-License-Identifier: GPL-2.0 /* * sun8i-ce-prng.c - hardware cryptographic offloader for * Allwinner H3/A64/H5/H2+/H6/R40 SoC * * Copyright (C) 2015-2020 Corentin Labbe <[email protected]> * * This file handle the PRNG * * You could find a link for the datasheet in Documentation/arch/arm/sunxi.rst */ #include "sun8i-ce.h" #include <linux/dma-mapping.h> #include <linux/pm_runtime.h> #include <crypto/internal/rng.h> int sun8i_ce_prng_init(struct crypto_tfm *tfm) { … } void sun8i_ce_prng_exit(struct crypto_tfm *tfm) { … } int sun8i_ce_prng_seed(struct crypto_rng *tfm, const u8 *seed, unsigned int slen) { … } int sun8i_ce_prng_generate(struct crypto_rng *tfm, const u8 *src, unsigned int slen, u8 *dst, unsigned int dlen) { … }