#include <linux/bitfield.h>
#include <linux/types.h>
#include <linux/mutex.h>
#include <linux/delay.h>
#include <linux/slab.h>
#include <linux/gfp.h>
#include <linux/psp.h>
#include <linux/psp-tee.h>
#include "psp-dev.h"
#include "tee-dev.h"
static bool psp_dead;
static int tee_alloc_ring(struct psp_tee_device *tee, int ring_size)
{ … }
static void tee_free_ring(struct psp_tee_device *tee)
{ … }
static
struct tee_init_ring_cmd *tee_alloc_cmd_buffer(struct psp_tee_device *tee)
{ … }
static inline void tee_free_cmd_buffer(struct tee_init_ring_cmd *cmd)
{ … }
static int tee_init_ring(struct psp_tee_device *tee)
{ … }
static void tee_destroy_ring(struct psp_tee_device *tee)
{ … }
int tee_dev_init(struct psp_device *psp)
{ … }
void tee_dev_destroy(struct psp_device *psp)
{ … }
static int tee_submit_cmd(struct psp_tee_device *tee, enum tee_cmd_id cmd_id,
void *buf, size_t len, struct tee_ring_cmd **resp)
{ … }
static int tee_wait_cmd_completion(struct psp_tee_device *tee,
struct tee_ring_cmd *resp,
unsigned int timeout)
{ … }
int psp_tee_process_cmd(enum tee_cmd_id cmd_id, void *buf, size_t len,
u32 *status)
{ … }
EXPORT_SYMBOL(…);
int psp_check_tee_status(void)
{ … }
EXPORT_SYMBOL(…);