Lines Matching refs:buf_sz
736 static int npcx_i3c_xfer_write_fifo(struct i3c_reg *inst, uint8_t *buf, uint8_t buf_sz, in npcx_i3c_xfer_write_fifo() argument
740 int remaining = buf_sz; in npcx_i3c_xfer_write_fifo()
832 static int npcx_i3c_xfer_write_fifo_dma(const struct device *dev, uint8_t *buf, uint32_t buf_sz) in npcx_i3c_xfer_write_fifo_dma() argument
846 mdma_inst->MDMA_TCNT1 = buf_sz; /* Set MDMA transfer count */ in npcx_i3c_xfer_write_fifo_dma()
853 LOG_DBG("Check complete time out, buf_size:%d", buf_sz); in npcx_i3c_xfer_write_fifo_dma()
865 ret = buf_sz - mdma_inst->MDMA_CTCNT1; /* Set transferred count */ in npcx_i3c_xfer_write_fifo_dma()
890 static int npcx_i3c_xfer_read_fifo_dma(const struct device *dev, uint8_t *buf, uint32_t buf_sz) in npcx_i3c_xfer_read_fifo_dma() argument
903 mdma_inst->MDMA_TCNT0 = buf_sz; /* Set MDMA transfer count */ in npcx_i3c_xfer_read_fifo_dma()
913 ret = buf_sz - mdma_inst->MDMA_CTCNT0; /* Set transferred count */ in npcx_i3c_xfer_read_fifo_dma()
942 enum npcx_i3c_mctrl_type op_type, uint8_t *buf, size_t buf_sz, in npcx_i3c_do_one_xfer_dma() argument
949 size_t rd_len = buf_sz; in npcx_i3c_do_one_xfer_dma()
955 if (is_hdr_ddr && (buf_sz % 2 != 0)) { in npcx_i3c_do_one_xfer_dma()
956 LOG_ERR("%s, HDR-DDR data length should be even, len=%#x", __func__, buf_sz); in npcx_i3c_do_one_xfer_dma()
989 if ((buf == NULL) || (buf_sz == 0)) { in npcx_i3c_do_one_xfer_dma()
995 ret = npcx_i3c_xfer_read_fifo_dma(dev, buf, buf_sz); in npcx_i3c_do_one_xfer_dma()
997 ret = npcx_i3c_xfer_write_fifo_dma(dev, buf, buf_sz); in npcx_i3c_do_one_xfer_dma()
1038 enum npcx_i3c_mctrl_type op_type, uint8_t *buf, size_t buf_sz, in npcx_i3c_do_one_xfer() argument
1048 ret = npcx_i3c_request_emit_start(inst, addr, op_type, is_read, buf_sz); in npcx_i3c_do_one_xfer()
1056 if ((buf == NULL) || (buf_sz == 0)) { in npcx_i3c_do_one_xfer()
1062 ret = npcx_i3c_xfer_read_fifo(inst, buf, buf_sz); in npcx_i3c_do_one_xfer()
1064 ret = npcx_i3c_xfer_write_fifo(inst, buf, buf_sz, no_ending); in npcx_i3c_do_one_xfer()
1079 LOG_DBG("Wait COMPLETE timed out, addr 0x%02x, buf_sz %u", addr, buf_sz); in npcx_i3c_do_one_xfer()