]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame_incremental - drivers/staging/ccree/ssi_fips.c
Merge tag 'renesas-fixes2-for-v4.13' of https://git.kernel.org/pub/scm/linux/kernel...
[mirror_ubuntu-bionic-kernel.git] / drivers / staging / ccree / ssi_fips.c
... / ...
CommitLineData
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/**************************************************************
18 * This file defines the driver FIPS APIs *
19 **************************************************************/
20
21#include <linux/module.h>
22#include "ssi_fips.h"
23
24extern int ssi_fips_ext_get_state(enum cc_fips_state_t *p_state);
25extern int ssi_fips_ext_get_error(enum cc_fips_error *p_err);
26
27/*
28 * This function returns the REE FIPS state.
29 * It should be called by kernel module.
30 */
31int ssi_fips_get_state(enum cc_fips_state_t *p_state)
32{
33 int rc = 0;
34
35 if (!p_state)
36 return -EINVAL;
37
38 rc = ssi_fips_ext_get_state(p_state);
39
40 return rc;
41}
42
43EXPORT_SYMBOL(ssi_fips_get_state);
44
45/*
46 * This function returns the REE FIPS error.
47 * It should be called by kernel module.
48 */
49int ssi_fips_get_error(enum cc_fips_error *p_err)
50{
51 int rc = 0;
52
53 if (!p_err)
54 return -EINVAL;
55
56 rc = ssi_fips_ext_get_error(p_err);
57
58 return rc;
59}
60
61EXPORT_SYMBOL(ssi_fips_get_error);