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 #ifndef __SYS_H__ 20 #define __SYS_H__ 21 22 #include "hi_type.h" 23 #include "hi_common.h" 24 #include "valg_plat.h" 25 26 #ifdef __cplusplus 27 extern "C" { 28 #endif /* __cplusplus */ 29 30 typedef struct { 31 hi_s32 *ddr_data_buff; 32 hi_s32 buff_len; 33 hi_s32 value_count; 34 } ddr_occupy; 35 36 typedef struct { 37 osal_semaphore_t sem; 38 osal_atomic_t user_ref; 39 hi_u32 state; 40 hi_mpp_sys_config sys_cfg; 41 hi_s32 time_zone; 42 } sys_context; 43 44 typedef struct { 45 struct osal_list_head list; 46 hi_char mmz_name[MAX_MMZ_NAME_LEN]; 47 } sys_mem_node; 48 49 typedef struct { 50 hi_char *mmz_name; 51 } sys_mod_chn_mmz; 52 53 typedef struct { 54 hi_u32 max_dev_cnt; 55 hi_u32 max_chn_cnt; 56 57 sys_mod_chn_mmz *mmz_tbl; 58 } sys_mem_ctx; 59 60 typedef struct { 61 hi_s32 set_value; /* customer value meaning: whether check is ok. */ 62 hi_u32 set_count; /* customer set count */ 63 64 hi_s32 connect_status; /* 0: not ok, 1: ok, other: reserve */ 65 } sys_customer_check; 66 67 #ifdef __cplusplus 68 } 69 #endif /* __cplusplus */ 70 71 #endif