Merge branch 'i2c/for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa...
[linux-2.6-microblaze.git] / drivers / staging / ccree / ssi_fips.h
1 /*
2  * Copyright (C) 2012-2017 ARM Limited or its affiliates.
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, see <http://www.gnu.org/licenses/>.
15  */
16
17 #ifndef __SSI_FIPS_H__
18 #define __SSI_FIPS_H__
19
20 /*!
21  * @file
22  * @brief This file contains FIPS related defintions and APIs.
23  */
24
25 enum cc_fips_state {
26         CC_FIPS_STATE_NOT_SUPPORTED = 0,
27         CC_FIPS_STATE_SUPPORTED,
28         CC_FIPS_STATE_ERROR,
29         CC_FIPS_STATE_RESERVE32B = S32_MAX
30 };
31
32 enum cc_fips_error {
33         CC_REE_FIPS_ERROR_OK = 0,
34         CC_REE_FIPS_ERROR_GENERAL,
35         CC_REE_FIPS_ERROR_FROM_TEE,
36         CC_REE_FIPS_ERROR_AES_ECB_PUT,
37         CC_REE_FIPS_ERROR_AES_CBC_PUT,
38         CC_REE_FIPS_ERROR_AES_OFB_PUT,
39         CC_REE_FIPS_ERROR_AES_CTR_PUT,
40         CC_REE_FIPS_ERROR_AES_CBC_CTS_PUT,
41         CC_REE_FIPS_ERROR_AES_XTS_PUT,
42         CC_REE_FIPS_ERROR_AES_CMAC_PUT,
43         CC_REE_FIPS_ERROR_AESCCM_PUT,
44         CC_REE_FIPS_ERROR_AESGCM_PUT,
45         CC_REE_FIPS_ERROR_DES_ECB_PUT,
46         CC_REE_FIPS_ERROR_DES_CBC_PUT,
47         CC_REE_FIPS_ERROR_SHA1_PUT,
48         CC_REE_FIPS_ERROR_SHA256_PUT,
49         CC_REE_FIPS_ERROR_SHA512_PUT,
50         CC_REE_FIPS_ERROR_HMAC_SHA1_PUT,
51         CC_REE_FIPS_ERROR_HMAC_SHA256_PUT,
52         CC_REE_FIPS_ERROR_HMAC_SHA512_PUT,
53         CC_REE_FIPS_ERROR_ROM_CHECKSUM,
54         CC_REE_FIPS_ERROR_RESERVE32B = S32_MAX
55 };
56
57 int ssi_fips_get_state(enum cc_fips_state *p_state);
58 int ssi_fips_get_error(enum cc_fips_error *p_err);
59
60 #endif  /*__SSI_FIPS_H__*/
61