Lines Matching full:rop

325 static void rnandc_trigger_op(struct rnandc *rnandc, struct rnandc_op *rop)  in rnandc_trigger_op()  argument
327 writel_relaxed(rop->addr0_col, rnandc->regs + ADDR0_COL_REG); in rnandc_trigger_op()
328 writel_relaxed(rop->addr0_row, rnandc->regs + ADDR0_ROW_REG); in rnandc_trigger_op()
329 writel_relaxed(rop->addr1_col, rnandc->regs + ADDR1_COL_REG); in rnandc_trigger_op()
330 writel_relaxed(rop->addr1_row, rnandc->regs + ADDR1_ROW_REG); in rnandc_trigger_op()
331 writel_relaxed(rop->ecc_offset, rnandc->regs + ECC_OFFSET_REG); in rnandc_trigger_op()
332 writel_relaxed(rop->gen_seq_ctrl, rnandc->regs + GEN_SEQ_CTRL_REG); in rnandc_trigger_op()
333 writel_relaxed(DATA_SIZE(rop->len), rnandc->regs + DATA_SIZE_REG); in rnandc_trigger_op()
334 writel_relaxed(rop->command, rnandc->regs + COMMAND_REG); in rnandc_trigger_op()
406 struct rnandc_op rop = { in rnandc_read_page_hw_ecc() local
433 rnandc_trigger_op(rnandc, &rop); in rnandc_read_page_hw_ecc()
500 struct rnandc_op rop = { in rnandc_read_subpage_hw_ecc() local
517 rnandc_trigger_op(rnandc, &rop); in rnandc_read_subpage_hw_ecc()
586 struct rnandc_op rop = { in rnandc_write_page_hw_ecc() local
613 rnandc_trigger_op(rnandc, &rop); in rnandc_write_page_hw_ecc()
642 struct rnandc_op rop = { in rnandc_write_subpage_hw_ecc() local
657 rnandc_trigger_op(rnandc, &rop); in rnandc_write_subpage_hw_ecc()
687 struct rnandc_op rop = { in rnandc_exec_op() local
710 rop.command |= COMMAND_0(instr->ctx.cmd.opcode); in rnandc_exec_op()
711 rop.gen_seq_ctrl |= GEN_SEQ_CMD0_EN; in rnandc_exec_op()
714 rop.gen_seq_ctrl |= GEN_SEQ_COMMAND_3(instr->ctx.cmd.opcode); in rnandc_exec_op()
715 rop.gen_seq_ctrl |= GEN_SEQ_CMD3_EN; in rnandc_exec_op()
720 rop.command |= COMMAND_2(instr->ctx.cmd.opcode); in rnandc_exec_op()
721 rop.gen_seq_ctrl |= GEN_SEQ_CMD2_EN; in rnandc_exec_op()
726 rop.command |= COMMAND_1(instr->ctx.cmd.opcode); in rnandc_exec_op()
727 rop.gen_seq_ctrl |= GEN_SEQ_CMD1_EN; in rnandc_exec_op()
752 rop.addr0_col |= addrs[i] << (i * 8); in rnandc_exec_op()
753 rop.gen_seq_ctrl |= GEN_SEQ_COL_A0(col_addrs); in rnandc_exec_op()
756 rop.addr0_row |= addrs[2 + i] << (i * 8); in rnandc_exec_op()
757 rop.gen_seq_ctrl |= GEN_SEQ_ROW_A0(row_addrs); in rnandc_exec_op()
764 rop.addr1_col |= addrs[i] << (i * 8); in rnandc_exec_op()
765 rop.gen_seq_ctrl |= GEN_SEQ_COL_A1(col_addrs); in rnandc_exec_op()
768 rop.addr1_row |= addrs[2 + i] << (i * 8); in rnandc_exec_op()
769 rop.gen_seq_ctrl |= GEN_SEQ_ROW_A1(row_addrs); in rnandc_exec_op()
780 rop.read = true; in rnandc_exec_op()
783 rop.gen_seq_ctrl |= GEN_SEQ_DATA_EN; in rnandc_exec_op()
784 rop.buf = instr->ctx.data.buf.in; in rnandc_exec_op()
785 rop.len = instr->ctx.data.len; in rnandc_exec_op()
786 rop.command |= COMMAND_FIFO_SEL; in rnandc_exec_op()
805 rop.gen_seq_ctrl |= GEN_SEQ_DELAY0_EN; in rnandc_exec_op()
811 rop.gen_seq_ctrl |= GEN_SEQ_DELAY1_EN; in rnandc_exec_op()
829 if (rop.buf && !rop.read) in rnandc_exec_op()
830 rop.command |= COMMAND_SEQ_GEN_OUT; in rnandc_exec_op()
832 rop.command |= COMMAND_SEQ_GEN_IN; in rnandc_exec_op()
842 rnandc_trigger_op(rnandc, &rop); in rnandc_exec_op()
844 words = rop.len / sizeof(u32); in rnandc_exec_op()
845 remainder = rop.len % sizeof(u32); in rnandc_exec_op()
846 if (rop.buf && rop.read) { in rnandc_exec_op()
853 ioread32_rep(rnandc->regs + FIFO_DATA_REG, rop.buf, words); in rnandc_exec_op()
856 memcpy(rop.buf + (words * sizeof(u32)), &last_bytes, in rnandc_exec_op()
865 } else if (rop.len && !rop.read) { in rnandc_exec_op()
869 iowrite32_rep(rnandc->regs + FIFO_DATA_REG, rop.buf, in rnandc_exec_op()
870 DIV_ROUND_UP(rop.len, 4)); in rnandc_exec_op()
874 memcpy(&last_bytes, rop.buf + (words * sizeof(u32)), remainder); in rnandc_exec_op()