Lines Matching refs:sg_req
195 struct stm32_dma_sg_req sg_req[]; member
544 struct stm32_dma_sg_req *sg_req; in stm32_dma_start_transfer() local
567 sg_req = &chan->desc->sg_req[chan->next_sg]; in stm32_dma_start_transfer()
568 reg = &sg_req->chan_reg; in stm32_dma_start_transfer()
602 struct stm32_dma_sg_req *sg_req; in stm32_dma_configure_next_sg() local
612 sg_req = &chan->desc->sg_req[chan->next_sg]; in stm32_dma_configure_next_sg()
615 dma_sm0ar = sg_req->chan_reg.dma_sm0ar; in stm32_dma_configure_next_sg()
620 dma_sm1ar = sg_req->chan_reg.dma_sm1ar; in stm32_dma_configure_next_sg()
888 desc = kzalloc(struct_size(desc, sg_req, sg_len), GFP_NOWAIT); in stm32_dma_prep_slave_sg()
905 desc->sg_req[i].len = sg_dma_len(sg); in stm32_dma_prep_slave_sg()
907 nb_data_items = desc->sg_req[i].len / buswidth; in stm32_dma_prep_slave_sg()
913 stm32_dma_clear_reg(&desc->sg_req[i].chan_reg); in stm32_dma_prep_slave_sg()
914 desc->sg_req[i].chan_reg.dma_scr = chan->chan_reg.dma_scr; in stm32_dma_prep_slave_sg()
915 desc->sg_req[i].chan_reg.dma_sfcr = chan->chan_reg.dma_sfcr; in stm32_dma_prep_slave_sg()
916 desc->sg_req[i].chan_reg.dma_spar = chan->chan_reg.dma_spar; in stm32_dma_prep_slave_sg()
917 desc->sg_req[i].chan_reg.dma_sm0ar = sg_dma_address(sg); in stm32_dma_prep_slave_sg()
918 desc->sg_req[i].chan_reg.dma_sm1ar = sg_dma_address(sg); in stm32_dma_prep_slave_sg()
919 desc->sg_req[i].chan_reg.dma_sndtr = nb_data_items; in stm32_dma_prep_slave_sg()
991 desc = kzalloc(struct_size(desc, sg_req, num_periods), GFP_NOWAIT); in stm32_dma_prep_dma_cyclic()
996 desc->sg_req[i].len = period_len; in stm32_dma_prep_dma_cyclic()
998 stm32_dma_clear_reg(&desc->sg_req[i].chan_reg); in stm32_dma_prep_dma_cyclic()
999 desc->sg_req[i].chan_reg.dma_scr = chan->chan_reg.dma_scr; in stm32_dma_prep_dma_cyclic()
1000 desc->sg_req[i].chan_reg.dma_sfcr = chan->chan_reg.dma_sfcr; in stm32_dma_prep_dma_cyclic()
1001 desc->sg_req[i].chan_reg.dma_spar = chan->chan_reg.dma_spar; in stm32_dma_prep_dma_cyclic()
1002 desc->sg_req[i].chan_reg.dma_sm0ar = buf_addr; in stm32_dma_prep_dma_cyclic()
1003 desc->sg_req[i].chan_reg.dma_sm1ar = buf_addr; in stm32_dma_prep_dma_cyclic()
1004 desc->sg_req[i].chan_reg.dma_sndtr = nb_data_items; in stm32_dma_prep_dma_cyclic()
1026 desc = kzalloc(struct_size(desc, sg_req, num_sgs), GFP_NOWAIT); in stm32_dma_prep_dma_memcpy()
1042 stm32_dma_clear_reg(&desc->sg_req[i].chan_reg); in stm32_dma_prep_dma_memcpy()
1043 desc->sg_req[i].chan_reg.dma_scr = in stm32_dma_prep_dma_memcpy()
1051 desc->sg_req[i].chan_reg.dma_sfcr |= STM32_DMA_SFCR_MASK; in stm32_dma_prep_dma_memcpy()
1052 desc->sg_req[i].chan_reg.dma_sfcr |= in stm32_dma_prep_dma_memcpy()
1054 desc->sg_req[i].chan_reg.dma_spar = src + offset; in stm32_dma_prep_dma_memcpy()
1055 desc->sg_req[i].chan_reg.dma_sm0ar = dest + offset; in stm32_dma_prep_dma_memcpy()
1056 desc->sg_req[i].chan_reg.dma_sndtr = xfer_count; in stm32_dma_prep_dma_memcpy()
1057 desc->sg_req[i].len = xfer_count; in stm32_dma_prep_dma_memcpy()
1093 struct stm32_dma_sg_req *sg_req; in stm32_dma_is_current_sg() local
1102 sg_req = &chan->desc->sg_req[chan->next_sg]; in stm32_dma_is_current_sg()
1106 return (dma_smar == sg_req->chan_reg.dma_sm0ar); in stm32_dma_is_current_sg()
1111 return (dma_smar == sg_req->chan_reg.dma_sm1ar); in stm32_dma_is_current_sg()
1121 struct stm32_dma_sg_req *sg_req = &chan->desc->sg_req[chan->next_sg]; in stm32_dma_desc_residue() local
1155 residue = sg_req->len; in stm32_dma_desc_residue()
1167 residue += desc->sg_req[i].len; in stm32_dma_desc_residue()