Lines Matching refs:sg
49 struct scatterlist *sg = host->sg_ptr, *sg_tmp; in tmio_mmc_start_dma_rx() local
57 for_each_sg(sg, sg_tmp, host->sg_len, i) { in tmio_mmc_start_dma_rx()
66 if ((!aligned && (host->sg_len > 1 || sg->length > PAGE_CACHE_SIZE || in tmio_mmc_start_dma_rx()
72 if (sg->length < TMIO_MMC_MIN_DMA_LEN) { in tmio_mmc_start_dma_rx()
81 sg_init_one(&host->bounce_sg, host->bounce_buf, sg->length); in tmio_mmc_start_dma_rx()
83 sg = host->sg_ptr; in tmio_mmc_start_dma_rx()
86 ret = dma_map_sg(chan->device->dev, sg, host->sg_len, DMA_FROM_DEVICE); in tmio_mmc_start_dma_rx()
88 desc = dmaengine_prep_slave_sg(chan, sg, ret, in tmio_mmc_start_dma_rx()
125 struct scatterlist *sg = host->sg_ptr, *sg_tmp; in tmio_mmc_start_dma_tx() local
133 for_each_sg(sg, sg_tmp, host->sg_len, i) { in tmio_mmc_start_dma_tx()
142 if ((!aligned && (host->sg_len > 1 || sg->length > PAGE_CACHE_SIZE || in tmio_mmc_start_dma_tx()
148 if (sg->length < TMIO_MMC_MIN_DMA_LEN) { in tmio_mmc_start_dma_tx()
158 void *sg_vaddr = tmio_mmc_kmap_atomic(sg, &flags); in tmio_mmc_start_dma_tx()
159 sg_init_one(&host->bounce_sg, host->bounce_buf, sg->length); in tmio_mmc_start_dma_tx()
161 tmio_mmc_kunmap_atomic(sg, &flags, sg_vaddr); in tmio_mmc_start_dma_tx()
163 sg = host->sg_ptr; in tmio_mmc_start_dma_tx()
166 ret = dma_map_sg(chan->device->dev, sg, host->sg_len, DMA_TO_DEVICE); in tmio_mmc_start_dma_tx()
168 desc = dmaengine_prep_slave_sg(chan, sg, ret, in tmio_mmc_start_dma_tx()