linux/drivers/crypto/starfive/jh7110-cryp.h

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __STARFIVE_STR_H__
#define __STARFIVE_STR_H__

#include <crypto/aes.h>
#include <crypto/hash.h>
#include <crypto/scatterwalk.h>
#include <crypto/sha2.h>
#include <crypto/sm3.h>
#include <linux/delay.h>
#include <linux/dma-mapping.h>
#include <linux/dmaengine.h>
#include <linux/interrupt.h>

#define STARFIVE_ALG_CR_OFFSET
#define STARFIVE_ALG_FIFO_OFFSET
#define STARFIVE_IE_MASK_OFFSET
#define STARFIVE_IE_FLAG_OFFSET
#define STARFIVE_DMA_IN_LEN_OFFSET
#define STARFIVE_DMA_OUT_LEN_OFFSET

#define STARFIVE_IE_MASK_AES_DONE
#define STARFIVE_IE_MASK_HASH_DONE
#define STARFIVE_IE_MASK_PKA_DONE
#define STARFIVE_IE_FLAG_AES_DONE
#define STARFIVE_IE_FLAG_HASH_DONE
#define STARFIVE_IE_FLAG_PKA_DONE

#define STARFIVE_MSG_BUFFER_SIZE
#define MAX_KEY_SIZE
#define STARFIVE_AES_IV_LEN
#define STARFIVE_AES_CTR_LEN
#define STARFIVE_RSA_MAX_KEYSZ

starfive_aes_csr;

starfive_hash_csr;

starfive_pka_cacr;

starfive_pka_casr;

struct starfive_rsa_key {};

starfive_alg_cr;

struct starfive_cryp_ctx {};

struct starfive_cryp_dev {};

struct starfive_cryp_request_ctx {};

struct starfive_cryp_dev *starfive_cryp_find_dev(struct starfive_cryp_ctx *ctx);

int starfive_hash_register_algs(void);
void starfive_hash_unregister_algs(void);

int starfive_rsa_register_algs(void);
void starfive_rsa_unregister_algs(void);

int starfive_aes_register_algs(void);
void starfive_aes_unregister_algs(void);
#endif