Lines Matching refs:sg
184 struct scatterlist *sg; member
758 buf_size = sg_dma_len(host->sg); in atmci_pdc_set_single_buf()
759 atmci_writel(host, pointer_reg, sg_dma_address(host->sg)); in atmci_pdc_set_single_buf()
774 atmci_writel(host, counter_reg, sg_dma_len(host->sg) / 4); in atmci_pdc_set_single_buf()
775 host->data_size -= sg_dma_len(host->sg); in atmci_pdc_set_single_buf()
777 host->sg = sg_next(host->sg); in atmci_pdc_set_single_buf()
802 data->sg, data->sg_len, in atmci_pdc_cleanup()
824 sg_copy_from_buffer(host->data->sg, host->data->sg_len, in atmci_pdc_complete()
841 data->sg, data->sg_len, in atmci_dma_cleanup()
906 host->sg = data->sg; in atmci_prepare_data()
950 host->sg = data->sg; in atmci_prepare_data_pdc()
972 sg_len = dma_map_sg(&host->pdev->dev, data->sg, data->sg_len, dir); in atmci_prepare_data_pdc()
976 sg_copy_to_buffer(host->data->sg, host->data->sg_len, in atmci_prepare_data_pdc()
995 struct scatterlist *sg; in atmci_prepare_data_dma() local
1006 host->sg = NULL; in atmci_prepare_data_dma()
1021 for_each_sg(data->sg, sg, data->sg_len, i) { in atmci_prepare_data_dma()
1022 if (sg->offset & 3 || sg->length & 3) in atmci_prepare_data_dma()
1048 sglen = dma_map_sg(chan->device->dev, data->sg, in atmci_prepare_data_dma()
1053 data->sg, sglen, slave_dirn, in atmci_prepare_data_dma()
1064 dma_unmap_sg(chan->device->dev, data->sg, data->sg_len, direction); in atmci_prepare_data_dma()
1855 struct scatterlist *sg = host->sg; in atmci_read_data_pio() local
1856 void *buf = sg_virt(sg); in atmci_read_data_pio()
1865 if (likely(offset + 4 <= sg->length)) { in atmci_read_data_pio()
1871 if (offset == sg->length) { in atmci_read_data_pio()
1872 flush_dcache_page(sg_page(sg)); in atmci_read_data_pio()
1873 host->sg = sg = sg_next(sg); in atmci_read_data_pio()
1875 if (!sg || !host->sg_len) in atmci_read_data_pio()
1879 buf = sg_virt(sg); in atmci_read_data_pio()
1882 unsigned int remaining = sg->length - offset; in atmci_read_data_pio()
1886 flush_dcache_page(sg_page(sg)); in atmci_read_data_pio()
1887 host->sg = sg = sg_next(sg); in atmci_read_data_pio()
1889 if (!sg || !host->sg_len) in atmci_read_data_pio()
1893 buf = sg_virt(sg); in atmci_read_data_pio()
1923 struct scatterlist *sg = host->sg; in atmci_write_data_pio() local
1924 void *buf = sg_virt(sg); in atmci_write_data_pio()
1932 if (likely(offset + 4 <= sg->length)) { in atmci_write_data_pio()
1938 if (offset == sg->length) { in atmci_write_data_pio()
1939 host->sg = sg = sg_next(sg); in atmci_write_data_pio()
1941 if (!sg || !host->sg_len) in atmci_write_data_pio()
1945 buf = sg_virt(sg); in atmci_write_data_pio()
1948 unsigned int remaining = sg->length - offset; in atmci_write_data_pio()
1954 host->sg = sg = sg_next(sg); in atmci_write_data_pio()
1956 if (!sg || !host->sg_len) { in atmci_write_data_pio()
1962 buf = sg_virt(sg); in atmci_write_data_pio()