Home
last modified time | relevance | path

Searched refs:period_len (Results 1 – 25 of 37) sorted by relevance

12

/Linux-v5.4/drivers/dma/
Dmmp_tdma.c123 size_t period_len; member
422 size_t period_len, enum dma_transfer_direction direction, in mmp_tdma_prep_dma_cyclic() argument
427 int num_periods = buf_len / period_len; in mmp_tdma_prep_dma_cyclic()
433 if (period_len > TDMA_MAX_XFER_BYTES) { in mmp_tdma_prep_dma_cyclic()
436 period_len, TDMA_MAX_XFER_BYTES); in mmp_tdma_prep_dma_cyclic()
464 desc->byte_cnt = period_len; in mmp_tdma_prep_dma_cyclic()
465 dma_addr += period_len; in mmp_tdma_prep_dma_cyclic()
466 buf += period_len; in mmp_tdma_prep_dma_cyclic()
475 tdmac->period_len = period_len; in mmp_tdma_prep_dma_cyclic()
Dbcm2835-dma.c227 size_t period_len, in bcm2835_dma_create_cb_set_length() argument
237 if (!period_len) in bcm2835_dma_create_cb_set_length()
249 if (*total_len + control_block->length < period_len) { in bcm2835_dma_create_cb_set_length()
256 control_block->length = period_len - *total_len; in bcm2835_dma_create_cb_set_length()
306 size_t period_len, gfp_t gfp) in bcm2835_dma_create_cb_chain() argument
350 len, period_len, &total_len, in bcm2835_dma_create_cb_chain()
696 size_t period_len, enum dma_transfer_direction direction, in bcm2835_dma_prep_dma_cyclic() argument
723 period_len = buf_len; in bcm2835_dma_prep_dma_cyclic()
729 if (buf_len % period_len) in bcm2835_dma_prep_dma_cyclic()
732 __func__, buf_len, period_len); in bcm2835_dma_prep_dma_cyclic()
[all …]
Ddma-axi-dmac.c485 unsigned int num_periods, unsigned int period_len, in axi_dmac_fill_linear_sg() argument
493 num_segments = DIV_ROUND_UP(period_len, chan->max_length); in axi_dmac_fill_linear_sg()
494 segment_size = DIV_ROUND_UP(period_len, num_segments); in axi_dmac_fill_linear_sg()
499 len = period_len; in axi_dmac_fill_linear_sg()
569 size_t period_len, enum dma_transfer_direction direction, in axi_dmac_prep_dma_cyclic() argument
583 if (period_len == 0 || buf_len % period_len) in axi_dmac_prep_dma_cyclic()
586 num_periods = buf_len / period_len; in axi_dmac_prep_dma_cyclic()
587 num_segments = DIV_ROUND_UP(period_len, chan->max_length); in axi_dmac_prep_dma_cyclic()
594 period_len, desc->sg); in axi_dmac_prep_dma_cyclic()
Dtegra210-adma.c123 size_t period_len; member
404 return desc->buf_len - (periods_remaining * desc->period_len); in tegra_adma_get_residue()
603 ch_regs->tc = desc->period_len & ADMA_CH_TC_COUNT_MASK; in tegra_adma_set_xfer_params()
610 size_t period_len, enum dma_transfer_direction direction, in tegra_adma_prep_dma_cyclic() argument
616 if (!buf_len || !period_len || period_len > ADMA_CH_TC_COUNT_MASK) { in tegra_adma_prep_dma_cyclic()
621 if (buf_len % period_len) { in tegra_adma_prep_dma_cyclic()
636 desc->period_len = period_len; in tegra_adma_prep_dma_cyclic()
637 desc->num_periods = buf_len / period_len; in tegra_adma_prep_dma_cyclic()
Dmxs-dma.c595 size_t period_len, enum dma_transfer_direction direction, in mxs_dma_prep_dma_cyclic() argument
600 u32 num_periods = buf_len / period_len; in mxs_dma_prep_dma_cyclic()
617 if (period_len > MAX_XFER_BYTES) { in mxs_dma_prep_dma_cyclic()
620 period_len, MAX_XFER_BYTES); in mxs_dma_prep_dma_cyclic()
633 ccw->xfer_bytes = period_len; in mxs_dma_prep_dma_cyclic()
644 dma_addr += period_len; in mxs_dma_prep_dma_cyclic()
645 buf += period_len; in mxs_dma_prep_dma_cyclic()
Dat_hdmac.c1207 size_t period_len) in atc_dma_cyclic_check_values() argument
1209 if (period_len > (ATC_BTSIZE_MAX << reg_width)) in atc_dma_cyclic_check_values()
1211 if (unlikely(period_len & ((1 << reg_width) - 1))) in atc_dma_cyclic_check_values()
1228 unsigned int reg_width, size_t period_len, in atc_dma_cyclic_fill_desc() argument
1240 | period_len >> reg_width; in atc_dma_cyclic_fill_desc()
1244 desc->lli.saddr = buf_addr + (period_len * period_index); in atc_dma_cyclic_fill_desc()
1252 desc->len = period_len; in atc_dma_cyclic_fill_desc()
1257 desc->lli.daddr = buf_addr + (period_len * period_index); in atc_dma_cyclic_fill_desc()
1264 desc->len = period_len; in atc_dma_cyclic_fill_desc()
1285 size_t period_len, enum dma_transfer_direction direction, in atc_prep_dma_cyclic() argument
[all …]
Dst_fdma.c448 size_t period_len, enum dma_transfer_direction direction, in st_fdma_prep_dma_cyclic() argument
459 if (!period_len) in st_fdma_prep_dma_cyclic()
468 if (len % period_len != 0) { in st_fdma_prep_dma_cyclic()
473 sg_len = len / period_len; in st_fdma_prep_dma_cyclic()
494 hw_node->saddr = buf_addr + (i * period_len); in st_fdma_prep_dma_cyclic()
496 hw_node->daddr = buf_addr + (i * period_len); in st_fdma_prep_dma_cyclic()
498 hw_node->nbytes = period_len; in st_fdma_prep_dma_cyclic()
499 hw_node->generic.length = period_len; in st_fdma_prep_dma_cyclic()
Dmmp_pdma.c607 dma_addr_t buf_addr, size_t len, size_t period_len, in mmp_pdma_prep_dma_cyclic() argument
615 if (!dchan || !len || !period_len) in mmp_pdma_prep_dma_cyclic()
619 if (len % period_len != 0) in mmp_pdma_prep_dma_cyclic()
622 if (period_len > PDMA_MAX_DESC_BYTES) in mmp_pdma_prep_dma_cyclic()
653 (DCMD_LENGTH & period_len)); in mmp_pdma_prep_dma_cyclic()
666 len -= period_len; in mmp_pdma_prep_dma_cyclic()
669 dma_src += period_len; in mmp_pdma_prep_dma_cyclic()
671 dma_dst += period_len; in mmp_pdma_prep_dma_cyclic()
Dimx-sdma.c323 unsigned int period_len; member
806 bd->mode.count = desc->period_len; in sdma_update_channel_loop()
1525 size_t period_len, enum dma_transfer_direction direction, in sdma_prep_dma_cyclic() argument
1530 int num_periods = buf_len / period_len; in sdma_prep_dma_cyclic()
1543 desc->period_len = period_len; in sdma_prep_dma_cyclic()
1547 if (period_len > SDMA_BD_MAX_CNT) { in sdma_prep_dma_cyclic()
1549 channel, period_len, SDMA_BD_MAX_CNT); in sdma_prep_dma_cyclic()
1559 bd->mode.count = period_len; in sdma_prep_dma_cyclic()
1573 i, period_len, (u64)dma_addr, in sdma_prep_dma_cyclic()
1579 dma_addr += period_len; in sdma_prep_dma_cyclic()
[all …]
Dpxa_dma.c1022 dma_addr_t buf_addr, size_t len, size_t period_len, in pxad_prep_dma_cyclic() argument
1032 if (!dchan || !len || !period_len) in pxad_prep_dma_cyclic()
1040 if (len % period_len != 0 || period_len > PDMA_MAX_DESC_BYTES || in pxad_prep_dma_cyclic()
1041 !IS_ALIGNED(period_len, 1 << PDMA_ALIGNMENT)) in pxad_prep_dma_cyclic()
1045 dcmd |= PXA_DCMD_ENDIRQEN | (PXA_DCMD_LENGTH & period_len); in pxad_prep_dma_cyclic()
1048 __func__, (unsigned long)buf_addr, len, period_len, dir, flags); in pxad_prep_dma_cyclic()
1050 nb_desc = DIV_ROUND_UP(period_len, PDMA_MAX_DESC_BYTES); in pxad_prep_dma_cyclic()
1051 nb_desc *= DIV_ROUND_UP(len, period_len); in pxad_prep_dma_cyclic()
1065 dma += period_len; in pxad_prep_dma_cyclic()
1066 len -= period_len; in pxad_prep_dma_cyclic()
Dstm32-dma.c895 size_t period_len, enum dma_transfer_direction direction, in stm32_dma_prep_dma_cyclic() argument
904 if (!buf_len || !period_len) { in stm32_dma_prep_dma_cyclic()
914 if (buf_len % period_len) { in stm32_dma_prep_dma_cyclic()
930 ret = stm32_dma_set_xfer_param(chan, direction, &buswidth, period_len); in stm32_dma_prep_dma_cyclic()
934 nb_data_items = period_len / buswidth; in stm32_dma_prep_dma_cyclic()
941 if (buf_len == period_len) in stm32_dma_prep_dma_cyclic()
949 num_periods = buf_len / period_len; in stm32_dma_prep_dma_cyclic()
956 desc->sg_req[i].len = period_len; in stm32_dma_prep_dma_cyclic()
965 buf_addr += period_len; in stm32_dma_prep_dma_cyclic()
Dstm32-mdma.c822 size_t buf_len, size_t period_len, in stm32_mdma_prep_dma_cyclic() argument
845 if (!buf_len || !period_len || period_len > STM32_MDMA_MAX_BLOCK_LEN) { in stm32_mdma_prep_dma_cyclic()
850 if (buf_len % period_len) { in stm32_mdma_prep_dma_cyclic()
855 count = buf_len / period_len; in stm32_mdma_prep_dma_cyclic()
865 &ctbr, src_addr, period_len); in stm32_mdma_prep_dma_cyclic()
871 &ctbr, dst_addr, period_len); in stm32_mdma_prep_dma_cyclic()
887 src_addr = buf_addr + i * period_len; in stm32_mdma_prep_dma_cyclic()
891 dst_addr = buf_addr + i * period_len; in stm32_mdma_prep_dma_cyclic()
895 dst_addr, period_len, ctcr, ctbr, in stm32_mdma_prep_dma_cyclic()
Dzx_dma.c605 size_t period_len, enum dma_transfer_direction dir, in zx_dma_prep_dma_cyclic() argument
611 int num_periods = buf_len / period_len; in zx_dma_prep_dma_cyclic()
614 if (period_len > DMA_MAX_SIZE) { in zx_dma_prep_dma_cyclic()
635 zx_dma_fill_desc(ds, dst, src, period_len, num++, in zx_dma_prep_dma_cyclic()
637 dma_addr += period_len; in zx_dma_prep_dma_cyclic()
638 buf += period_len; in zx_dma_prep_dma_cyclic()
Ddma-jz4780.c400 size_t period_len, enum dma_transfer_direction direction, in jz4780_dma_prep_dma_cyclic() argument
408 if (buf_len % period_len) in jz4780_dma_prep_dma_cyclic()
411 periods = buf_len / period_len; in jz4780_dma_prep_dma_cyclic()
419 period_len, direction); in jz4780_dma_prep_dma_cyclic()
425 buf_addr += period_len; in jz4780_dma_prep_dma_cyclic()
Dk3dma.c584 size_t buf_len, size_t period_len, in k3_dma_prep_dma_cyclic() argument
598 buf_len, period_len, (int)dir); in k3_dma_prep_dma_cyclic()
615 if (period_len < modulo) in k3_dma_prep_dma_cyclic()
616 modulo = period_len; in k3_dma_prep_dma_cyclic()
629 if (since >= period_len) { in k3_dma_prep_dma_cyclic()
632 since -= period_len; in k3_dma_prep_dma_cyclic()
Dep93xx_dma.c1116 size_t buf_len, size_t period_len, in ep93xx_dma_prep_dma_cyclic() argument
1135 if (period_len > DMA_MAX_CHAN_BYTES) { in ep93xx_dma_prep_dma_cyclic()
1137 period_len); in ep93xx_dma_prep_dma_cyclic()
1145 for (offset = 0; offset < buf_len; offset += period_len) { in ep93xx_dma_prep_dma_cyclic()
1160 desc->size = period_len; in ep93xx_dma_prep_dma_cyclic()
Dfsl-edma-common.c444 size_t period_len, enum dma_transfer_direction direction, in fsl_edma_prep_dma_cyclic() argument
460 sg_len = buf_len / period_len; in fsl_edma_prep_dma_cyclic()
480 iter = period_len / nbytes; in fsl_edma_prep_dma_cyclic()
504 dma_buf_next += period_len; in fsl_edma_prep_dma_cyclic()
Dowl-dma.c944 size_t period_len, in owl_prep_dma_cyclic() argument
954 unsigned int periods = buf_len / period_len; in owl_prep_dma_cyclic()
972 src = buf_addr + (period_len * i); in owl_prep_dma_cyclic()
976 dst = buf_addr + (period_len * i); in owl_prep_dma_cyclic()
979 ret = owl_dma_cfg_lli(vchan, lli, src, dst, period_len, in owl_prep_dma_cyclic()
Dimx-dma.c868 size_t period_len, enum dma_transfer_direction direction, in imxdma_prep_dma_cyclic() argument
875 unsigned int periods = buf_len / period_len; in imxdma_prep_dma_cyclic()
878 __func__, imxdmac->channel, buf_len, period_len); in imxdma_prep_dma_cyclic()
899 sg_dma_len(&imxdmac->sg_list[i]) = period_len; in imxdma_prep_dma_cyclic()
900 dma_addr += period_len; in imxdma_prep_dma_cyclic()
Dsun4i-dma.c662 size_t period_len, enum dma_transfer_direction dir, in sun4i_dma_prep_dma_cyclic() argument
739 nr_periods = DIV_ROUND_UP(len / period_len, 2); in sun4i_dma_prep_dma_cyclic()
742 offset = i * period_len * 2; in sun4i_dma_prep_dma_cyclic()
743 plength = min((len - offset), (period_len * 2)); in sun4i_dma_prep_dma_cyclic()
/Linux-v5.4/drivers/staging/ralink-gdma/
Dralink-gdma.c606 size_t period_len, enum dma_transfer_direction direction, in gdma_dma_prep_dma_cyclic() argument
613 if (buf_len % period_len) in gdma_dma_prep_dma_cyclic()
616 if (period_len > GDMA_REG_CTRL0_TX_MASK) { in gdma_dma_prep_dma_cyclic()
618 period_len); in gdma_dma_prep_dma_cyclic()
622 num_periods = buf_len / period_len; in gdma_dma_prep_dma_cyclic()
640 desc->sg[i].len = period_len; in gdma_dma_prep_dma_cyclic()
641 buf_addr += period_len; in gdma_dma_prep_dma_cyclic()
/Linux-v5.4/drivers/dma/sh/
Dshdma-base.c693 size_t period_len, enum dma_transfer_direction direction, in shdma_prep_dma_cyclic() argument
700 unsigned int sg_len = buf_len / period_len; in shdma_prep_dma_cyclic()
718 if (slave_id < 0 || (buf_len < period_len)) { in shdma_prep_dma_cyclic()
721 __func__, buf_len, period_len, slave_id); in shdma_prep_dma_cyclic()
738 dma_addr_t src = buf_addr + (period_len * i); in shdma_prep_dma_cyclic()
740 sg_set_page(&sgl[i], pfn_to_page(PFN_DOWN(src)), period_len, in shdma_prep_dma_cyclic()
743 sg_dma_len(&sgl[i]) = period_len; in shdma_prep_dma_cyclic()
Drcar-dmac.c1191 size_t buf_len, size_t period_len, in rcar_dmac_prep_dma_cyclic() argument
1201 if (rchan->mid_rid < 0 || buf_len < period_len) { in rcar_dmac_prep_dma_cyclic()
1204 __func__, buf_len, period_len, rchan->mid_rid); in rcar_dmac_prep_dma_cyclic()
1211 sg_len = buf_len / period_len; in rcar_dmac_prep_dma_cyclic()
1230 dma_addr_t src = buf_addr + (period_len * i); in rcar_dmac_prep_dma_cyclic()
1232 sg_set_page(&sgl[i], pfn_to_page(PFN_DOWN(src)), period_len, in rcar_dmac_prep_dma_cyclic()
1235 sg_dma_len(&sgl[i]) = period_len; in rcar_dmac_prep_dma_cyclic()
/Linux-v5.4/drivers/dma/xilinx/
Dxilinx_dma.c538 size_t period_len) in xilinx_axidma_buf() argument
541 hw->buf_addr = lower_32_bits(buf_addr + sg_used + period_len); in xilinx_axidma_buf()
543 period_len); in xilinx_axidma_buf()
545 hw->buf_addr = buf_addr + sg_used + period_len; in xilinx_axidma_buf()
1875 size_t period_len, enum dma_transfer_direction direction, in xilinx_dma_prep_dma_cyclic() argument
1886 if (!period_len) in xilinx_dma_prep_dma_cyclic()
1889 num_periods = buf_len / period_len; in xilinx_dma_prep_dma_cyclic()
1909 while (sg_used < period_len) { in xilinx_dma_prep_dma_cyclic()
1921 copy = xilinx_dma_calc_copysize(chan, period_len, in xilinx_dma_prep_dma_cyclic()
1925 period_len * i); in xilinx_dma_prep_dma_cyclic()
/Linux-v5.4/drivers/dma/ti/
Dedma.c1267 size_t period_len, enum dma_transfer_direction direction, in edma_prep_dma_cyclic() argument
1279 if (unlikely(!echan || !buf_len || !period_len)) in edma_prep_dma_cyclic()
1302 if (unlikely(buf_len % period_len)) { in edma_prep_dma_cyclic()
1307 nslots = (buf_len / period_len) + 1; in edma_prep_dma_cyclic()
1324 if (burst == period_len) { in edma_prep_dma_cyclic()
1325 period_len = buf_len; in edma_prep_dma_cyclic()
1344 __func__, echan->ch_num, nslots, period_len, buf_len); in edma_prep_dma_cyclic()
1366 dst_addr, burst, dev_width, period_len, in edma_prep_dma_cyclic()
1374 dst_addr += period_len; in edma_prep_dma_cyclic()
1376 src_addr += period_len; in edma_prep_dma_cyclic()

12