Lines Matching defs:len
301 u32 len)
335 writel(len, sfc->regbase + SFC_LEN_EXT);
337 cmd |= len << SFC_CMD_TRAN_BYTES_SHIFT;
338 if (len) {
344 if (!len && op->addr.nbytes)
354 dev_dbg(sfc->dev, "sfc ctrl=%x cmd=%x addr=%llx len=%x\n",
355 ctrl, cmd, op->addr.val, len);
365 static int rockchip_sfc_write_fifo(struct rockchip_sfc *sfc, const u8 *buf, int len)
367 u8 bytes = len & 0x3;
373 dwords = len >> 2;
393 return len;
396 static int rockchip_sfc_read_fifo(struct rockchip_sfc *sfc, u8 *buf, int len)
398 u8 bytes = len & 0x3;
405 dwords = len >> 2;
425 return len;
428 static int rockchip_sfc_fifo_transfer_dma(struct rockchip_sfc *sfc, dma_addr_t dma_buf, size_t len)
434 return len;
438 const struct spi_mem_op *op, u32 len)
440 dev_dbg(sfc->dev, "sfc xfer_poll len=%x\n", len);
443 return rockchip_sfc_write_fifo(sfc, op->data.buf.out, len);
445 return rockchip_sfc_read_fifo(sfc, op->data.buf.in, len);
449 const struct spi_mem_op *op, u32 len)
453 dev_dbg(sfc->dev, "sfc xfer_dma len=%x\n", len);
456 memcpy(sfc->buffer, op->data.buf.out, len);
458 ret = rockchip_sfc_fifo_transfer_dma(sfc, sfc->dma_buffer, len);
465 memcpy(op->data.buf.in, sfc->buffer, len);
491 u32 len = op->data.nbytes;
504 rockchip_sfc_xfer_setup(sfc, mem, op, len);
505 if (len) {
506 if (likely(sfc->use_dma) && len >= SFC_DMA_TRANS_THRETHOLD) {
509 ret = rockchip_sfc_xfer_data_dma(sfc, op, len);
511 ret = rockchip_sfc_xfer_data_poll(sfc, op, len);
514 if (ret != len) {