• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2021 HiSilicon (Shanghai) Technologies CO., LIMITED.
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License
6  * as published by the Free Software Foundation; either version 2
7  * of the License, or (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
17  */
18 
19 #include "tde_osr.h"
20 #ifndef HI_BUILD_IN_BOOT
21 #include "tde_osilist.h"
22 #include "hi_type.h"
23 #include "tde_ioctl.h"
24 #include "tde_handle.h"
25 #include "tde_hal.h"
26 #include "tde_init.h"
27 
28 #define mkstr(exp)        #exp
29 #define mkmarcotostr(exp) mkstr(exp)
30 
tde_osr_deinit(void)31 void tde_osr_deinit(void)
32 {
33     tde_osi_list_term();
34     tde_hal_release();
35     return;
36 }
37 
tde_drv_mod_init(hi_void)38 hi_s32 tde_drv_mod_init(hi_void)
39 {
40 #ifndef HI_MCE_SUPPORT
41     hi_s32 ret = tde_init_module_k();
42     if (ret != HI_SUCCESS) {
43         return HI_FAILURE;
44     }
45 #endif
46 
47     return HI_SUCCESS;
48 }
49 
tde_drv_mod_exit(hi_void)50 hi_void tde_drv_mod_exit(hi_void)
51 {
52 #ifndef HI_MCE_SUPPORT
53     tde_cleanup_module_k();
54 #endif
55 }
56 
57 #ifndef __RTOS__
58 #ifndef HI_ADVCA_FUNCTION_RELEASE
59 MODULE_AUTHOR(AUTHOR);
60 MODULE_DESCRIPTION(DESCRIPTION);
61 MODULE_VERSION(TDE_VERSION);
62 MODULE_LICENSE("GPL");
63 #else
64 MODULE_AUTHOR("");
65 MODULE_DESCRIPTION("");
66 MODULE_VERSION("");
67 MODULE_LICENSE("");
68 #endif
69 #endif /* __RTOS__ */
70 
71 #endif
72