Lines Matching refs:sg

185 	struct scatterlist	*sg;  member
759 buf_size = sg_dma_len(host->sg); in atmci_pdc_set_single_buf()
760 atmci_writel(host, pointer_reg, sg_dma_address(host->sg)); in atmci_pdc_set_single_buf()
775 atmci_writel(host, counter_reg, sg_dma_len(host->sg) / 4); in atmci_pdc_set_single_buf()
776 host->data_size -= sg_dma_len(host->sg); in atmci_pdc_set_single_buf()
778 host->sg = sg_next(host->sg); in atmci_pdc_set_single_buf()
803 data->sg, data->sg_len, in atmci_pdc_cleanup()
825 sg_copy_from_buffer(host->data->sg, host->data->sg_len, in atmci_pdc_complete()
842 data->sg, data->sg_len, in atmci_dma_cleanup()
907 host->sg = data->sg; in atmci_prepare_data()
951 host->sg = data->sg; in atmci_prepare_data_pdc()
973 sg_len = dma_map_sg(&host->pdev->dev, data->sg, data->sg_len, dir); in atmci_prepare_data_pdc()
977 sg_copy_to_buffer(host->data->sg, host->data->sg_len, in atmci_prepare_data_pdc()
996 struct scatterlist *sg; in atmci_prepare_data_dma() local
1007 host->sg = NULL; in atmci_prepare_data_dma()
1022 for_each_sg(data->sg, sg, data->sg_len, i) { in atmci_prepare_data_dma()
1023 if (sg->offset & 3 || sg->length & 3) in atmci_prepare_data_dma()
1049 sglen = dma_map_sg(chan->device->dev, data->sg, in atmci_prepare_data_dma()
1054 data->sg, sglen, slave_dirn, in atmci_prepare_data_dma()
1065 dma_unmap_sg(chan->device->dev, data->sg, data->sg_len, direction); in atmci_prepare_data_dma()
1856 struct scatterlist *sg = host->sg; in atmci_read_data_pio() local
1857 void *buf = sg_virt(sg); in atmci_read_data_pio()
1866 if (likely(offset + 4 <= sg->length)) { in atmci_read_data_pio()
1872 if (offset == sg->length) { in atmci_read_data_pio()
1873 flush_dcache_page(sg_page(sg)); in atmci_read_data_pio()
1874 host->sg = sg = sg_next(sg); in atmci_read_data_pio()
1876 if (!sg || !host->sg_len) in atmci_read_data_pio()
1880 buf = sg_virt(sg); in atmci_read_data_pio()
1883 unsigned int remaining = sg->length - offset; in atmci_read_data_pio()
1887 flush_dcache_page(sg_page(sg)); in atmci_read_data_pio()
1888 host->sg = sg = sg_next(sg); in atmci_read_data_pio()
1890 if (!sg || !host->sg_len) in atmci_read_data_pio()
1894 buf = sg_virt(sg); in atmci_read_data_pio()
1924 struct scatterlist *sg = host->sg; in atmci_write_data_pio() local
1925 void *buf = sg_virt(sg); in atmci_write_data_pio()
1933 if (likely(offset + 4 <= sg->length)) { in atmci_write_data_pio()
1939 if (offset == sg->length) { in atmci_write_data_pio()
1940 host->sg = sg = sg_next(sg); in atmci_write_data_pio()
1942 if (!sg || !host->sg_len) in atmci_write_data_pio()
1946 buf = sg_virt(sg); in atmci_write_data_pio()
1949 unsigned int remaining = sg->length - offset; in atmci_write_data_pio()
1955 host->sg = sg = sg_next(sg); in atmci_write_data_pio()
1957 if (!sg || !host->sg_len) { in atmci_write_data_pio()
1963 buf = sg_virt(sg); in atmci_write_data_pio()