Lines Matching defs:sg_req

311 	struct tegra_dma_sg_req *sg_req;
316 sg_req = list_first_entry(&tdc->free_sg_req, typeof(*sg_req),
318 list_del(&sg_req->node);
320 return sg_req;
324 sg_req = kzalloc(sizeof(*sg_req), GFP_NOWAIT);
326 return sg_req;
428 struct tegra_dma_sg_req *sg_req)
430 struct tegra_dma_channel_regs *ch_regs = &sg_req->ch_regs;
491 struct tegra_dma_sg_req *sg_req;
493 sg_req = list_first_entry(&tdc->pending_sg_req, typeof(*sg_req), node);
494 tegra_dma_start(tdc, sg_req);
495 sg_req->configured = true;
496 sg_req->words_xferred = 0;
514 struct tegra_dma_sg_req *sg_req,
517 return sg_req->req_len - (status & TEGRA_APBDMA_STATUS_COUNT_MASK) - 4;
828 struct tegra_dma_sg_req *sg_req)
832 if (!list_is_first(&sg_req->node, &tdc->pending_sg_req))
844 return sg_req->req_len;
846 wcount = get_current_xferred_count(tdc, sg_req, wcount);
863 if (sg_req->words_xferred)
864 wcount = sg_req->req_len - 4;
866 } else if (wcount < sg_req->words_xferred) {
878 wcount = sg_req->req_len - 4;
880 sg_req->words_xferred = wcount;
892 struct tegra_dma_sg_req *sg_req;
913 list_for_each_entry(sg_req, &tdc->pending_sg_req, node) {
914 dma_desc = sg_req->dma_desc;
916 bytes = tegra_dma_sg_bytes_xferred(tdc, sg_req);
1043 struct tegra_dma_sg_req *sg_req = NULL;
1115 sg_req = tegra_dma_sg_req_get(tdc);
1116 if (!sg_req) {
1125 sg_req->ch_regs.apb_ptr = apb_ptr;
1126 sg_req->ch_regs.ahb_ptr = mem;
1127 sg_req->ch_regs.csr = csr;
1128 tegra_dma_prep_wcount(tdc, &sg_req->ch_regs, len);
1129 sg_req->ch_regs.apb_seq = apb_seq;
1130 sg_req->ch_regs.ahb_seq = ahb_seq;
1131 sg_req->configured = false;
1132 sg_req->last_sg = false;
1133 sg_req->dma_desc = dma_desc;
1134 sg_req->req_len = len;
1136 list_add_tail(&sg_req->node, &dma_desc->tx_list);
1138 sg_req->last_sg = true;
1168 struct tegra_dma_sg_req *sg_req = NULL;
1252 sg_req = tegra_dma_sg_req_get(tdc);
1253 if (!sg_req) {
1260 sg_req->ch_regs.apb_ptr = apb_ptr;
1261 sg_req->ch_regs.ahb_ptr = mem;
1262 sg_req->ch_regs.csr = csr;
1263 tegra_dma_prep_wcount(tdc, &sg_req->ch_regs, len);
1264 sg_req->ch_regs.apb_seq = apb_seq;
1265 sg_req->ch_regs.ahb_seq = ahb_seq;
1266 sg_req->configured = false;
1267 sg_req->last_sg = false;
1268 sg_req->dma_desc = dma_desc;
1269 sg_req->req_len = len;
1271 list_add_tail(&sg_req->node, &dma_desc->tx_list);
1275 sg_req->last_sg = true;
1310 struct tegra_dma_sg_req *sg_req;
1337 sg_req = list_first_entry(&sg_req_list, typeof(*sg_req), node);
1338 list_del(&sg_req->node);
1339 kfree(sg_req);