• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2020 HiSilicon (Shanghai) Technologies CO., LIMITED.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef __HI_SAL_NV_H__
17 #define __HI_SAL_NV_H__
18 
19 #define  HI_NV_SYS_RST_TIMES        0x40
20 #define  HI_NV_SYS_RST_CFG_ID       0x41
21 #define  HI_NV_SYS_UART_PORT_ID     0x42
22 
23 typedef struct {
24     hi_u32 rst_times;
25     hi_u32 enable_save;
26 } hi_sys_reset_times;
27 
28 typedef struct {
29     hi_u8 enable_rst;
30     hi_u8 rsv[3];  /* 3 bytes reserved */
31     hi_u32 secure_begin_time;
32     hi_u32 secure_end_time;
33     hi_u32 max_time_usr0;
34     hi_u32 max_time_usr1;
35 } hi_nv_reset_cfg_id;
36 
37 typedef enum {
38     UART_FUNC_AT,
39     UART_FUNC_SHELL,
40     UART_FUNC_DIAG,
41     UART_FUNC_SIGMA,
42     UART_FUNC_MAX,
43 } hi_uart_func_idx;
44 
45 /* uart port allocation */
46 typedef struct {
47     hi_u8 uart_port_at;
48     hi_u8 uart_port_debug;
49     hi_u8 uart_port_sigma;
50     hi_u8 uart_port_reserved;
51 } hi_nv_uart_port_alloc;
52 
53 #endif /* __HI_SAL_NV_H__ */
54 
55