/drivers/dma/ |
D | bcm2835-dma.c | 225 size_t period_len, in bcm2835_dma_create_cb_set_length() argument 235 if (!period_len) in bcm2835_dma_create_cb_set_length() 247 if (*total_len + control_block->length < period_len) { in bcm2835_dma_create_cb_set_length() 254 control_block->length = period_len - *total_len; in bcm2835_dma_create_cb_set_length() 304 size_t period_len, gfp_t gfp) in bcm2835_dma_create_cb_chain() argument 348 len, period_len, &total_len, in bcm2835_dma_create_cb_chain() 694 size_t period_len, enum dma_transfer_direction direction, in bcm2835_dma_prep_dma_cyclic() argument 721 period_len = buf_len; in bcm2835_dma_prep_dma_cyclic() 727 if (buf_len % period_len) in bcm2835_dma_prep_dma_cyclic() 730 __func__, buf_len, period_len); in bcm2835_dma_prep_dma_cyclic() [all …]
|
D | mmp_tdma.c | 123 size_t period_len; member 424 size_t period_len, enum dma_transfer_direction direction, in mmp_tdma_prep_dma_cyclic() argument 429 int num_periods = buf_len / period_len; in mmp_tdma_prep_dma_cyclic() 442 if (period_len > TDMA_MAX_XFER_BYTES) { in mmp_tdma_prep_dma_cyclic() 445 period_len, TDMA_MAX_XFER_BYTES); in mmp_tdma_prep_dma_cyclic() 474 desc->byte_cnt = period_len; in mmp_tdma_prep_dma_cyclic() 475 dma_addr += period_len; in mmp_tdma_prep_dma_cyclic() 476 buf += period_len; in mmp_tdma_prep_dma_cyclic() 485 tdmac->period_len = period_len; in mmp_tdma_prep_dma_cyclic()
|
D | tegra210-adma.c | 123 size_t period_len; member 404 return desc->buf_len - (periods_remaining * desc->period_len); in tegra_adma_get_residue() 602 ch_regs->tc = desc->period_len & ADMA_CH_TC_COUNT_MASK; in tegra_adma_set_xfer_params() 609 size_t period_len, enum dma_transfer_direction direction, in tegra_adma_prep_dma_cyclic() argument 615 if (!buf_len || !period_len || period_len > ADMA_CH_TC_COUNT_MASK) { in tegra_adma_prep_dma_cyclic() 620 if (buf_len % period_len) { in tegra_adma_prep_dma_cyclic() 635 desc->period_len = period_len; in tegra_adma_prep_dma_cyclic() 636 desc->num_periods = buf_len / period_len; in tegra_adma_prep_dma_cyclic()
|
D | dma-axi-dmac.c | 494 unsigned int num_periods, unsigned int period_len, in axi_dmac_fill_linear_sg() argument 502 num_segments = DIV_ROUND_UP(period_len, chan->max_length); in axi_dmac_fill_linear_sg() 503 segment_size = DIV_ROUND_UP(period_len, num_segments); in axi_dmac_fill_linear_sg() 508 len = period_len; in axi_dmac_fill_linear_sg() 578 size_t period_len, enum dma_transfer_direction direction, in axi_dmac_prep_dma_cyclic() argument 592 if (period_len == 0 || buf_len % period_len) in axi_dmac_prep_dma_cyclic() 595 num_periods = buf_len / period_len; in axi_dmac_prep_dma_cyclic() 596 num_segments = DIV_ROUND_UP(period_len, chan->max_length); in axi_dmac_prep_dma_cyclic() 603 period_len, desc->sg); in axi_dmac_prep_dma_cyclic()
|
D | at_hdmac.c | 1187 size_t period_len) in atc_dma_cyclic_check_values() argument 1189 if (period_len > (ATC_BTSIZE_MAX << reg_width)) in atc_dma_cyclic_check_values() 1191 if (unlikely(period_len & ((1 << reg_width) - 1))) in atc_dma_cyclic_check_values() 1208 unsigned int reg_width, size_t period_len, in atc_dma_cyclic_fill_desc() argument 1220 | period_len >> reg_width; in atc_dma_cyclic_fill_desc() 1224 desc->lli.saddr = buf_addr + (period_len * period_index); in atc_dma_cyclic_fill_desc() 1232 desc->len = period_len; in atc_dma_cyclic_fill_desc() 1237 desc->lli.daddr = buf_addr + (period_len * period_index); in atc_dma_cyclic_fill_desc() 1244 desc->len = period_len; in atc_dma_cyclic_fill_desc() 1265 size_t period_len, enum dma_transfer_direction direction, in atc_prep_dma_cyclic() argument [all …]
|
D | mxs-dma.c | 576 size_t period_len, enum dma_transfer_direction direction, in mxs_dma_prep_dma_cyclic() argument 581 u32 num_periods = buf_len / period_len; in mxs_dma_prep_dma_cyclic() 598 if (period_len > MAX_XFER_BYTES) { in mxs_dma_prep_dma_cyclic() 601 period_len, MAX_XFER_BYTES); in mxs_dma_prep_dma_cyclic() 614 ccw->xfer_bytes = period_len; in mxs_dma_prep_dma_cyclic() 625 dma_addr += period_len; in mxs_dma_prep_dma_cyclic() 626 buf += period_len; in mxs_dma_prep_dma_cyclic()
|
D | st_fdma.c | 449 size_t period_len, enum dma_transfer_direction direction, in st_fdma_prep_dma_cyclic() argument 460 if (!period_len) in st_fdma_prep_dma_cyclic() 469 if (len % period_len != 0) { in st_fdma_prep_dma_cyclic() 474 sg_len = len / period_len; in st_fdma_prep_dma_cyclic() 495 hw_node->saddr = buf_addr + (i * period_len); in st_fdma_prep_dma_cyclic() 497 hw_node->daddr = buf_addr + (i * period_len); in st_fdma_prep_dma_cyclic() 499 hw_node->nbytes = period_len; in st_fdma_prep_dma_cyclic() 500 hw_node->generic.length = period_len; in st_fdma_prep_dma_cyclic()
|
D | mmp_pdma.c | 606 dma_addr_t buf_addr, size_t len, size_t period_len, in mmp_pdma_prep_dma_cyclic() argument 614 if (!dchan || !len || !period_len) in mmp_pdma_prep_dma_cyclic() 618 if (len % period_len != 0) in mmp_pdma_prep_dma_cyclic() 621 if (period_len > PDMA_MAX_DESC_BYTES) in mmp_pdma_prep_dma_cyclic() 652 (DCMD_LENGTH & period_len)); in mmp_pdma_prep_dma_cyclic() 665 len -= period_len; in mmp_pdma_prep_dma_cyclic() 668 dma_src += period_len; in mmp_pdma_prep_dma_cyclic() 670 dma_dst += period_len; in mmp_pdma_prep_dma_cyclic()
|
D | imx-sdma.c | 381 unsigned int period_len; member 847 bd->mode.count = desc->period_len; in sdma_update_channel_loop() 1585 size_t period_len, enum dma_transfer_direction direction, in sdma_prep_dma_cyclic() argument 1590 int num_periods = buf_len / period_len; in sdma_prep_dma_cyclic() 1603 desc->period_len = period_len; in sdma_prep_dma_cyclic() 1607 if (period_len > SDMA_BD_MAX_CNT) { in sdma_prep_dma_cyclic() 1609 channel, period_len, SDMA_BD_MAX_CNT); in sdma_prep_dma_cyclic() 1619 bd->mode.count = period_len; in sdma_prep_dma_cyclic() 1633 i, period_len, (u64)dma_addr, in sdma_prep_dma_cyclic() 1639 dma_addr += period_len; in sdma_prep_dma_cyclic() [all …]
|
D | pxa_dma.c | 1013 dma_addr_t buf_addr, size_t len, size_t period_len, in pxad_prep_dma_cyclic() argument 1023 if (!dchan || !len || !period_len) in pxad_prep_dma_cyclic() 1031 if (len % period_len != 0 || period_len > PDMA_MAX_DESC_BYTES || in pxad_prep_dma_cyclic() 1032 !IS_ALIGNED(period_len, 1 << PDMA_ALIGNMENT)) in pxad_prep_dma_cyclic() 1036 dcmd |= PXA_DCMD_ENDIRQEN | (PXA_DCMD_LENGTH & period_len); in pxad_prep_dma_cyclic() 1039 __func__, (unsigned long)buf_addr, len, period_len, dir, flags); in pxad_prep_dma_cyclic() 1041 nb_desc = DIV_ROUND_UP(period_len, PDMA_MAX_DESC_BYTES); in pxad_prep_dma_cyclic() 1042 nb_desc *= DIV_ROUND_UP(len, period_len); in pxad_prep_dma_cyclic() 1056 dma += period_len; in pxad_prep_dma_cyclic() 1057 len -= period_len; in pxad_prep_dma_cyclic()
|
D | stm32-dma.c | 933 size_t period_len, enum dma_transfer_direction direction, in stm32_dma_prep_dma_cyclic() argument 942 if (!buf_len || !period_len) { in stm32_dma_prep_dma_cyclic() 952 if (buf_len % period_len) { in stm32_dma_prep_dma_cyclic() 968 ret = stm32_dma_set_xfer_param(chan, direction, &buswidth, period_len, in stm32_dma_prep_dma_cyclic() 973 nb_data_items = period_len / buswidth; in stm32_dma_prep_dma_cyclic() 980 if (buf_len == period_len) in stm32_dma_prep_dma_cyclic() 988 num_periods = buf_len / period_len; in stm32_dma_prep_dma_cyclic() 995 desc->sg_req[i].len = period_len; in stm32_dma_prep_dma_cyclic() 1004 buf_addr += period_len; in stm32_dma_prep_dma_cyclic()
|
D | stm32-mdma.c | 820 size_t buf_len, size_t period_len, in stm32_mdma_prep_dma_cyclic() argument 843 if (!buf_len || !period_len || period_len > STM32_MDMA_MAX_BLOCK_LEN) { in stm32_mdma_prep_dma_cyclic() 848 if (buf_len % period_len) { in stm32_mdma_prep_dma_cyclic() 853 count = buf_len / period_len; in stm32_mdma_prep_dma_cyclic() 863 &ctbr, src_addr, period_len); in stm32_mdma_prep_dma_cyclic() 869 &ctbr, dst_addr, period_len); in stm32_mdma_prep_dma_cyclic() 885 src_addr = buf_addr + i * period_len; in stm32_mdma_prep_dma_cyclic() 889 dst_addr = buf_addr + i * period_len; in stm32_mdma_prep_dma_cyclic() 893 dst_addr, period_len, ctcr, ctbr, in stm32_mdma_prep_dma_cyclic()
|
D | k3dma.c | 589 size_t buf_len, size_t period_len, in k3_dma_prep_dma_cyclic() argument 603 buf_len, period_len, (int)dir); in k3_dma_prep_dma_cyclic() 620 if (period_len < modulo) in k3_dma_prep_dma_cyclic() 621 modulo = period_len; in k3_dma_prep_dma_cyclic() 634 if (since >= period_len) { in k3_dma_prep_dma_cyclic() 637 since -= period_len; in k3_dma_prep_dma_cyclic()
|
D | dma-jz4780.c | 400 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()
|
D | ep93xx_dma.c | 1118 size_t buf_len, size_t period_len, in ep93xx_dma_prep_dma_cyclic() argument 1137 if (period_len > DMA_MAX_CHAN_BYTES) { in ep93xx_dma_prep_dma_cyclic() 1139 period_len); in ep93xx_dma_prep_dma_cyclic() 1147 for (offset = 0; offset < buf_len; offset += period_len) { in ep93xx_dma_prep_dma_cyclic() 1162 desc->size = period_len; in ep93xx_dma_prep_dma_cyclic()
|
D | owl-dma.c | 982 size_t period_len, in owl_prep_dma_cyclic() argument 992 unsigned int periods = buf_len / period_len; in owl_prep_dma_cyclic() 1010 src = buf_addr + (period_len * i); in owl_prep_dma_cyclic() 1014 dst = buf_addr + (period_len * i); in owl_prep_dma_cyclic() 1017 ret = owl_dma_cfg_lli(vchan, lli, src, dst, period_len, in owl_prep_dma_cyclic()
|
D | fsl-edma-common.c | 451 size_t period_len, enum dma_transfer_direction direction, in fsl_edma_prep_dma_cyclic() argument 467 sg_len = buf_len / period_len; in fsl_edma_prep_dma_cyclic() 487 iter = period_len / nbytes; in fsl_edma_prep_dma_cyclic() 511 dma_buf_next += period_len; in fsl_edma_prep_dma_cyclic()
|
D | imx-dma.c | 850 size_t period_len, enum dma_transfer_direction direction, in imxdma_prep_dma_cyclic() argument 857 unsigned int periods = buf_len / period_len; in imxdma_prep_dma_cyclic() 860 __func__, imxdmac->channel, buf_len, period_len); in imxdma_prep_dma_cyclic() 881 sg_dma_len(&imxdmac->sg_list[i]) = period_len; in imxdma_prep_dma_cyclic() 882 dma_addr += period_len; in imxdma_prep_dma_cyclic()
|
D | sun4i-dma.c | 662 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()
|
/drivers/dma/sh/ |
D | shdma-base.c | 693 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()
|
D | rcar-dmac.c | 1225 size_t buf_len, size_t period_len, in rcar_dmac_prep_dma_cyclic() argument 1235 if (rchan->mid_rid < 0 || buf_len < period_len) { in rcar_dmac_prep_dma_cyclic() 1238 __func__, buf_len, period_len, rchan->mid_rid); in rcar_dmac_prep_dma_cyclic() 1245 sg_len = buf_len / period_len; in rcar_dmac_prep_dma_cyclic() 1264 dma_addr_t src = buf_addr + (period_len * i); in rcar_dmac_prep_dma_cyclic() 1266 sg_set_page(&sgl[i], pfn_to_page(PFN_DOWN(src)), period_len, in rcar_dmac_prep_dma_cyclic() 1269 sg_dma_len(&sgl[i]) = period_len; in rcar_dmac_prep_dma_cyclic()
|
/drivers/staging/ralink-gdma/ |
D | ralink-gdma.c | 605 size_t period_len, enum dma_transfer_direction direction, in gdma_dma_prep_dma_cyclic() argument 612 if (buf_len % period_len) in gdma_dma_prep_dma_cyclic() 615 if (period_len > GDMA_REG_CTRL0_TX_MASK) { in gdma_dma_prep_dma_cyclic() 617 period_len); in gdma_dma_prep_dma_cyclic() 621 num_periods = buf_len / period_len; in gdma_dma_prep_dma_cyclic() 639 desc->sg[i].len = period_len; in gdma_dma_prep_dma_cyclic() 640 buf_addr += period_len; in gdma_dma_prep_dma_cyclic()
|
/drivers/dma/dw-axi-dmac/ |
D | dw-axi-dmac-platform.c | 674 size_t buf_len, size_t period_len, in dw_axi_dma_chan_prep_cyclic() argument 691 num_periods = buf_len / period_len; in dw_axi_dma_chan_prep_cyclic() 697 num_segments = DIV_ROUND_UP(period_len, axi_block_len); in dw_axi_dma_chan_prep_cyclic() 698 segment_len = DIV_ROUND_UP(period_len, num_segments); in dw_axi_dma_chan_prep_cyclic() 710 desc->period_len = period_len; in dw_axi_dma_chan_prep_cyclic() 1040 if (((hw_desc->len * (i + 1)) % desc->period_len) == 0) in axi_chan_block_xfer_complete()
|
/drivers/dma/ti/ |
D | edma.c | 1355 size_t period_len, enum dma_transfer_direction direction, in edma_prep_dma_cyclic() argument 1367 if (unlikely(!echan || !buf_len || !period_len)) in edma_prep_dma_cyclic() 1390 if (unlikely(buf_len % period_len)) { in edma_prep_dma_cyclic() 1395 nslots = (buf_len / period_len) + 1; in edma_prep_dma_cyclic() 1412 if (burst == period_len) { in edma_prep_dma_cyclic() 1413 period_len = buf_len; in edma_prep_dma_cyclic() 1432 __func__, echan->ch_num, nslots, period_len, buf_len); in edma_prep_dma_cyclic() 1454 dst_addr, burst, dev_width, period_len, in edma_prep_dma_cyclic() 1462 dst_addr += period_len; in edma_prep_dma_cyclic() 1464 src_addr += period_len; in edma_prep_dma_cyclic()
|
/drivers/dma/xilinx/ |
D | xilinx_dma.c | 603 size_t period_len) in xilinx_axidma_buf() argument 606 hw->buf_addr = lower_32_bits(buf_addr + sg_used + period_len); in xilinx_axidma_buf() 608 period_len); in xilinx_axidma_buf() 610 hw->buf_addr = buf_addr + sg_used + period_len; in xilinx_axidma_buf() 2244 size_t period_len, enum dma_transfer_direction direction, in xilinx_dma_prep_dma_cyclic() argument 2255 if (!period_len) in xilinx_dma_prep_dma_cyclic() 2258 num_periods = buf_len / period_len; in xilinx_dma_prep_dma_cyclic() 2278 while (sg_used < period_len) { in xilinx_dma_prep_dma_cyclic() 2290 copy = xilinx_dma_calc_copysize(chan, period_len, in xilinx_dma_prep_dma_cyclic() 2294 period_len * i); in xilinx_dma_prep_dma_cyclic()
|