#include "aspeed-hace.h"
#include <crypto/des.h>
#include <crypto/engine.h>
#include <crypto/internal/des.h>
#include <crypto/internal/skcipher.h>
#include <linux/dma-mapping.h>
#include <linux/err.h>
#include <linux/io.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/scatterlist.h>
#include <linux/string.h>
#ifdef CONFIG_CRYPTO_DEV_ASPEED_HACE_CRYPTO_DEBUG
#define CIPHER_DBG …
#else
#define CIPHER_DBG(h, fmt, ...) …
#endif
static int aspeed_crypto_do_fallback(struct skcipher_request *areq)
{ … }
static bool aspeed_crypto_need_fallback(struct skcipher_request *areq)
{ … }
static int aspeed_hace_crypto_handle_queue(struct aspeed_hace_dev *hace_dev,
struct skcipher_request *req)
{ … }
static int aspeed_crypto_do_request(struct crypto_engine *engine, void *areq)
{ … }
static int aspeed_sk_complete(struct aspeed_hace_dev *hace_dev, int err)
{ … }
static int aspeed_sk_transfer_sg(struct aspeed_hace_dev *hace_dev)
{ … }
static int aspeed_sk_transfer(struct aspeed_hace_dev *hace_dev)
{ … }
static int aspeed_sk_start(struct aspeed_hace_dev *hace_dev)
{ … }
static int aspeed_sk_start_sg(struct aspeed_hace_dev *hace_dev)
{ … }
static int aspeed_hace_skcipher_trigger(struct aspeed_hace_dev *hace_dev)
{ … }
static int aspeed_des_crypt(struct skcipher_request *req, u32 cmd)
{ … }
static int aspeed_des_setkey(struct crypto_skcipher *cipher, const u8 *key,
unsigned int keylen)
{ … }
static int aspeed_tdes_ctr_decrypt(struct skcipher_request *req)
{ … }
static int aspeed_tdes_ctr_encrypt(struct skcipher_request *req)
{ … }
static int aspeed_tdes_cbc_decrypt(struct skcipher_request *req)
{ … }
static int aspeed_tdes_cbc_encrypt(struct skcipher_request *req)
{ … }
static int aspeed_tdes_ecb_decrypt(struct skcipher_request *req)
{ … }
static int aspeed_tdes_ecb_encrypt(struct skcipher_request *req)
{ … }
static int aspeed_des_ctr_decrypt(struct skcipher_request *req)
{ … }
static int aspeed_des_ctr_encrypt(struct skcipher_request *req)
{ … }
static int aspeed_des_cbc_decrypt(struct skcipher_request *req)
{ … }
static int aspeed_des_cbc_encrypt(struct skcipher_request *req)
{ … }
static int aspeed_des_ecb_decrypt(struct skcipher_request *req)
{ … }
static int aspeed_des_ecb_encrypt(struct skcipher_request *req)
{ … }
static int aspeed_aes_crypt(struct skcipher_request *req, u32 cmd)
{ … }
static int aspeed_aes_setkey(struct crypto_skcipher *cipher, const u8 *key,
unsigned int keylen)
{ … }
static int aspeed_aes_ctr_decrypt(struct skcipher_request *req)
{ … }
static int aspeed_aes_ctr_encrypt(struct skcipher_request *req)
{ … }
static int aspeed_aes_cbc_decrypt(struct skcipher_request *req)
{ … }
static int aspeed_aes_cbc_encrypt(struct skcipher_request *req)
{ … }
static int aspeed_aes_ecb_decrypt(struct skcipher_request *req)
{ … }
static int aspeed_aes_ecb_encrypt(struct skcipher_request *req)
{ … }
static int aspeed_crypto_cra_init(struct crypto_skcipher *tfm)
{ … }
static void aspeed_crypto_cra_exit(struct crypto_skcipher *tfm)
{ … }
static struct aspeed_hace_alg aspeed_crypto_algs[] = …;
static struct aspeed_hace_alg aspeed_crypto_algs_g6[] = …;
void aspeed_unregister_hace_crypto_algs(struct aspeed_hace_dev *hace_dev)
{ … }
void aspeed_register_hace_crypto_algs(struct aspeed_hace_dev *hace_dev)
{ … }