Lines Matching refs:sg
931 struct scatterlist *sg; in pch_spi_handle_dma() local
1018 sg = dma->sg_rx_p; in pch_spi_handle_dma()
1019 for (i = 0; i < num; i++, sg++) { in pch_spi_handle_dma()
1021 sg->offset = size * i; in pch_spi_handle_dma()
1022 sg->offset = sg->offset * (*bpw / 8); in pch_spi_handle_dma()
1023 sg_set_page(sg, virt_to_page(dma->rx_buf_virt), rem, in pch_spi_handle_dma()
1024 sg->offset); in pch_spi_handle_dma()
1025 sg_dma_len(sg) = rem; in pch_spi_handle_dma()
1027 sg->offset = size * (i - 1) + rem; in pch_spi_handle_dma()
1028 sg->offset = sg->offset * (*bpw / 8); in pch_spi_handle_dma()
1029 sg_set_page(sg, virt_to_page(dma->rx_buf_virt), size, in pch_spi_handle_dma()
1030 sg->offset); in pch_spi_handle_dma()
1031 sg_dma_len(sg) = size; in pch_spi_handle_dma()
1033 sg->offset = size * i; in pch_spi_handle_dma()
1034 sg->offset = sg->offset * (*bpw / 8); in pch_spi_handle_dma()
1035 sg_set_page(sg, virt_to_page(dma->rx_buf_virt), size, in pch_spi_handle_dma()
1036 sg->offset); in pch_spi_handle_dma()
1037 sg_dma_len(sg) = size; in pch_spi_handle_dma()
1039 sg_dma_address(sg) = dma->rx_buf_dma + sg->offset; in pch_spi_handle_dma()
1041 sg = dma->sg_rx_p; in pch_spi_handle_dma()
1042 desc_rx = dmaengine_prep_slave_sg(dma->chan_rx, sg, in pch_spi_handle_dma()
1050 dma_sync_sg_for_device(&data->master->dev, sg, num, DMA_FROM_DEVICE); in pch_spi_handle_dma()
1078 sg = dma->sg_tx_p; in pch_spi_handle_dma()
1079 for (i = 0; i < num; i++, sg++) { in pch_spi_handle_dma()
1081 sg->offset = 0; in pch_spi_handle_dma()
1082 sg_set_page(sg, virt_to_page(dma->tx_buf_virt), size + head, in pch_spi_handle_dma()
1083 sg->offset); in pch_spi_handle_dma()
1084 sg_dma_len(sg) = size + head; in pch_spi_handle_dma()
1086 sg->offset = head + size * i; in pch_spi_handle_dma()
1087 sg->offset = sg->offset * (*bpw / 8); in pch_spi_handle_dma()
1088 sg_set_page(sg, virt_to_page(dma->tx_buf_virt), rem, in pch_spi_handle_dma()
1089 sg->offset); in pch_spi_handle_dma()
1090 sg_dma_len(sg) = rem; in pch_spi_handle_dma()
1092 sg->offset = head + size * i; in pch_spi_handle_dma()
1093 sg->offset = sg->offset * (*bpw / 8); in pch_spi_handle_dma()
1094 sg_set_page(sg, virt_to_page(dma->tx_buf_virt), size, in pch_spi_handle_dma()
1095 sg->offset); in pch_spi_handle_dma()
1096 sg_dma_len(sg) = size; in pch_spi_handle_dma()
1098 sg_dma_address(sg) = dma->tx_buf_dma + sg->offset; in pch_spi_handle_dma()
1100 sg = dma->sg_tx_p; in pch_spi_handle_dma()
1102 sg, num, DMA_MEM_TO_DEV, in pch_spi_handle_dma()
1109 dma_sync_sg_for_device(&data->master->dev, sg, num, DMA_TO_DEVICE); in pch_spi_handle_dma()