linux/drivers/crypto/starfive/jh7110-hash.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Hash function and HMAC support for StarFive driver
 *
 * Copyright (c) 2022 StarFive Technology
 *
 */

#include <crypto/engine.h>
#include <crypto/internal/hash.h>
#include <crypto/scatterwalk.h>
#include "jh7110-cryp.h"
#include <linux/amba/pl080.h>
#include <linux/clk.h>
#include <linux/dma-direct.h>
#include <linux/interrupt.h>
#include <linux/iopoll.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/reset.h>

#define STARFIVE_HASH_REGS_OFFSET
#define STARFIVE_HASH_SHACSR
#define STARFIVE_HASH_SHAWDR
#define STARFIVE_HASH_SHARDR
#define STARFIVE_HASH_SHAWSR
#define STARFIVE_HASH_SHAWLEN3
#define STARFIVE_HASH_SHAWLEN2
#define STARFIVE_HASH_SHAWLEN1
#define STARFIVE_HASH_SHAWLEN0
#define STARFIVE_HASH_SHAWKR
#define STARFIVE_HASH_SHAWKLEN

#define STARFIVE_HASH_BUFLEN
#define STARFIVE_HASH_RESET

static inline int starfive_hash_wait_busy(struct starfive_cryp_dev *cryp)
{}

static inline int starfive_hash_wait_hmac_done(struct starfive_cryp_dev *cryp)
{}

static inline int starfive_hash_wait_key_done(struct starfive_cryp_ctx *ctx)
{}

static int starfive_hash_hmac_key(struct starfive_cryp_ctx *ctx)
{}

static void starfive_hash_start(struct starfive_cryp_dev *cryp)
{}

static void starfive_hash_dma_callback(void *param)
{}

static void starfive_hash_dma_init(struct starfive_cryp_dev *cryp)
{}

static int starfive_hash_dma_xfer(struct starfive_cryp_dev *cryp,
				  struct scatterlist *sg)
{}

static int starfive_hash_copy_hash(struct ahash_request *req)
{}

static void starfive_hash_done_task(struct starfive_cryp_dev *cryp)
{}

static int starfive_hash_one_request(struct crypto_engine *engine, void *areq)
{}

static int starfive_hash_init(struct ahash_request *req)
{}

static int starfive_hash_update(struct ahash_request *req)
{}

static int starfive_hash_final(struct ahash_request *req)
{}

static int starfive_hash_finup(struct ahash_request *req)
{}

static int starfive_hash_digest(struct ahash_request *req)
{}

static int starfive_hash_export(struct ahash_request *req, void *out)
{}

static int starfive_hash_import(struct ahash_request *req, const void *in)
{}

static int starfive_hash_init_tfm(struct crypto_ahash *hash,
				  const char *alg_name,
				  unsigned int mode,
				  bool is_hmac)
{}

static void starfive_hash_exit_tfm(struct crypto_ahash *hash)
{}

static int starfive_hash_long_setkey(struct starfive_cryp_ctx *ctx,
				     const u8 *key, unsigned int keylen,
				     const char *alg_name)
{}

static int starfive_hash_setkey(struct crypto_ahash *hash,
				const u8 *key, unsigned int keylen)
{}

static int starfive_sha224_init_tfm(struct crypto_ahash *hash)
{}

static int starfive_sha256_init_tfm(struct crypto_ahash *hash)
{}

static int starfive_sha384_init_tfm(struct crypto_ahash *hash)
{}

static int starfive_sha512_init_tfm(struct crypto_ahash *hash)
{}

static int starfive_sm3_init_tfm(struct crypto_ahash *hash)
{}

static int starfive_hmac_sha224_init_tfm(struct crypto_ahash *hash)
{}

static int starfive_hmac_sha256_init_tfm(struct crypto_ahash *hash)
{}

static int starfive_hmac_sha384_init_tfm(struct crypto_ahash *hash)
{}

static int starfive_hmac_sha512_init_tfm(struct crypto_ahash *hash)
{}

static int starfive_hmac_sm3_init_tfm(struct crypto_ahash *hash)
{}

static struct ahash_engine_alg algs_sha2_sm3[] =;

int starfive_hash_register_algs(void)
{}

void starfive_hash_unregister_algs(void)
{}