Lines Matching defs:sg_req
317 struct tegra_dma_sg_req *sg_req;
322 sg_req = list_first_entry(&tdc->free_sg_req, typeof(*sg_req),
324 list_del(&sg_req->node);
326 return sg_req;
330 sg_req = kzalloc(sizeof(*sg_req), GFP_NOWAIT);
332 return sg_req;
440 struct tegra_dma_sg_req *sg_req)
442 struct tegra_dma_channel_regs *ch_regs = &sg_req->ch_regs;
503 struct tegra_dma_sg_req *sg_req;
505 sg_req = list_first_entry(&tdc->pending_sg_req, typeof(*sg_req), node);
506 tegra_dma_start(tdc, sg_req);
507 sg_req->configured = true;
508 sg_req->words_xferred = 0;
526 struct tegra_dma_sg_req *sg_req,
529 return sg_req->req_len - (status & TEGRA_APBDMA_STATUS_COUNT_MASK) - 4;
840 struct tegra_dma_sg_req *sg_req)
844 if (!list_is_first(&sg_req->node, &tdc->pending_sg_req))
856 return sg_req->req_len;
858 wcount = get_current_xferred_count(tdc, sg_req, wcount);
875 if (sg_req->words_xferred)
876 wcount = sg_req->req_len - 4;
878 } else if (wcount < sg_req->words_xferred) {
890 wcount = sg_req->req_len - 4;
892 sg_req->words_xferred = wcount;
904 struct tegra_dma_sg_req *sg_req;
925 list_for_each_entry(sg_req, &tdc->pending_sg_req, node) {
926 dma_desc = sg_req->dma_desc;
928 bytes = tegra_dma_sg_bytes_xferred(tdc, sg_req);
1055 struct tegra_dma_sg_req *sg_req = NULL;
1127 sg_req = tegra_dma_sg_req_get(tdc);
1128 if (!sg_req) {
1137 sg_req->ch_regs.apb_ptr = apb_ptr;
1138 sg_req->ch_regs.ahb_ptr = mem;
1139 sg_req->ch_regs.csr = csr;
1140 tegra_dma_prep_wcount(tdc, &sg_req->ch_regs, len);
1141 sg_req->ch_regs.apb_seq = apb_seq;
1142 sg_req->ch_regs.ahb_seq = ahb_seq;
1143 sg_req->configured = false;
1144 sg_req->last_sg = false;
1145 sg_req->dma_desc = dma_desc;
1146 sg_req->req_len = len;
1148 list_add_tail(&sg_req->node, &dma_desc->tx_list);
1150 sg_req->last_sg = true;
1180 struct tegra_dma_sg_req *sg_req = NULL;
1264 sg_req = tegra_dma_sg_req_get(tdc);
1265 if (!sg_req) {
1272 sg_req->ch_regs.apb_ptr = apb_ptr;
1273 sg_req->ch_regs.ahb_ptr = mem;
1274 sg_req->ch_regs.csr = csr;
1275 tegra_dma_prep_wcount(tdc, &sg_req->ch_regs, len);
1276 sg_req->ch_regs.apb_seq = apb_seq;
1277 sg_req->ch_regs.ahb_seq = ahb_seq;
1278 sg_req->configured = false;
1279 sg_req->last_sg = false;
1280 sg_req->dma_desc = dma_desc;
1281 sg_req->req_len = len;
1283 list_add_tail(&sg_req->node, &dma_desc->tx_list);
1287 sg_req->last_sg = true;
1322 struct tegra_dma_sg_req *sg_req;
1349 sg_req = list_first_entry(&sg_req_list, typeof(*sg_req), node);
1350 list_del(&sg_req->node);
1351 kfree(sg_req);