Lines Matching refs:subop

2176 	struct nand_subop subop;  member
2250 unsigned int instr_offset = ctx->subop.first_instr_start_off; in nand_op_parser_match_pat()
2252 const struct nand_op_instr *instr = ctx->subop.instrs; in nand_op_parser_match_pat()
2313 ctx->subop.ninstrs = ninstrs; in nand_op_parser_match_pat()
2314 ctx->subop.last_instr_end_off = instr_offset; in nand_op_parser_match_pat()
2326 pr_debug("executing subop (CS%d):\n", ctx->subop.cs); in nand_op_parser_trace()
2331 if (instr == &ctx->subop.instrs[0]) in nand_op_parser_trace()
2336 if (instr == &ctx->subop.instrs[ctx->subop.ninstrs - 1]) in nand_op_parser_trace()
2350 if (a->subop.ninstrs < b->subop.ninstrs) in nand_op_parser_cmp_ctx()
2352 else if (a->subop.ninstrs > b->subop.ninstrs) in nand_op_parser_cmp_ctx()
2355 if (a->subop.last_instr_end_off < b->subop.last_instr_end_off) in nand_op_parser_cmp_ctx()
2357 else if (a->subop.last_instr_end_off > b->subop.last_instr_end_off) in nand_op_parser_cmp_ctx()
2390 .subop.cs = op->cs, in nand_op_parser_exec_op()
2391 .subop.instrs = op->instrs, in nand_op_parser_exec_op()
2397 while (ctx.subop.instrs < op->instrs + op->ninstrs) { in nand_op_parser_exec_op()
2427 ret = pattern->exec(chip, &ctx.subop); in nand_op_parser_exec_op()
2436 ctx.subop.instrs = ctx.subop.instrs + ctx.subop.ninstrs; in nand_op_parser_exec_op()
2437 if (ctx.subop.last_instr_end_off) in nand_op_parser_exec_op()
2438 ctx.subop.instrs -= 1; in nand_op_parser_exec_op()
2440 ctx.subop.first_instr_start_off = ctx.subop.last_instr_end_off; in nand_op_parser_exec_op()
2453 static bool nand_subop_instr_is_valid(const struct nand_subop *subop, in nand_subop_instr_is_valid() argument
2456 return subop && instr_idx < subop->ninstrs; in nand_subop_instr_is_valid()
2459 static unsigned int nand_subop_get_start_off(const struct nand_subop *subop, in nand_subop_get_start_off() argument
2465 return subop->first_instr_start_off; in nand_subop_get_start_off()
2479 unsigned int nand_subop_get_addr_start_off(const struct nand_subop *subop, in nand_subop_get_addr_start_off() argument
2482 if (WARN_ON(!nand_subop_instr_is_valid(subop, instr_idx) || in nand_subop_get_addr_start_off()
2483 subop->instrs[instr_idx].type != NAND_OP_ADDR_INSTR)) in nand_subop_get_addr_start_off()
2486 return nand_subop_get_start_off(subop, instr_idx); in nand_subop_get_addr_start_off()
2501 unsigned int nand_subop_get_num_addr_cyc(const struct nand_subop *subop, in nand_subop_get_num_addr_cyc() argument
2506 if (WARN_ON(!nand_subop_instr_is_valid(subop, instr_idx) || in nand_subop_get_num_addr_cyc()
2507 subop->instrs[instr_idx].type != NAND_OP_ADDR_INSTR)) in nand_subop_get_num_addr_cyc()
2510 start_off = nand_subop_get_addr_start_off(subop, instr_idx); in nand_subop_get_num_addr_cyc()
2512 if (instr_idx == subop->ninstrs - 1 && in nand_subop_get_num_addr_cyc()
2513 subop->last_instr_end_off) in nand_subop_get_num_addr_cyc()
2514 end_off = subop->last_instr_end_off; in nand_subop_get_num_addr_cyc()
2516 end_off = subop->instrs[instr_idx].ctx.addr.naddrs; in nand_subop_get_num_addr_cyc()
2533 unsigned int nand_subop_get_data_start_off(const struct nand_subop *subop, in nand_subop_get_data_start_off() argument
2536 if (WARN_ON(!nand_subop_instr_is_valid(subop, instr_idx) || in nand_subop_get_data_start_off()
2537 !nand_instr_is_data(&subop->instrs[instr_idx]))) in nand_subop_get_data_start_off()
2540 return nand_subop_get_start_off(subop, instr_idx); in nand_subop_get_data_start_off()
2555 unsigned int nand_subop_get_data_len(const struct nand_subop *subop, in nand_subop_get_data_len() argument
2560 if (WARN_ON(!nand_subop_instr_is_valid(subop, instr_idx) || in nand_subop_get_data_len()
2561 !nand_instr_is_data(&subop->instrs[instr_idx]))) in nand_subop_get_data_len()
2564 start_off = nand_subop_get_data_start_off(subop, instr_idx); in nand_subop_get_data_len()
2566 if (instr_idx == subop->ninstrs - 1 && in nand_subop_get_data_len()
2567 subop->last_instr_end_off) in nand_subop_get_data_len()
2568 end_off = subop->last_instr_end_off; in nand_subop_get_data_len()
2570 end_off = subop->instrs[instr_idx].ctx.data.len; in nand_subop_get_data_len()