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