Lines Matching refs:subop

2280 	struct nand_subop subop;  member
2354 unsigned int instr_offset = ctx->subop.first_instr_start_off; in nand_op_parser_match_pat()
2356 const struct nand_op_instr *instr = ctx->subop.instrs; in nand_op_parser_match_pat()
2417 ctx->subop.ninstrs = ninstrs; in nand_op_parser_match_pat()
2418 ctx->subop.last_instr_end_off = instr_offset; in nand_op_parser_match_pat()
2430 pr_debug("executing subop (CS%d):\n", ctx->subop.cs); in nand_op_parser_trace()
2435 if (instr == &ctx->subop.instrs[0]) in nand_op_parser_trace()
2440 if (instr == &ctx->subop.instrs[ctx->subop.ninstrs - 1]) in nand_op_parser_trace()
2454 if (a->subop.ninstrs < b->subop.ninstrs) in nand_op_parser_cmp_ctx()
2456 else if (a->subop.ninstrs > b->subop.ninstrs) in nand_op_parser_cmp_ctx()
2459 if (a->subop.last_instr_end_off < b->subop.last_instr_end_off) in nand_op_parser_cmp_ctx()
2461 else if (a->subop.last_instr_end_off > b->subop.last_instr_end_off) in nand_op_parser_cmp_ctx()
2494 .subop.cs = op->cs, in nand_op_parser_exec_op()
2495 .subop.instrs = op->instrs, in nand_op_parser_exec_op()
2501 while (ctx.subop.instrs < op->instrs + op->ninstrs) { in nand_op_parser_exec_op()
2531 ret = pattern->exec(chip, &ctx.subop); in nand_op_parser_exec_op()
2540 ctx.subop.instrs = ctx.subop.instrs + ctx.subop.ninstrs; in nand_op_parser_exec_op()
2541 if (ctx.subop.last_instr_end_off) in nand_op_parser_exec_op()
2542 ctx.subop.instrs -= 1; in nand_op_parser_exec_op()
2544 ctx.subop.first_instr_start_off = ctx.subop.last_instr_end_off; in nand_op_parser_exec_op()
2557 static bool nand_subop_instr_is_valid(const struct nand_subop *subop, in nand_subop_instr_is_valid() argument
2560 return subop && instr_idx < subop->ninstrs; in nand_subop_instr_is_valid()
2563 static unsigned int nand_subop_get_start_off(const struct nand_subop *subop, in nand_subop_get_start_off() argument
2569 return subop->first_instr_start_off; in nand_subop_get_start_off()
2583 unsigned int nand_subop_get_addr_start_off(const struct nand_subop *subop, in nand_subop_get_addr_start_off() argument
2586 if (WARN_ON(!nand_subop_instr_is_valid(subop, instr_idx) || in nand_subop_get_addr_start_off()
2587 subop->instrs[instr_idx].type != NAND_OP_ADDR_INSTR)) in nand_subop_get_addr_start_off()
2590 return nand_subop_get_start_off(subop, instr_idx); in nand_subop_get_addr_start_off()
2605 unsigned int nand_subop_get_num_addr_cyc(const struct nand_subop *subop, in nand_subop_get_num_addr_cyc() argument
2610 if (WARN_ON(!nand_subop_instr_is_valid(subop, instr_idx) || in nand_subop_get_num_addr_cyc()
2611 subop->instrs[instr_idx].type != NAND_OP_ADDR_INSTR)) in nand_subop_get_num_addr_cyc()
2614 start_off = nand_subop_get_addr_start_off(subop, instr_idx); in nand_subop_get_num_addr_cyc()
2616 if (instr_idx == subop->ninstrs - 1 && in nand_subop_get_num_addr_cyc()
2617 subop->last_instr_end_off) in nand_subop_get_num_addr_cyc()
2618 end_off = subop->last_instr_end_off; in nand_subop_get_num_addr_cyc()
2620 end_off = subop->instrs[instr_idx].ctx.addr.naddrs; in nand_subop_get_num_addr_cyc()
2637 unsigned int nand_subop_get_data_start_off(const struct nand_subop *subop, in nand_subop_get_data_start_off() argument
2640 if (WARN_ON(!nand_subop_instr_is_valid(subop, instr_idx) || in nand_subop_get_data_start_off()
2641 !nand_instr_is_data(&subop->instrs[instr_idx]))) in nand_subop_get_data_start_off()
2644 return nand_subop_get_start_off(subop, instr_idx); in nand_subop_get_data_start_off()
2659 unsigned int nand_subop_get_data_len(const struct nand_subop *subop, in nand_subop_get_data_len() argument
2664 if (WARN_ON(!nand_subop_instr_is_valid(subop, instr_idx) || in nand_subop_get_data_len()
2665 !nand_instr_is_data(&subop->instrs[instr_idx]))) in nand_subop_get_data_len()
2668 start_off = nand_subop_get_data_start_off(subop, instr_idx); in nand_subop_get_data_len()
2670 if (instr_idx == subop->ninstrs - 1 && in nand_subop_get_data_len()
2671 subop->last_instr_end_off) in nand_subop_get_data_len()
2672 end_off = subop->last_instr_end_off; in nand_subop_get_data_len()
2674 end_off = subop->instrs[instr_idx].ctx.data.len; in nand_subop_get_data_len()