blob: be7303629bc1488b8e2a663212ea93128a573346 [file] [log] [blame]
#ifndef _ASR_BCM_OPTEE_H_
#define _ASR_BCM_OPTEE_H_
#include <linux/crypto.h>
#include <crypto/algapi.h>
#include <linux/interrupt.h>
#include <linux/mutex.h>
#include <linux/miscdevice.h>
#include "../bcm/asr-sha.h"
#include "../bcm/asr-cipher.h"
struct teec_uuid {
uint32_t timeLow;
uint16_t timeMid;
uint16_t timeHiAndVersion;
uint8_t clockSeqAndNode[8];
};
struct asrbcm_tee_context {
struct tee_context *tee_ctx;
int session;
};
struct asr_bcm_dev {
struct device *dev;
struct asr_bcm_sha asr_sha;
struct asr_bcm_cipher asr_cipher;
};
struct asr_bcm_ops {
int (*dev_get)(struct asr_bcm_dev *);
int (*dev_put)(struct asr_bcm_dev *);
};
int asrbcm_optee_open_ta(struct asrbcm_tee_context *ctx, struct teec_uuid *uuid);
int asrbcm_optee_close_ta(struct asrbcm_tee_context *ctx);
int asr_bcm_sha_register(struct asr_bcm_dev *bcm_dd);
int asr_bcm_sha_unregister(struct asr_bcm_dev *bcm_dd);
int asr_bcm_cipher_register(struct asr_bcm_dev *bcm_dd);
int asr_bcm_cipher_unregister(struct asr_bcm_dev *bcm_dd);
#endif