tzh
2024-08-22 c7d0944258c7d0943aa7b2211498fd612971ce27
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/* secure storage driver for sunxi platform
 *
 * Copyright (C) 2014 Allwinner Ltd.
 *
 * Author:
 *    Ryan Chen <yanjianbo@allwinnertech.com>
 * This software is licensed under the terms of the GNU General Public
 * License version 2, as published by the Free Software Foundation, and
 * may be copied, distributed, and modified under those terms.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 */
 
#ifndef _SST_STORAGE_H_
#define _SST_STORAGE_H_
 
struct sst_storage_data{
   int32_t id;
   uint32_t buf;
   uint32_t len;
   uint32_t offset;
};
 
struct fcrypt {
   struct sst_storage_data key_store;
   struct work_struct work;
   struct completion work_end;
   struct mutex mutex;
   unsigned char *temp_data;
   unsigned int cmd;
   unsigned int ret;
};
 
typedef struct fcrypt fcry_st;
typedef struct fcrypt *fcry_pt;
 
#define SECBLK_READ                            _IO('V', 20)
#define SECBLK_WRITE                        _IO('V', 21)
#define SECBLK_IOCTL                        _IO('V', 22)
 
struct secblc_op_t{
   int item;
   unsigned char *buf;
   unsigned int len;
};
 
#endif