Home
last modified time | relevance | path

Searched refs:sg_len (Results 1 – 25 of 132) sorted by relevance

123456

/drivers/mmc/card/
Dqueue.c152 static struct scatterlist *mmc_alloc_sg(int sg_len, int *err) in mmc_alloc_sg() argument
156 sg = kmalloc(sizeof(struct scatterlist)*sg_len, GFP_KERNEL); in mmc_alloc_sg()
161 sg_init_table(sg, sg_len); in mmc_alloc_sg()
464 unsigned int sg_len = 0; in mmc_queue_packed_map_sg() local
480 sg_len++; in mmc_queue_packed_map_sg()
485 sg_len += blk_rq_map_sg(mq->queue, req, __sg); in mmc_queue_packed_map_sg()
486 __sg = sg + (sg_len - 1); in mmc_queue_packed_map_sg()
489 sg_mark_end(sg + (sg_len - 1)); in mmc_queue_packed_map_sg()
490 return sg_len; in mmc_queue_packed_map_sg()
498 unsigned int sg_len; in mmc_queue_map_sg() local
[all …]
Dmmc_test.c82 unsigned int sg_len; member
161 unsigned int *sg_len; member
214 struct mmc_request *mrq, struct scatterlist *sg, unsigned sg_len, in mmc_test_prepare_mrq() argument
245 mrq->data->sg_len = sg_len; in mmc_test_prepare_mrq()
416 unsigned int *sg_len, int min_sg_len) in mmc_test_map_sg() argument
426 *sg_len = 0; in mmc_test_map_sg()
445 *sg_len += 1; in mmc_test_map_sg()
469 unsigned int *sg_len) in mmc_test_map_sg_max_scatter() argument
478 *sg_len = 0; in mmc_test_map_sg_max_scatter()
500 *sg_len += 1; in mmc_test_map_sg_max_scatter()
[all …]
/drivers/dma/sh/
Dusb-dmac.c58 unsigned int sg_len; member
266 static int usb_dmac_desc_alloc(struct usb_dmac_chan *chan, unsigned int sg_len, in usb_dmac_desc_alloc() argument
272 desc = kzalloc(sizeof(*desc) + sg_len * sizeof(desc->sg[0]), gfp); in usb_dmac_desc_alloc()
276 desc->sg_allocated_len = sg_len; in usb_dmac_desc_alloc()
302 unsigned int sg_len, gfp_t gfp) in usb_dmac_desc_get() argument
310 if (sg_len <= desc->sg_allocated_len) { in usb_dmac_desc_get()
319 if (!usb_dmac_desc_alloc(chan, sg_len, gfp)) { in usb_dmac_desc_get()
420 unsigned int sg_len, enum dma_transfer_direction dir, in usb_dmac_prep_slave_sg() argument
428 if (!sg_len) { in usb_dmac_prep_slave_sg()
430 "%s: bad parameter: len=%d\n", __func__, sg_len); in usb_dmac_prep_slave_sg()
[all …]
Dshdma-base.c564 struct scatterlist *sgl, unsigned int sg_len, dma_addr_t *addr, in shdma_prep_sg() argument
574 for_each_sg(sgl, sg, sg_len, i) in shdma_prep_sg()
591 for_each_sg(sgl, sg, sg_len, i) { in shdma_prep_sg()
665 struct dma_chan *chan, struct scatterlist *sgl, unsigned int sg_len, in shdma_prep_slave_sg() argument
680 if (slave_id < 0 || !sg_len) { in shdma_prep_slave_sg()
682 __func__, sg_len, slave_id); in shdma_prep_slave_sg()
688 return shdma_prep_sg(schan, sgl, sg_len, &slave_addr, in shdma_prep_slave_sg()
703 unsigned int sg_len = buf_len / period_len; in shdma_prep_dma_cyclic() local
714 if (sg_len > SHDMA_MAX_SG_LEN) { in shdma_prep_dma_cyclic()
716 sg_len, SHDMA_MAX_SG_LEN); in shdma_prep_dma_cyclic()
[all …]
Drcar-dmac.c848 unsigned int sg_len, dma_addr_t dev_addr, in rcar_dmac_chan_prep_sg() argument
879 for_each_sg(sgl, sg, sg_len, i) { in rcar_dmac_chan_prep_sg()
1108 unsigned int sg_len, enum dma_transfer_direction dir, in rcar_dmac_prep_slave_sg() argument
1114 if (rchan->mid_rid < 0 || !sg_len) { in rcar_dmac_prep_slave_sg()
1117 __func__, sg_len, rchan->mid_rid); in rcar_dmac_prep_slave_sg()
1124 return rcar_dmac_chan_prep_sg(rchan, sgl, sg_len, rchan->map.addr, in rcar_dmac_prep_slave_sg()
1138 unsigned int sg_len; in rcar_dmac_prep_dma_cyclic() local
1152 sg_len = buf_len / period_len; in rcar_dmac_prep_dma_cyclic()
1153 if (sg_len > RCAR_DMAC_MAX_SG_LEN) { in rcar_dmac_prep_dma_cyclic()
1156 rchan->index, sg_len, RCAR_DMAC_MAX_SG_LEN); in rcar_dmac_prep_dma_cyclic()
[all …]
/drivers/mmc/host/
Dtmio_mmc_dma.c56 for_each_sg(sg, sg_tmp, host->sg_len, i) { in tmio_mmc_start_dma_rx()
65 if ((!aligned && (host->sg_len > 1 || sg->length > PAGE_SIZE || in tmio_mmc_start_dma_rx()
85 ret = dma_map_sg(chan->device->dev, sg, host->sg_len, DMA_FROM_DEVICE); in tmio_mmc_start_dma_rx()
126 for_each_sg(sg, sg_tmp, host->sg_len, i) { in tmio_mmc_start_dma_tx()
135 if ((!aligned && (host->sg_len > 1 || sg->length > PAGE_SIZE || in tmio_mmc_start_dma_tx()
159 ret = dma_map_sg(chan->device->dev, sg, host->sg_len, DMA_TO_DEVICE); in tmio_mmc_start_dma_tx()
235 host->sg_ptr, host->sg_len, in tmio_mmc_tasklet_fn()
239 host->sg_ptr, host->sg_len, in tmio_mmc_tasklet_fn()
Dandroid-goldfish.c127 unsigned int sg_len; member
229 dma_unmap_sg(mmc_dev(host->mmc), data->sg, host->sg_len, in goldfish_mmc_xfer_done()
234 host->sg_len = 0; in goldfish_mmc_xfer_done()
371 unsigned sg_len; in goldfish_mmc_prepare_data() local
391 sg_len = (data->blocks == 1) ? 1 : data->sg_len; in goldfish_mmc_prepare_data()
398 host->sg_len = dma_map_sg(mmc_dev(host->mmc), data->sg, in goldfish_mmc_prepare_data()
399 sg_len, dma_data_dir); in goldfish_mmc_prepare_data()
Dau1xmmc.c353 dma_unmap_sg(mmc_dev(host->mmc), data->sg, data->sg_len, host->dma.dir); in au1xmmc_data_complete()
396 int sg_len, max, count; in au1xmmc_send_pio() local
411 sg_len = data->sg[host->pio.index].length - host->pio.offset; in au1xmmc_send_pio()
414 max = (sg_len > host->pio.len) ? host->pio.len : sg_len; in au1xmmc_send_pio()
433 if (count == sg_len) { in au1xmmc_send_pio()
451 int max, count, sg_len = 0; in au1xmmc_receive_pio() local
468 sg_len = sg_dma_len(&data->sg[host->pio.index]) - host->pio.offset; in au1xmmc_receive_pio()
471 if (sg_len < max) in au1xmmc_receive_pio()
472 max = sg_len; in au1xmmc_receive_pio()
510 if (sg_len && count == sg_len) { in au1xmmc_receive_pio()
[all …]
Djz4740_mmc.c118 int sg_len; member
153 int sg_len; member
220 dma_unmap_sg(chan->device->dev, data->sg, data->sg_len, dir); in jz4740_mmc_dma_unmap()
231 int sg_len; in jz4740_mmc_prepare_dma_data() local
245 sg_len = dma_map_sg(chan->device->dev, in jz4740_mmc_prepare_dma_data()
247 data->sg_len, in jz4740_mmc_prepare_dma_data()
251 sg_len = next_data->sg_len; in jz4740_mmc_prepare_dma_data()
252 next_data->sg_len = 0; in jz4740_mmc_prepare_dma_data()
255 if (sg_len <= 0) { in jz4740_mmc_prepare_dma_data()
262 next->sg_len = sg_len; in jz4740_mmc_prepare_dma_data()
[all …]
Dmxs-mmc.c158 data->sg_len, ssp->dma_dir); in mxs_mmc_request_done()
231 unsigned int sg_len; in mxs_mmc_prep_dma() local
236 data->sg_len, ssp->dma_dir); in mxs_mmc_prep_dma()
238 sg_len = data->sg_len; in mxs_mmc_prep_dma()
242 sg_len = SSP_PIO_NUM; in mxs_mmc_prep_dma()
246 sgl, sg_len, ssp->slave_dirn, flags); in mxs_mmc_prep_dma()
253 data->sg_len, ssp->dma_dir); in mxs_mmc_prep_dma()
360 unsigned int sg_len = data->sg_len; in mxs_mmc_adtc() local
405 for_each_sg(sgl, sg, sg_len, i) in mxs_mmc_adtc()
Dtifm_sd.c106 int sg_len; member
175 if (host->sg_pos == host->sg_len) in tifm_sd_transfer_data()
182 if (host->sg_pos == host->sg_len) { in tifm_sd_transfer_data()
238 if (host->sg_pos == host->sg_len) in tifm_sd_bounce_block()
271 if (host->sg_pos == host->sg_len) in tifm_sd_set_dma_data()
279 if (host->sg_pos == host->sg_len) in tifm_sd_set_dma_data()
287 if (host->sg_pos == host->sg_len) in tifm_sd_set_dma_data()
666 host->sg_len = r_data->sg_len; in tifm_sd_request()
680 host->sg_len = tifm_map_sg(sock, r_data->sg, in tifm_sd_request()
681 r_data->sg_len, in tifm_sd_request()
[all …]
Domap.c148 unsigned int sg_len; member
426 dma_unmap_sg(dev, data->sg, host->sg_len, dma_data_dir); in mmc_omap_release_dma()
450 host->sg_len = 0; in mmc_omap_xfer_done()
507 host->sg_len = 0; in mmc_omap_abort_xfer()
672 BUG_ON(host->sg_idx == host->sg_len); in mmc_omap_xfer_data()
951 unsigned sg_len; in mmc_omap_prepare_data() local
972 sg_len = (data->blocks == 1) ? 1 : data->sg_len; in mmc_omap_prepare_data()
975 for_each_sg(data->sg, sg, sg_len, i) { in mmc_omap_prepare_data()
1036 host->sg_len = dma_map_sg(c->device->dev, data->sg, sg_len, in mmc_omap_prepare_data()
1038 if (host->sg_len == 0) in mmc_omap_prepare_data()
[all …]
Ddw_mmc.c416 data->sg_len, in dw_mci_dma_cleanup()
457 data->sg_len, in dw_mci_dmac_complete_dma()
552 unsigned int sg_len) in dw_mci_prepare_desc64() argument
561 for (i = 0; i < sg_len; i++) { in dw_mci_prepare_desc64()
626 unsigned int sg_len) in dw_mci_prepare_desc32() argument
635 for (i = 0; i < sg_len; i++) { in dw_mci_prepare_desc32()
699 static int dw_mci_idmac_start_dma(struct dw_mci *host, unsigned int sg_len) in dw_mci_idmac_start_dma() argument
705 ret = dw_mci_prepare_desc64(host, host->data, sg_len); in dw_mci_idmac_start_dma()
707 ret = dw_mci_prepare_desc32(host, host->data, sg_len); in dw_mci_idmac_start_dma()
753 unsigned int sg_len) in dw_mci_edmac_start_dma() argument
[all …]
Datmel-mci.c318 unsigned int sg_len; member
956 data->sg, data->sg_len, in atmci_pdc_cleanup()
978 sg_copy_from_buffer(host->data->sg, host->data->sg_len, in atmci_pdc_complete()
995 data->sg, data->sg_len, in atmci_dma_cleanup()
1061 host->sg_len = data->sg_len; in atmci_prepare_data()
1097 unsigned int sg_len; in atmci_prepare_data_pdc() local
1126 sg_len = dma_map_sg(&host->pdev->dev, data->sg, data->sg_len, dir); in atmci_prepare_data_pdc()
1130 sg_copy_to_buffer(host->data->sg, host->data->sg_len, in atmci_prepare_data_pdc()
1175 for_each_sg(data->sg, sg, data->sg_len, i) { in atmci_prepare_data_dma()
1205 data->sg_len, direction); in atmci_prepare_data_dma()
[all …]
Ddavinci_mmc.c211 unsigned int sg_len; member
431 host->sg_len, in mmc_davinci_send_dma_request()
453 host->sg_len, in mmc_davinci_send_dma_request()
478 host->sg_len = dma_map_sg(mmc_dev(host->mmc), data->sg, data->sg_len, in mmc_davinci_start_dma_transfer()
484 for (i = 0; i < host->sg_len; i++) { in mmc_davinci_start_dma_transfer()
487 data->sg, data->sg_len, in mmc_davinci_start_dma_transfer()
595 host->sg_len = data->sg_len; in mmc_davinci_prepare_data()
802 dma_unmap_sg(mmc_dev(host->mmc), data->sg, data->sg_len, in mmc_davinci_xfer_done()
Dmxcmmc.c294 for_each_sg(data->sg, sg, data->sg_len, i) in mxcmci_swap_buffers()
320 for_each_sg(data->sg, sg, data->sg_len, i) { in mxcmci_setup_data()
338 data->sg_len, host->dma_dir); in mxcmci_setup_data()
339 if (nents != data->sg_len) in mxcmci_setup_data()
343 data->sg, data->sg_len, slave_dirn, in mxcmci_setup_data()
347 dma_unmap_sg(host->dma->device->dev, data->sg, data->sg_len, in mxcmci_setup_data()
457 dma_unmap_sg(host->dma->device->dev, data->sg, data->sg_len, in mxcmci_finish_data()
618 for_each_sg(data->sg, sg, data->sg_len, i) { in mxcmci_transfer_data()
625 for_each_sg(data->sg, sg, data->sg_len, i) { in mxcmci_transfer_data()
Dsh_mmcif.c308 ret = dma_map_sg(chan->device->dev, sg, data->sg_len, in sh_mmcif_start_dma_rx()
324 __func__, data->sg_len, ret, cookie); in sh_mmcif_start_dma_rx()
345 desc, cookie, data->sg_len); in sh_mmcif_start_dma_rx()
358 ret = dma_map_sg(chan->device->dev, sg, data->sg_len, in sh_mmcif_start_dma_tx()
374 __func__, data->sg_len, ret, cookie); in sh_mmcif_start_dma_tx()
620 if (++host->sg_idx < data->sg_len) in sh_mmcif_next_block()
626 return host->sg_idx != data->sg_len; in sh_mmcif_next_block()
669 if (!data->sg_len || !data->sg->length) in sh_mmcif_multi_read()
749 if (!data->sg_len || !data->sg->length) in sh_mmcif_multi_write()
1162 data->sg, data->sg_len, in sh_mmcif_end_cmd()
[all …]
/drivers/dma/
Dfsl-edma.c513 int sg_len) in fsl_edma_alloc_desc() argument
518 fsl_desc = kzalloc(sizeof(*fsl_desc) + sizeof(struct fsl_edma_sw_tcd) * sg_len, in fsl_edma_alloc_desc()
524 fsl_desc->n_tcds = sg_len; in fsl_edma_alloc_desc()
525 for (i = 0; i < sg_len; i++) { in fsl_edma_alloc_desc()
549 int sg_len, i; in fsl_edma_prep_dma_cyclic() local
556 sg_len = buf_len / period_len; in fsl_edma_prep_dma_cyclic()
557 fsl_desc = fsl_edma_alloc_desc(fsl_chan, sg_len); in fsl_edma_prep_dma_cyclic()
566 for (i = 0; i < sg_len; i++) { in fsl_edma_prep_dma_cyclic()
571 last_sg = fsl_desc->tcd[(i + 1) % sg_len].ptcd; in fsl_edma_prep_dma_cyclic()
596 unsigned int sg_len, enum dma_transfer_direction direction, in fsl_edma_prep_slave_sg() argument
[all …]
Dste_dma40_ll.c266 int sg_len, in d40_phy_sg_to_lli() argument
284 for_each_sg(sg, current_sg, sg_len, i) { in d40_phy_sg_to_lli()
291 if (i == sg_len - 1) in d40_phy_sg_to_lli()
418 int sg_len, in d40_log_sg_to_lli() argument
433 for_each_sg(sg, current_sg, sg_len, i) { in d40_log_sg_to_lli()
Dmxs-dma.c498 unsigned int sg_len, enum dma_transfer_direction direction, in mxs_dma_prep_slave_sg() argument
513 if (sg_len + (append ? idx : 0) > NUM_CCW) { in mxs_dma_prep_slave_sg()
516 sg_len, NUM_CCW); in mxs_dma_prep_slave_sg()
542 for (j = 0; j < sg_len;) in mxs_dma_prep_slave_sg()
552 ccw->bits |= BF_CCW(sg_len, PIO_NUM); in mxs_dma_prep_slave_sg()
555 for_each_sg(sgl, sg, sg_len, i) { in mxs_dma_prep_slave_sg()
576 if (i + 1 == sg_len) { in mxs_dma_prep_slave_sg()
Dbcm2835-dma.c273 unsigned int sg_len) in bcm2835_dma_count_frames_for_sg() argument
280 for_each_sg(sgl, sgent, sg_len, i) in bcm2835_dma_count_frames_for_sg()
396 unsigned int sg_len) in bcm2835_dma_fill_cb_chain_with_sg() argument
405 for_each_sg(sgl, sgent, sg_len, i) { in bcm2835_dma_fill_cb_chain_with_sg()
650 struct scatterlist *sgl, unsigned int sg_len, in bcm2835_dma_prep_slave_sg() argument
683 frames = bcm2835_dma_count_frames_for_sg(c, sgl, sg_len); in bcm2835_dma_prep_slave_sg()
695 sgl, sg_len); in bcm2835_dma_prep_slave_sg()
/drivers/mmc/core/
Dsdio_ops.c161 data.sg_len = nents; in mmc_io_rw_extended()
163 for_each_sg(data.sg, sg_ptr, data.sg_len, i) { in mmc_io_rw_extended()
171 data.sg_len = 1; in mmc_io_rw_extended()
Dsd_ops.c280 data.sg_len = 1; in mmc_app_send_scr()
331 data.sg_len = 1; in mmc_sd_switch()
376 data.sg_len = 1; in mmc_app_sd_status()
/drivers/crypto/nx/
Dnx.c96 unsigned int sg_len = 0; in nx_build_sg_list() local
121 for (sg = sg_head; sg_len < *len; sg++) { in nx_build_sg_list()
130 sg_len += sg->len; in nx_build_sg_list()
133 is_vmalloc_addr(start_addr + sg_len)) { in nx_build_sg_list()
135 start_addr + sg_len)); in nx_build_sg_list()
136 end_addr = sg_addr + *len - sg_len; in nx_build_sg_list()
146 *len = sg_len; in nx_build_sg_list()
/drivers/rapidio/devices/
Dtsi721_dma.c465 for_each_sg(desc->sg, sg, desc->sg_len, i) { in tsi721_submit_sg()
468 bdma_chan->id, i, desc->sg_len, in tsi721_submit_sg()
501 desc->sg_len -= i; in tsi721_submit_sg()
531 desc->sg_len = 0; in tsi721_submit_sg()
676 if (desc->sg_len == 0) { in tsi721_dma_tasklet()
842 struct scatterlist *sgl, unsigned int sg_len, in tsi721_prep_rio_sg() argument
852 if (!sgl || !sg_len) { in tsi721_prep_rio_sg()
893 desc->sg_len = sg_len; in tsi721_prep_rio_sg()

123456