1
2
3
4
5
6#ifndef _SEQ_EXEC_H
7#define _SEQ_EXEC_H
8
9#define NA 0xff
10#define DEFAULT_PARAM 0
11#define MV_BOARD_TCLK_ERROR 0xffffffff
12
13#define NO_DATA 0xffffffff
14#define MAX_DATA_ARRAY 5
15#define FIRST_CELL 0
16
17
18enum mv_op {
19 WRITE_OP,
20 DELAY_OP,
21 POLL_OP,
22};
23
24
25struct op_params {
26 u32 unit_base_reg;
27 u32 unit_offset;
28 u32 mask;
29 u32 data[MAX_DATA_ARRAY];
30 u8 wait_time;
31 u16 num_of_loops;
32};
33
34
35
36
37
38
39
40
41struct cfg_seq {
42 struct op_params *op_params_ptr;
43 u8 cfg_seq_size;
44 u8 data_arr_idx;
45};
46
47extern struct cfg_seq serdes_seq_db[];
48
49
50
51
52typedef int (*op_execute_func_ptr)(u32 serdes_num, struct op_params *params,
53 u32 data_arr_idx);
54
55
56int write_op_execute(u32 serdes_num, struct op_params *params,
57 u32 data_arr_idx);
58int delay_op_execute(u32 serdes_num, struct op_params *params,
59 u32 data_arr_idx);
60int poll_op_execute(u32 serdes_num, struct op_params *params, u32 data_arr_idx);
61enum mv_op get_cfg_seq_op(struct op_params *params);
62int mv_seq_exec(u32 serdes_num, u32 seq_id);
63
64#endif
65