Lines Matching defs:instr

937 meson_nand_op_get_dma_safe_input_buf(const struct nand_op_instr *instr)
939 if (WARN_ON(instr->type != NAND_OP_DATA_IN_INSTR))
942 if (meson_nfc_is_buffer_dma_safe(instr->ctx.data.buf.in))
943 return instr->ctx.data.buf.in;
945 return kzalloc(instr->ctx.data.len, GFP_KERNEL);
949 meson_nand_op_put_dma_safe_input_buf(const struct nand_op_instr *instr,
952 if (WARN_ON(instr->type != NAND_OP_DATA_IN_INSTR) ||
956 if (buf == instr->ctx.data.buf.in)
959 memcpy(instr->ctx.data.buf.in, buf, instr->ctx.data.len);
964 meson_nand_op_get_dma_safe_output_buf(const struct nand_op_instr *instr)
966 if (WARN_ON(instr->type != NAND_OP_DATA_OUT_INSTR))
969 if (meson_nfc_is_buffer_dma_safe(instr->ctx.data.buf.out))
970 return (void *)instr->ctx.data.buf.out;
972 return kmemdup(instr->ctx.data.buf.out,
973 instr->ctx.data.len, GFP_KERNEL);
977 meson_nand_op_put_dma_safe_output_buf(const struct nand_op_instr *instr,
980 if (WARN_ON(instr->type != NAND_OP_DATA_OUT_INSTR) ||
984 if (buf != instr->ctx.data.buf.out)
994 const struct nand_op_instr *instr;
996 instr = &op->instrs[op_id];
998 switch (instr->type) {
1001 if (instr->ctx.data.len > NFC_CMD_RAW_LEN)
1018 const struct nand_op_instr *instr = NULL;
1033 instr = &op->instrs[op_id];
1034 delay_idle = DIV_ROUND_UP(PSEC_TO_NSEC(instr->delay_ns),
1037 switch (instr->type) {
1040 cmd |= instr->ctx.cmd.opcode & 0xff;
1046 for (i = 0; i < instr->ctx.addr.naddrs; i++) {
1048 cmd |= instr->ctx.addr.addrs[i] & 0xff;
1055 buf = meson_nand_op_get_dma_safe_input_buf(instr);
1058 meson_nfc_read_buf(nand, buf, instr->ctx.data.len);
1059 meson_nand_op_put_dma_safe_input_buf(instr, buf);
1063 buf = meson_nand_op_get_dma_safe_output_buf(instr);
1066 meson_nfc_write_buf(nand, buf, instr->ctx.data.len);
1067 meson_nand_op_put_dma_safe_output_buf(instr, buf);
1071 meson_nfc_queue_rb(nand, instr->ctx.waitrdy.timeout_ms,
1073 if (instr->delay_ns)