1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Copyright (C) Marvell International Ltd. and its affiliates
10 #define DEFAULT_PARAM 0
11 #define MV_BOARD_TCLK_ERROR 0xffffffff
13 #define NO_DATA 0xffffffff
14 #define MAX_DATA_ARRAY 5
24 /* Operation parameters */
29 u32 data[MAX_DATA_ARRAY]; /* data array */
30 u8 wait_time; /* msec */
31 u16 num_of_loops; /* for polling only */
35 * Sequence parameters. Each sequence contains:
37 * 2. Sequence size (total amount of operations during the sequence)
38 * 3. a series of operations. operations can be write, poll or delay
39 * 4. index in the data array (the entry where the relevant data sits)
42 struct op_params *op_params_ptr;
47 extern struct cfg_seq serdes_seq_db[];
50 * A generic function type for executing an operation (write, poll or delay)
52 typedef int (*op_execute_func_ptr)(u32 serdes_num, struct op_params *params,
55 /* Specific functions for executing each operation */
56 int write_op_execute(u32 serdes_num, struct op_params *params,
58 int delay_op_execute(u32 serdes_num, struct op_params *params,
60 int poll_op_execute(u32 serdes_num, struct op_params *params, u32 data_arr_idx);
61 enum mv_op get_cfg_seq_op(struct op_params *params);
62 int mv_seq_exec(u32 serdes_num, u32 seq_id);
64 #endif /*_SEQ_EXEC_H*/