Lines Matching refs:chan
21 static int mv_xor_cmd_set(u32 chan, int command);
22 static int mv_xor_ctrl_set(u32 chan, u32 xor_ctrl);
141 static int mv_xor_ctrl_set(u32 chan, u32 xor_ctrl) in mv_xor_ctrl_set() argument
146 val = reg_read(XOR_CONFIG_REG(XOR_UNIT(chan), XOR_CHAN(chan))) in mv_xor_ctrl_set()
150 reg_write(XOR_CONFIG_REG(XOR_UNIT(chan), XOR_CHAN(chan)), xor_ctrl); in mv_xor_ctrl_set()
155 int mv_xor_mem_init(u32 chan, u32 start_ptr, unsigned long long block_size, in mv_xor_mem_init() argument
161 if (chan >= MV_XOR_MAX_CHAN) in mv_xor_mem_init()
164 if (MV_ACTIVE == mv_xor_state_get(chan)) in mv_xor_mem_init()
172 tmp = reg_read(XOR_CONFIG_REG(XOR_UNIT(chan), XOR_CHAN(chan))); in mv_xor_mem_init()
175 reg_write(XOR_CONFIG_REG(XOR_UNIT(chan), XOR_CHAN(chan)), tmp); in mv_xor_mem_init()
181 reg_write(XOR_DST_PTR_REG(XOR_UNIT(chan), XOR_CHAN(chan)), start_ptr); in mv_xor_mem_init()
187 reg_write(XOR_BLOCK_SIZE_REG(XOR_UNIT(chan), XOR_CHAN(chan)), in mv_xor_mem_init()
194 reg_write(XOR_INIT_VAL_LOW_REG(XOR_UNIT(chan)), init_val_low); in mv_xor_mem_init()
200 reg_write(XOR_INIT_VAL_HIGH_REG(XOR_UNIT(chan)), init_val_high); in mv_xor_mem_init()
203 reg_bit_set(XOR_ACTIVATION_REG(XOR_UNIT(chan), XOR_CHAN(chan)), in mv_xor_mem_init()
241 int mv_xor_transfer(u32 chan, int xor_type, u32 xor_chain_ptr) in mv_xor_transfer() argument
246 if (chan >= MV_XOR_MAX_CHAN) { in mv_xor_transfer()
247 debug("%s: ERR. Invalid chan num %d\n", __func__, chan); in mv_xor_transfer()
251 if (MV_ACTIVE == mv_xor_state_get(chan)) { in mv_xor_transfer()
262 tmp = reg_read(XOR_CONFIG_REG(XOR_UNIT(chan), XOR_CHAN(chan))); in mv_xor_transfer()
304 reg_write(XOR_CONFIG_REG(XOR_UNIT(chan), XOR_CHAN(chan)), tmp); in mv_xor_transfer()
310 reg_write(XOR_NEXT_DESC_PTR_REG(XOR_UNIT(chan), XOR_CHAN(chan)), in mv_xor_transfer()
314 reg_bit_set(XOR_ACTIVATION_REG(XOR_UNIT(chan), XOR_CHAN(chan)), in mv_xor_transfer()
341 int mv_xor_state_get(u32 chan) in mv_xor_state_get() argument
346 if (chan >= MV_XOR_MAX_CHAN) { in mv_xor_state_get()
347 debug("%s: ERR. Invalid chan num %d\n", __func__, chan); in mv_xor_state_get()
352 state = reg_read(XOR_ACTIVATION_REG(XOR_UNIT(chan), XOR_CHAN(chan))); in mv_xor_state_get()
390 static int mv_xor_cmd_set(u32 chan, int command) in mv_xor_cmd_set() argument
395 if (chan >= MV_XOR_MAX_CHAN) { in mv_xor_cmd_set()
396 debug("%s: ERR. Invalid chan num %d\n", __func__, chan); in mv_xor_cmd_set()
401 state = mv_xor_state_get(chan); in mv_xor_cmd_set()
405 reg_bit_set(XOR_ACTIVATION_REG(XOR_UNIT(chan), XOR_CHAN(chan)), in mv_xor_cmd_set()
411 reg_bit_set(XOR_ACTIVATION_REG(XOR_UNIT(chan), XOR_CHAN(chan)), in mv_xor_cmd_set()
417 reg_bit_set(XOR_ACTIVATION_REG(XOR_UNIT(chan), XOR_CHAN(chan)), in mv_xor_cmd_set()
423 reg_bit_set(XOR_ACTIVATION_REG(XOR_UNIT(chan), XOR_CHAN(chan)), in mv_xor_cmd_set()