blob: 65b099d0afe7e167d7a334e135d2f373bf7e5e5f [file] [log] [blame]
developer02e65912023-08-17 16:33:10 +08001/* adapter_driver97_pec_init.c
2 *
3 * Adapter top level module, Security-IP-97 driver's entry point.
4 */
5
6/*****************************************************************************
7* Copyright (c) 2012-2020 by Rambus, Inc. and/or its subsidiaries.
8*
9* This program is free software: you can redistribute it and/or modify
10* it under the terms of the GNU General Public License as published by
11* the Free Software Foundation, either version 2 of the License, or
12* any later version.
13*
14* This program is distributed in the hope that it will be useful,
15* but WITHOUT ANY WARRANTY; without even the implied warranty of
16* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17* GNU General Public License for more details.
18*
19* You should have received a copy of the GNU General Public License
20* along with this program. If not, see <http://www.gnu.org/licenses/>.
21*****************************************************************************/
22
23/*----------------------------------------------------------------------------
24 * This module implements (provides) the following interface(s):
25 */
26
27#include "api_driver97_pec_init.h" // Driver Init API
28
29
30/*----------------------------------------------------------------------------
31 * This module uses (requires) the following interface(s):
32 */
33
34// Top-level Adapter configuration
35#include "cs_adapter.h" // ADAPTER_DRIVER_NAME
36
37// Adapter Initialization API
38#include "adapter_init.h" // Adapter_*
39
40// Logging API
41#include "log.h" // LOG_INFO
42
43
44/*----------------------------------------------------------------------------
45 * DrivDriver97_PEC_Init
46 */
47int
48Driver97_PEC_Init(void)
49{
50 LOG_INFO("\n\t Driver97_PEC_Init \n");
51
52 LOG_INFO("%s driver: initializing\n", ADAPTER_DRIVER_NAME);
53
54 Adapter_Report_Build_Params();
55
56 if (!Adapter_Init())
57 {
58 return -1;
59 }
60
61 LOG_INFO("\n\t Driver97_PEC_Init done \n");
62
63 return 0; // success
64}
65
66
67/*----------------------------------------------------------------------------
68 * Driver97_PEC_Exit
69 */
70void
71Driver97_PEC_Exit(void)
72{
73 LOG_INFO("\n\t Driver97_PEC_Exit \n");
74
75 LOG_INFO("%s driver: exit\n", ADAPTER_DRIVER_NAME);
76
77 Adapter_UnInit();
78
79 LOG_INFO("\n\t Driver97_PEC_Exit done \n");
80}
81
82
83#include "adapter_driver97_pec_init_ext.h"
84
85
86/* end of file adapter_driver97_pec_init.c */