atchan 80 drivers/dma/at_hdmac.c static struct at_desc *atc_first_active(struct at_dma_chan *atchan) atchan 82 drivers/dma/at_hdmac.c return list_first_entry(&atchan->active_list, atchan 86 drivers/dma/at_hdmac.c static struct at_desc *atc_first_queued(struct at_dma_chan *atchan) atchan 88 drivers/dma/at_hdmac.c return list_first_entry(&atchan->queue, atchan 126 drivers/dma/at_hdmac.c static struct at_desc *atc_desc_get(struct at_dma_chan *atchan) atchan 133 drivers/dma/at_hdmac.c spin_lock_irqsave(&atchan->lock, flags); atchan 134 drivers/dma/at_hdmac.c list_for_each_entry_safe(desc, _desc, &atchan->free_list, desc_node) { atchan 141 drivers/dma/at_hdmac.c dev_dbg(chan2dev(&atchan->chan_common), atchan 144 drivers/dma/at_hdmac.c spin_unlock_irqrestore(&atchan->lock, flags); atchan 145 drivers/dma/at_hdmac.c dev_vdbg(chan2dev(&atchan->chan_common), atchan 150 drivers/dma/at_hdmac.c ret = atc_alloc_descriptor(&atchan->chan_common, GFP_ATOMIC); atchan 152 drivers/dma/at_hdmac.c spin_lock_irqsave(&atchan->lock, flags); atchan 153 drivers/dma/at_hdmac.c atchan->descs_allocated++; atchan 154 drivers/dma/at_hdmac.c spin_unlock_irqrestore(&atchan->lock, flags); atchan 156 drivers/dma/at_hdmac.c dev_err(chan2dev(&atchan->chan_common), atchan 169 drivers/dma/at_hdmac.c static void atc_desc_put(struct at_dma_chan *atchan, struct at_desc *desc) atchan 175 drivers/dma/at_hdmac.c spin_lock_irqsave(&atchan->lock, flags); atchan 177 drivers/dma/at_hdmac.c dev_vdbg(chan2dev(&atchan->chan_common), atchan 180 drivers/dma/at_hdmac.c list_splice_init(&desc->tx_list, &atchan->free_list); atchan 181 drivers/dma/at_hdmac.c dev_vdbg(chan2dev(&atchan->chan_common), atchan 183 drivers/dma/at_hdmac.c list_add(&desc->desc_node, &atchan->free_list); atchan 184 drivers/dma/at_hdmac.c spin_unlock_irqrestore(&atchan->lock, flags); atchan 218 drivers/dma/at_hdmac.c static void atc_dostart(struct at_dma_chan *atchan, struct at_desc *first) atchan 220 drivers/dma/at_hdmac.c struct at_dma *atdma = to_at_dma(atchan->chan_common.device); atchan 223 drivers/dma/at_hdmac.c if (atc_chan_is_enabled(atchan)) { atchan 224 drivers/dma/at_hdmac.c dev_err(chan2dev(&atchan->chan_common), atchan 226 drivers/dma/at_hdmac.c dev_err(chan2dev(&atchan->chan_common), atchan 228 drivers/dma/at_hdmac.c channel_readl(atchan, SADDR), atchan 229 drivers/dma/at_hdmac.c channel_readl(atchan, DADDR), atchan 230 drivers/dma/at_hdmac.c channel_readl(atchan, CTRLA), atchan 231 drivers/dma/at_hdmac.c channel_readl(atchan, CTRLB), atchan 232 drivers/dma/at_hdmac.c channel_readl(atchan, DSCR)); atchan 238 drivers/dma/at_hdmac.c vdbg_dump_regs(atchan); atchan 240 drivers/dma/at_hdmac.c channel_writel(atchan, SADDR, 0); atchan 241 drivers/dma/at_hdmac.c channel_writel(atchan, DADDR, 0); atchan 242 drivers/dma/at_hdmac.c channel_writel(atchan, CTRLA, 0); atchan 243 drivers/dma/at_hdmac.c channel_writel(atchan, CTRLB, 0); atchan 244 drivers/dma/at_hdmac.c channel_writel(atchan, DSCR, first->txd.phys); atchan 245 drivers/dma/at_hdmac.c channel_writel(atchan, SPIP, ATC_SPIP_HOLE(first->src_hole) | atchan 247 drivers/dma/at_hdmac.c channel_writel(atchan, DPIP, ATC_DPIP_HOLE(first->dst_hole) | atchan 249 drivers/dma/at_hdmac.c dma_writel(atdma, CHER, atchan->mask); atchan 251 drivers/dma/at_hdmac.c vdbg_dump_regs(atchan); atchan 259 drivers/dma/at_hdmac.c static struct at_desc *atc_get_desc_by_cookie(struct at_dma_chan *atchan, atchan 264 drivers/dma/at_hdmac.c list_for_each_entry_safe(desc, _desc, &atchan->queue, desc_node) { atchan 269 drivers/dma/at_hdmac.c list_for_each_entry_safe(desc, _desc, &atchan->active_list, desc_node) { atchan 305 drivers/dma/at_hdmac.c struct at_dma_chan *atchan = to_at_dma_chan(chan); atchan 306 drivers/dma/at_hdmac.c struct at_desc *desc_first = atc_first_active(atchan); atchan 316 drivers/dma/at_hdmac.c desc = atc_get_desc_by_cookie(atchan, cookie); atchan 376 drivers/dma/at_hdmac.c dscr = channel_readl(atchan, DSCR); atchan 378 drivers/dma/at_hdmac.c ctrla = channel_readl(atchan, CTRLA); atchan 383 drivers/dma/at_hdmac.c new_dscr = channel_readl(atchan, DSCR); atchan 403 drivers/dma/at_hdmac.c ctrla = channel_readl(atchan, CTRLA); atchan 427 drivers/dma/at_hdmac.c ctrla = channel_readl(atchan, CTRLA); atchan 441 drivers/dma/at_hdmac.c atc_chain_complete(struct at_dma_chan *atchan, struct at_desc *desc) atchan 444 drivers/dma/at_hdmac.c struct at_dma *atdma = to_at_dma(atchan->chan_common.device); atchan 446 drivers/dma/at_hdmac.c dev_vdbg(chan2dev(&atchan->chan_common), atchan 450 drivers/dma/at_hdmac.c if (!atc_chan_is_cyclic(atchan)) atchan 461 drivers/dma/at_hdmac.c list_splice_init(&desc->tx_list, &atchan->free_list); atchan 463 drivers/dma/at_hdmac.c list_move(&desc->desc_node, &atchan->free_list); atchan 468 drivers/dma/at_hdmac.c if (!atc_chan_is_cyclic(atchan)) { atchan 488 drivers/dma/at_hdmac.c static void atc_complete_all(struct at_dma_chan *atchan) atchan 493 drivers/dma/at_hdmac.c dev_vdbg(chan2dev(&atchan->chan_common), "complete all\n"); atchan 499 drivers/dma/at_hdmac.c if (!list_empty(&atchan->queue)) atchan 500 drivers/dma/at_hdmac.c atc_dostart(atchan, atc_first_queued(atchan)); atchan 502 drivers/dma/at_hdmac.c list_splice_init(&atchan->active_list, &list); atchan 504 drivers/dma/at_hdmac.c list_splice_init(&atchan->queue, &atchan->active_list); atchan 507 drivers/dma/at_hdmac.c atc_chain_complete(atchan, desc); atchan 516 drivers/dma/at_hdmac.c static void atc_advance_work(struct at_dma_chan *atchan) atchan 518 drivers/dma/at_hdmac.c dev_vdbg(chan2dev(&atchan->chan_common), "advance_work\n"); atchan 520 drivers/dma/at_hdmac.c if (atc_chan_is_enabled(atchan)) atchan 523 drivers/dma/at_hdmac.c if (list_empty(&atchan->active_list) || atchan 524 drivers/dma/at_hdmac.c list_is_singular(&atchan->active_list)) { atchan 525 drivers/dma/at_hdmac.c atc_complete_all(atchan); atchan 527 drivers/dma/at_hdmac.c atc_chain_complete(atchan, atc_first_active(atchan)); atchan 529 drivers/dma/at_hdmac.c atc_dostart(atchan, atc_first_active(atchan)); atchan 540 drivers/dma/at_hdmac.c static void atc_handle_error(struct at_dma_chan *atchan) atchan 550 drivers/dma/at_hdmac.c bad_desc = atc_first_active(atchan); atchan 555 drivers/dma/at_hdmac.c list_splice_init(&atchan->queue, atchan->active_list.prev); atchan 558 drivers/dma/at_hdmac.c if (!list_empty(&atchan->active_list)) atchan 559 drivers/dma/at_hdmac.c atc_dostart(atchan, atc_first_active(atchan)); atchan 568 drivers/dma/at_hdmac.c dev_crit(chan2dev(&atchan->chan_common), atchan 570 drivers/dma/at_hdmac.c dev_crit(chan2dev(&atchan->chan_common), atchan 572 drivers/dma/at_hdmac.c atc_dump_lli(atchan, &bad_desc->lli); atchan 574 drivers/dma/at_hdmac.c atc_dump_lli(atchan, &child->lli); atchan 577 drivers/dma/at_hdmac.c atc_chain_complete(atchan, bad_desc); atchan 586 drivers/dma/at_hdmac.c static void atc_handle_cyclic(struct at_dma_chan *atchan) atchan 588 drivers/dma/at_hdmac.c struct at_desc *first = atc_first_active(atchan); atchan 591 drivers/dma/at_hdmac.c dev_vdbg(chan2dev(&atchan->chan_common), atchan 593 drivers/dma/at_hdmac.c channel_readl(atchan, DSCR)); atchan 602 drivers/dma/at_hdmac.c struct at_dma_chan *atchan = (struct at_dma_chan *)data; atchan 605 drivers/dma/at_hdmac.c spin_lock_irqsave(&atchan->lock, flags); atchan 606 drivers/dma/at_hdmac.c if (test_and_clear_bit(ATC_IS_ERROR, &atchan->status)) atchan 607 drivers/dma/at_hdmac.c atc_handle_error(atchan); atchan 608 drivers/dma/at_hdmac.c else if (atc_chan_is_cyclic(atchan)) atchan 609 drivers/dma/at_hdmac.c atc_handle_cyclic(atchan); atchan 611 drivers/dma/at_hdmac.c atc_advance_work(atchan); atchan 613 drivers/dma/at_hdmac.c spin_unlock_irqrestore(&atchan->lock, flags); atchan 619 drivers/dma/at_hdmac.c struct at_dma_chan *atchan; atchan 637 drivers/dma/at_hdmac.c atchan = &atdma->chan[i]; atchan 642 drivers/dma/at_hdmac.c AT_DMA_RES(i) | atchan->mask); atchan 644 drivers/dma/at_hdmac.c set_bit(ATC_IS_ERROR, &atchan->status); atchan 646 drivers/dma/at_hdmac.c tasklet_schedule(&atchan->tasklet); atchan 670 drivers/dma/at_hdmac.c struct at_dma_chan *atchan = to_at_dma_chan(tx->chan); atchan 674 drivers/dma/at_hdmac.c spin_lock_irqsave(&atchan->lock, flags); atchan 677 drivers/dma/at_hdmac.c if (list_empty(&atchan->active_list)) { atchan 680 drivers/dma/at_hdmac.c atc_dostart(atchan, desc); atchan 681 drivers/dma/at_hdmac.c list_add_tail(&desc->desc_node, &atchan->active_list); atchan 685 drivers/dma/at_hdmac.c list_add_tail(&desc->desc_node, &atchan->queue); atchan 688 drivers/dma/at_hdmac.c spin_unlock_irqrestore(&atchan->lock, flags); atchan 704 drivers/dma/at_hdmac.c struct at_dma_chan *atchan = to_at_dma_chan(chan); atchan 765 drivers/dma/at_hdmac.c desc = atc_desc_get(atchan); atchan 804 drivers/dma/at_hdmac.c struct at_dma_chan *atchan = to_at_dma_chan(chan); atchan 841 drivers/dma/at_hdmac.c desc = atc_desc_get(atchan); atchan 868 drivers/dma/at_hdmac.c atc_desc_put(atchan, first); atchan 877 drivers/dma/at_hdmac.c struct at_dma_chan *atchan = to_at_dma_chan(chan); atchan 894 drivers/dma/at_hdmac.c desc = atc_desc_get(atchan); atchan 983 drivers/dma/at_hdmac.c struct at_dma_chan *atchan = to_at_dma_chan(chan); atchan 1050 drivers/dma/at_hdmac.c atc_desc_put(atchan, first); atchan 1068 drivers/dma/at_hdmac.c struct at_dma_chan *atchan = to_at_dma_chan(chan); atchan 1070 drivers/dma/at_hdmac.c struct dma_slave_config *sconfig = &atchan->dma_sconfig; atchan 1103 drivers/dma/at_hdmac.c | ATC_SIF(atchan->mem_if) | ATC_DIF(atchan->per_if); atchan 1110 drivers/dma/at_hdmac.c desc = atc_desc_get(atchan); atchan 1143 drivers/dma/at_hdmac.c | ATC_SIF(atchan->per_if) | ATC_DIF(atchan->mem_if); atchan 1151 drivers/dma/at_hdmac.c desc = atc_desc_get(atchan); atchan 1197 drivers/dma/at_hdmac.c atc_desc_put(atchan, first); atchan 1231 drivers/dma/at_hdmac.c struct at_dma_chan *atchan = to_at_dma_chan(chan); atchan 1232 drivers/dma/at_hdmac.c struct dma_slave_config *sconfig = &atchan->dma_sconfig; atchan 1250 drivers/dma/at_hdmac.c | ATC_SIF(atchan->mem_if) atchan 1251 drivers/dma/at_hdmac.c | ATC_DIF(atchan->per_if); atchan 1262 drivers/dma/at_hdmac.c | ATC_SIF(atchan->per_if) atchan 1263 drivers/dma/at_hdmac.c | ATC_DIF(atchan->mem_if); atchan 1288 drivers/dma/at_hdmac.c struct at_dma_chan *atchan = to_at_dma_chan(chan); atchan 1290 drivers/dma/at_hdmac.c struct dma_slave_config *sconfig = &atchan->dma_sconfig; atchan 1308 drivers/dma/at_hdmac.c was_cyclic = test_and_set_bit(ATC_IS_CYCLIC, &atchan->status); atchan 1330 drivers/dma/at_hdmac.c desc = atc_desc_get(atchan); atchan 1352 drivers/dma/at_hdmac.c atc_desc_put(atchan, first); atchan 1354 drivers/dma/at_hdmac.c clear_bit(ATC_IS_CYCLIC, &atchan->status); atchan 1361 drivers/dma/at_hdmac.c struct at_dma_chan *atchan = to_at_dma_chan(chan); atchan 1369 drivers/dma/at_hdmac.c memcpy(&atchan->dma_sconfig, sconfig, sizeof(*sconfig)); atchan 1371 drivers/dma/at_hdmac.c convert_burst(&atchan->dma_sconfig.src_maxburst); atchan 1372 drivers/dma/at_hdmac.c convert_burst(&atchan->dma_sconfig.dst_maxburst); atchan 1379 drivers/dma/at_hdmac.c struct at_dma_chan *atchan = to_at_dma_chan(chan); atchan 1381 drivers/dma/at_hdmac.c int chan_id = atchan->chan_common.chan_id; atchan 1386 drivers/dma/at_hdmac.c spin_lock_irqsave(&atchan->lock, flags); atchan 1389 drivers/dma/at_hdmac.c set_bit(ATC_IS_PAUSED, &atchan->status); atchan 1391 drivers/dma/at_hdmac.c spin_unlock_irqrestore(&atchan->lock, flags); atchan 1398 drivers/dma/at_hdmac.c struct at_dma_chan *atchan = to_at_dma_chan(chan); atchan 1400 drivers/dma/at_hdmac.c int chan_id = atchan->chan_common.chan_id; atchan 1405 drivers/dma/at_hdmac.c if (!atc_chan_is_paused(atchan)) atchan 1408 drivers/dma/at_hdmac.c spin_lock_irqsave(&atchan->lock, flags); atchan 1411 drivers/dma/at_hdmac.c clear_bit(ATC_IS_PAUSED, &atchan->status); atchan 1413 drivers/dma/at_hdmac.c spin_unlock_irqrestore(&atchan->lock, flags); atchan 1420 drivers/dma/at_hdmac.c struct at_dma_chan *atchan = to_at_dma_chan(chan); atchan 1422 drivers/dma/at_hdmac.c int chan_id = atchan->chan_common.chan_id; atchan 1436 drivers/dma/at_hdmac.c spin_lock_irqsave(&atchan->lock, flags); atchan 1439 drivers/dma/at_hdmac.c dma_writel(atdma, CHDR, AT_DMA_RES(chan_id) | atchan->mask); atchan 1442 drivers/dma/at_hdmac.c while (dma_readl(atdma, CHSR) & atchan->mask) atchan 1446 drivers/dma/at_hdmac.c list_splice_init(&atchan->queue, &list); atchan 1447 drivers/dma/at_hdmac.c list_splice_init(&atchan->active_list, &list); atchan 1451 drivers/dma/at_hdmac.c atc_chain_complete(atchan, desc); atchan 1453 drivers/dma/at_hdmac.c clear_bit(ATC_IS_PAUSED, &atchan->status); atchan 1455 drivers/dma/at_hdmac.c clear_bit(ATC_IS_CYCLIC, &atchan->status); atchan 1457 drivers/dma/at_hdmac.c spin_unlock_irqrestore(&atchan->lock, flags); atchan 1477 drivers/dma/at_hdmac.c struct at_dma_chan *atchan = to_at_dma_chan(chan); atchan 1492 drivers/dma/at_hdmac.c spin_lock_irqsave(&atchan->lock, flags); atchan 1497 drivers/dma/at_hdmac.c spin_unlock_irqrestore(&atchan->lock, flags); atchan 1518 drivers/dma/at_hdmac.c struct at_dma_chan *atchan = to_at_dma_chan(chan); atchan 1524 drivers/dma/at_hdmac.c if (atc_chan_is_cyclic(atchan)) atchan 1527 drivers/dma/at_hdmac.c spin_lock_irqsave(&atchan->lock, flags); atchan 1528 drivers/dma/at_hdmac.c atc_advance_work(atchan); atchan 1529 drivers/dma/at_hdmac.c spin_unlock_irqrestore(&atchan->lock, flags); atchan 1541 drivers/dma/at_hdmac.c struct at_dma_chan *atchan = to_at_dma_chan(chan); atchan 1553 drivers/dma/at_hdmac.c if (atc_chan_is_enabled(atchan)) { atchan 1575 drivers/dma/at_hdmac.c if (!list_empty(&atchan->free_list)) atchan 1576 drivers/dma/at_hdmac.c return atchan->descs_allocated; atchan 1589 drivers/dma/at_hdmac.c spin_lock_irqsave(&atchan->lock, flags); atchan 1590 drivers/dma/at_hdmac.c atchan->descs_allocated = i; atchan 1591 drivers/dma/at_hdmac.c list_splice(&tmp_list, &atchan->free_list); atchan 1593 drivers/dma/at_hdmac.c spin_unlock_irqrestore(&atchan->lock, flags); atchan 1596 drivers/dma/at_hdmac.c channel_writel(atchan, CFG, cfg); atchan 1600 drivers/dma/at_hdmac.c atchan->descs_allocated); atchan 1602 drivers/dma/at_hdmac.c return atchan->descs_allocated; atchan 1611 drivers/dma/at_hdmac.c struct at_dma_chan *atchan = to_at_dma_chan(chan); atchan 1617 drivers/dma/at_hdmac.c atchan->descs_allocated); atchan 1620 drivers/dma/at_hdmac.c BUG_ON(!list_empty(&atchan->active_list)); atchan 1621 drivers/dma/at_hdmac.c BUG_ON(!list_empty(&atchan->queue)); atchan 1622 drivers/dma/at_hdmac.c BUG_ON(atc_chan_is_enabled(atchan)); atchan 1624 drivers/dma/at_hdmac.c list_for_each_entry_safe(desc, _desc, &atchan->free_list, desc_node) { atchan 1630 drivers/dma/at_hdmac.c list_splice_init(&atchan->free_list, &list); atchan 1631 drivers/dma/at_hdmac.c atchan->descs_allocated = 0; atchan 1632 drivers/dma/at_hdmac.c atchan->status = 0; atchan 1660 drivers/dma/at_hdmac.c struct at_dma_chan *atchan; atchan 1708 drivers/dma/at_hdmac.c atchan = to_at_dma_chan(chan); atchan 1709 drivers/dma/at_hdmac.c atchan->per_if = dma_spec->args[0] & 0xff; atchan 1710 drivers/dma/at_hdmac.c atchan->mem_if = (dma_spec->args[0] >> 16) & 0xff; atchan 1888 drivers/dma/at_hdmac.c struct at_dma_chan *atchan = &atdma->chan[i]; atchan 1890 drivers/dma/at_hdmac.c atchan->mem_if = AT_DMA_MEM_IF; atchan 1891 drivers/dma/at_hdmac.c atchan->per_if = AT_DMA_PER_IF; atchan 1892 drivers/dma/at_hdmac.c atchan->chan_common.device = &atdma->dma_common; atchan 1893 drivers/dma/at_hdmac.c dma_cookie_init(&atchan->chan_common); atchan 1894 drivers/dma/at_hdmac.c list_add_tail(&atchan->chan_common.device_node, atchan 1897 drivers/dma/at_hdmac.c atchan->ch_regs = atdma->regs + ch_regs(i); atchan 1898 drivers/dma/at_hdmac.c spin_lock_init(&atchan->lock); atchan 1899 drivers/dma/at_hdmac.c atchan->mask = 1 << i; atchan 1901 drivers/dma/at_hdmac.c INIT_LIST_HEAD(&atchan->active_list); atchan 1902 drivers/dma/at_hdmac.c INIT_LIST_HEAD(&atchan->queue); atchan 1903 drivers/dma/at_hdmac.c INIT_LIST_HEAD(&atchan->free_list); atchan 1905 drivers/dma/at_hdmac.c tasklet_init(&atchan->tasklet, atc_tasklet, atchan 1906 drivers/dma/at_hdmac.c (unsigned long)atchan); atchan 2009 drivers/dma/at_hdmac.c struct at_dma_chan *atchan = to_at_dma_chan(chan); atchan 2014 drivers/dma/at_hdmac.c tasklet_kill(&atchan->tasklet); atchan 2047 drivers/dma/at_hdmac.c struct at_dma_chan *atchan = to_at_dma_chan(chan); atchan 2049 drivers/dma/at_hdmac.c if (atc_chan_is_enabled(atchan) && !atc_chan_is_cyclic(atchan)) atchan 2055 drivers/dma/at_hdmac.c static void atc_suspend_cyclic(struct at_dma_chan *atchan) atchan 2057 drivers/dma/at_hdmac.c struct dma_chan *chan = &atchan->chan_common; atchan 2061 drivers/dma/at_hdmac.c if (!atc_chan_is_paused(atchan)) { atchan 2069 drivers/dma/at_hdmac.c atchan->save_dscr = channel_readl(atchan, DSCR); atchan 2071 drivers/dma/at_hdmac.c vdbg_dump_regs(atchan); atchan 2082 drivers/dma/at_hdmac.c struct at_dma_chan *atchan = to_at_dma_chan(chan); atchan 2084 drivers/dma/at_hdmac.c if (atc_chan_is_cyclic(atchan)) atchan 2085 drivers/dma/at_hdmac.c atc_suspend_cyclic(atchan); atchan 2086 drivers/dma/at_hdmac.c atchan->save_cfg = channel_readl(atchan, CFG); atchan 2096 drivers/dma/at_hdmac.c static void atc_resume_cyclic(struct at_dma_chan *atchan) atchan 2098 drivers/dma/at_hdmac.c struct at_dma *atdma = to_at_dma(atchan->chan_common.device); atchan 2102 drivers/dma/at_hdmac.c channel_writel(atchan, SADDR, 0); atchan 2103 drivers/dma/at_hdmac.c channel_writel(atchan, DADDR, 0); atchan 2104 drivers/dma/at_hdmac.c channel_writel(atchan, CTRLA, 0); atchan 2105 drivers/dma/at_hdmac.c channel_writel(atchan, CTRLB, 0); atchan 2106 drivers/dma/at_hdmac.c channel_writel(atchan, DSCR, atchan->save_dscr); atchan 2107 drivers/dma/at_hdmac.c dma_writel(atdma, CHER, atchan->mask); atchan 2112 drivers/dma/at_hdmac.c vdbg_dump_regs(atchan); atchan 2132 drivers/dma/at_hdmac.c struct at_dma_chan *atchan = to_at_dma_chan(chan); atchan 2134 drivers/dma/at_hdmac.c channel_writel(atchan, CFG, atchan->save_cfg); atchan 2135 drivers/dma/at_hdmac.c if (atc_chan_is_cyclic(atchan)) atchan 2136 drivers/dma/at_hdmac.c atc_resume_cyclic(atchan); atchan 270 drivers/dma/at_hdmac_regs.h #define channel_readl(atchan, name) \ atchan 271 drivers/dma/at_hdmac_regs.h __raw_readl((atchan)->ch_regs + ATC_##name##_OFFSET) atchan 273 drivers/dma/at_hdmac_regs.h #define channel_writel(atchan, name, val) \ atchan 274 drivers/dma/at_hdmac_regs.h __raw_writel((val), (atchan)->ch_regs + ATC_##name##_OFFSET) atchan 358 drivers/dma/at_hdmac_regs.h static void vdbg_dump_regs(struct at_dma_chan *atchan) atchan 360 drivers/dma/at_hdmac_regs.h struct at_dma *atdma = to_at_dma(atchan->chan_common.device); atchan 362 drivers/dma/at_hdmac_regs.h dev_err(chan2dev(&atchan->chan_common), atchan 364 drivers/dma/at_hdmac_regs.h atchan->chan_common.chan_id, atchan 368 drivers/dma/at_hdmac_regs.h dev_err(chan2dev(&atchan->chan_common), atchan 370 drivers/dma/at_hdmac_regs.h channel_readl(atchan, SADDR), atchan 371 drivers/dma/at_hdmac_regs.h channel_readl(atchan, DADDR), atchan 372 drivers/dma/at_hdmac_regs.h channel_readl(atchan, CTRLA), atchan 373 drivers/dma/at_hdmac_regs.h channel_readl(atchan, CTRLB), atchan 374 drivers/dma/at_hdmac_regs.h channel_readl(atchan, CFG), atchan 375 drivers/dma/at_hdmac_regs.h channel_readl(atchan, DSCR)); atchan 378 drivers/dma/at_hdmac_regs.h static void vdbg_dump_regs(struct at_dma_chan *atchan) {} atchan 381 drivers/dma/at_hdmac_regs.h static void atc_dump_lli(struct at_dma_chan *atchan, struct at_lli *lli) atchan 383 drivers/dma/at_hdmac_regs.h dev_crit(chan2dev(&atchan->chan_common), atchan 418 drivers/dma/at_hdmac_regs.h static inline int atc_chan_is_enabled(struct at_dma_chan *atchan) atchan 420 drivers/dma/at_hdmac_regs.h struct at_dma *atdma = to_at_dma(atchan->chan_common.device); atchan 422 drivers/dma/at_hdmac_regs.h return !!(dma_readl(atdma, CHSR) & atchan->mask); atchan 429 drivers/dma/at_hdmac_regs.h static inline int atc_chan_is_paused(struct at_dma_chan *atchan) atchan 431 drivers/dma/at_hdmac_regs.h return test_bit(ATC_IS_PAUSED, &atchan->status); atchan 438 drivers/dma/at_hdmac_regs.h static inline int atc_chan_is_cyclic(struct at_dma_chan *atchan) atchan 440 drivers/dma/at_hdmac_regs.h return test_bit(ATC_IS_CYCLIC, &atchan->status); atchan 256 drivers/dma/at_xdmac.c #define at_xdmac_chan_read(atchan, reg) readl_relaxed((atchan)->ch_regs + (reg)) atchan 257 drivers/dma/at_xdmac.c #define at_xdmac_chan_write(atchan, reg, value) writel_relaxed((value), (atchan)->ch_regs + (reg)) atchan 279 drivers/dma/at_xdmac.c static inline int at_xdmac_chan_is_cyclic(struct at_xdmac_chan *atchan) atchan 281 drivers/dma/at_xdmac.c return test_bit(AT_XDMAC_CHAN_IS_CYCLIC, &atchan->status); atchan 284 drivers/dma/at_xdmac.c static inline int at_xdmac_chan_is_paused(struct at_xdmac_chan *atchan) atchan 286 drivers/dma/at_xdmac.c return test_bit(AT_XDMAC_CHAN_IS_PAUSED, &atchan->status); atchan 316 drivers/dma/at_xdmac.c static bool at_xdmac_chan_is_enabled(struct at_xdmac_chan *atchan) atchan 318 drivers/dma/at_xdmac.c return at_xdmac_chan_read(atchan, AT_XDMAC_GS) & atchan->mask; atchan 333 drivers/dma/at_xdmac.c static void at_xdmac_start_xfer(struct at_xdmac_chan *atchan, atchan 336 drivers/dma/at_xdmac.c struct at_xdmac *atxdmac = to_at_xdmac(atchan->chan.device); atchan 339 drivers/dma/at_xdmac.c dev_vdbg(chan2dev(&atchan->chan), "%s: desc 0x%p\n", __func__, first); atchan 341 drivers/dma/at_xdmac.c if (at_xdmac_chan_is_enabled(atchan)) atchan 349 drivers/dma/at_xdmac.c | AT_XDMAC_CNDA_NDAIF(atchan->memif); atchan 350 drivers/dma/at_xdmac.c at_xdmac_chan_write(atchan, AT_XDMAC_CNDA, reg); atchan 357 drivers/dma/at_xdmac.c if (at_xdmac_chan_is_cyclic(atchan)) atchan 369 drivers/dma/at_xdmac.c at_xdmac_chan_write(atchan, AT_XDMAC_CC, first->lld.mbr_cfg); atchan 374 drivers/dma/at_xdmac.c at_xdmac_chan_write(atchan, AT_XDMAC_CNDC, reg); atchan 376 drivers/dma/at_xdmac.c dev_vdbg(chan2dev(&atchan->chan), atchan 378 drivers/dma/at_xdmac.c __func__, at_xdmac_chan_read(atchan, AT_XDMAC_CC), atchan 379 drivers/dma/at_xdmac.c at_xdmac_chan_read(atchan, AT_XDMAC_CNDA), atchan 380 drivers/dma/at_xdmac.c at_xdmac_chan_read(atchan, AT_XDMAC_CNDC), atchan 381 drivers/dma/at_xdmac.c at_xdmac_chan_read(atchan, AT_XDMAC_CSA), atchan 382 drivers/dma/at_xdmac.c at_xdmac_chan_read(atchan, AT_XDMAC_CDA), atchan 383 drivers/dma/at_xdmac.c at_xdmac_chan_read(atchan, AT_XDMAC_CUBC)); atchan 385 drivers/dma/at_xdmac.c at_xdmac_chan_write(atchan, AT_XDMAC_CID, 0xffffffff); atchan 397 drivers/dma/at_xdmac.c if (at_xdmac_chan_is_cyclic(atchan)) atchan 398 drivers/dma/at_xdmac.c at_xdmac_chan_write(atchan, AT_XDMAC_CIE, atchan 401 drivers/dma/at_xdmac.c at_xdmac_chan_write(atchan, AT_XDMAC_CIE, atchan 403 drivers/dma/at_xdmac.c at_xdmac_write(atxdmac, AT_XDMAC_GIE, atchan->mask); atchan 404 drivers/dma/at_xdmac.c dev_vdbg(chan2dev(&atchan->chan), atchan 405 drivers/dma/at_xdmac.c "%s: enable channel (0x%08x)\n", __func__, atchan->mask); atchan 407 drivers/dma/at_xdmac.c at_xdmac_write(atxdmac, AT_XDMAC_GE, atchan->mask); atchan 409 drivers/dma/at_xdmac.c dev_vdbg(chan2dev(&atchan->chan), atchan 411 drivers/dma/at_xdmac.c __func__, at_xdmac_chan_read(atchan, AT_XDMAC_CC), atchan 412 drivers/dma/at_xdmac.c at_xdmac_chan_read(atchan, AT_XDMAC_CNDA), atchan 413 drivers/dma/at_xdmac.c at_xdmac_chan_read(atchan, AT_XDMAC_CNDC), atchan 414 drivers/dma/at_xdmac.c at_xdmac_chan_read(atchan, AT_XDMAC_CSA), atchan 415 drivers/dma/at_xdmac.c at_xdmac_chan_read(atchan, AT_XDMAC_CDA), atchan 416 drivers/dma/at_xdmac.c at_xdmac_chan_read(atchan, AT_XDMAC_CUBC)); atchan 423 drivers/dma/at_xdmac.c struct at_xdmac_chan *atchan = to_at_xdmac_chan(tx->chan); atchan 427 drivers/dma/at_xdmac.c spin_lock_irqsave(&atchan->lock, irqflags); atchan 431 drivers/dma/at_xdmac.c __func__, atchan, desc); atchan 432 drivers/dma/at_xdmac.c list_add_tail(&desc->xfer_node, &atchan->xfers_list); atchan 433 drivers/dma/at_xdmac.c if (list_is_singular(&atchan->xfers_list)) atchan 434 drivers/dma/at_xdmac.c at_xdmac_start_xfer(atchan, desc); atchan 436 drivers/dma/at_xdmac.c spin_unlock_irqrestore(&atchan->lock, irqflags); atchan 468 drivers/dma/at_xdmac.c static struct at_xdmac_desc *at_xdmac_get_desc(struct at_xdmac_chan *atchan) atchan 472 drivers/dma/at_xdmac.c if (list_empty(&atchan->free_descs_list)) { atchan 473 drivers/dma/at_xdmac.c desc = at_xdmac_alloc_desc(&atchan->chan, GFP_NOWAIT); atchan 475 drivers/dma/at_xdmac.c desc = list_first_entry(&atchan->free_descs_list, atchan 515 drivers/dma/at_xdmac.c struct at_xdmac_chan *atchan; atchan 530 drivers/dma/at_xdmac.c atchan = to_at_xdmac_chan(chan); atchan 531 drivers/dma/at_xdmac.c atchan->memif = AT91_XDMAC_DT_GET_MEM_IF(dma_spec->args[0]); atchan 532 drivers/dma/at_xdmac.c atchan->perif = AT91_XDMAC_DT_GET_PER_IF(dma_spec->args[0]); atchan 533 drivers/dma/at_xdmac.c atchan->perid = AT91_XDMAC_DT_GET_PERID(dma_spec->args[0]); atchan 535 drivers/dma/at_xdmac.c atchan->memif, atchan->perif, atchan->perid); atchan 543 drivers/dma/at_xdmac.c struct at_xdmac_chan *atchan = to_at_xdmac_chan(chan); atchan 547 drivers/dma/at_xdmac.c atchan->cfg = atchan 548 drivers/dma/at_xdmac.c AT91_XDMAC_DT_PERID(atchan->perid) atchan 551 drivers/dma/at_xdmac.c | AT_XDMAC_CC_DIF(atchan->memif) atchan 552 drivers/dma/at_xdmac.c | AT_XDMAC_CC_SIF(atchan->perif) atchan 557 drivers/dma/at_xdmac.c csize = ffs(atchan->sconfig.src_maxburst) - 1; atchan 562 drivers/dma/at_xdmac.c atchan->cfg |= AT_XDMAC_CC_CSIZE(csize); atchan 563 drivers/dma/at_xdmac.c dwidth = ffs(atchan->sconfig.src_addr_width) - 1; atchan 568 drivers/dma/at_xdmac.c atchan->cfg |= AT_XDMAC_CC_DWIDTH(dwidth); atchan 570 drivers/dma/at_xdmac.c atchan->cfg = atchan 571 drivers/dma/at_xdmac.c AT91_XDMAC_DT_PERID(atchan->perid) atchan 574 drivers/dma/at_xdmac.c | AT_XDMAC_CC_DIF(atchan->perif) atchan 575 drivers/dma/at_xdmac.c | AT_XDMAC_CC_SIF(atchan->memif) atchan 580 drivers/dma/at_xdmac.c csize = ffs(atchan->sconfig.dst_maxburst) - 1; atchan 585 drivers/dma/at_xdmac.c atchan->cfg |= AT_XDMAC_CC_CSIZE(csize); atchan 586 drivers/dma/at_xdmac.c dwidth = ffs(atchan->sconfig.dst_addr_width) - 1; atchan 591 drivers/dma/at_xdmac.c atchan->cfg |= AT_XDMAC_CC_DWIDTH(dwidth); atchan 594 drivers/dma/at_xdmac.c dev_dbg(chan2dev(chan), "%s: cfg=0x%08x\n", __func__, atchan->cfg); atchan 620 drivers/dma/at_xdmac.c struct at_xdmac_chan *atchan = to_at_xdmac_chan(chan); atchan 627 drivers/dma/at_xdmac.c memcpy(&atchan->sconfig, sconfig, sizeof(atchan->sconfig)); atchan 637 drivers/dma/at_xdmac.c struct at_xdmac_chan *atchan = to_at_xdmac_chan(chan); atchan 659 drivers/dma/at_xdmac.c spin_lock_irqsave(&atchan->lock, irqflags); atchan 678 drivers/dma/at_xdmac.c desc = at_xdmac_get_desc(atchan); atchan 682 drivers/dma/at_xdmac.c list_splice_init(&first->descs_list, &atchan->free_descs_list); atchan 688 drivers/dma/at_xdmac.c desc->lld.mbr_sa = atchan->sconfig.src_addr; atchan 692 drivers/dma/at_xdmac.c desc->lld.mbr_da = atchan->sconfig.dst_addr; atchan 694 drivers/dma/at_xdmac.c dwidth = at_xdmac_get_dwidth(atchan->cfg); atchan 702 drivers/dma/at_xdmac.c desc->lld.mbr_cfg = (atchan->cfg & ~AT_XDMAC_CC_DWIDTH_MASK) | atchan 729 drivers/dma/at_xdmac.c spin_unlock_irqrestore(&atchan->lock, irqflags); atchan 739 drivers/dma/at_xdmac.c struct at_xdmac_chan *atchan = to_at_xdmac_chan(chan); atchan 754 drivers/dma/at_xdmac.c if (test_and_set_bit(AT_XDMAC_CHAN_IS_CYCLIC, &atchan->status)) { atchan 765 drivers/dma/at_xdmac.c spin_lock_irqsave(&atchan->lock, irqflags); atchan 766 drivers/dma/at_xdmac.c desc = at_xdmac_get_desc(atchan); atchan 770 drivers/dma/at_xdmac.c list_splice_init(&first->descs_list, &atchan->free_descs_list); atchan 771 drivers/dma/at_xdmac.c spin_unlock_irqrestore(&atchan->lock, irqflags); atchan 774 drivers/dma/at_xdmac.c spin_unlock_irqrestore(&atchan->lock, irqflags); atchan 780 drivers/dma/at_xdmac.c desc->lld.mbr_sa = atchan->sconfig.src_addr; atchan 784 drivers/dma/at_xdmac.c desc->lld.mbr_da = atchan->sconfig.dst_addr; atchan 786 drivers/dma/at_xdmac.c desc->lld.mbr_cfg = atchan->cfg; atchan 848 drivers/dma/at_xdmac.c struct at_xdmac_chan *atchan, atchan 903 drivers/dma/at_xdmac.c spin_lock_irqsave(&atchan->lock, flags); atchan 904 drivers/dma/at_xdmac.c desc = at_xdmac_get_desc(atchan); atchan 905 drivers/dma/at_xdmac.c spin_unlock_irqrestore(&atchan->lock, flags); atchan 943 drivers/dma/at_xdmac.c struct at_xdmac_chan *atchan = to_at_xdmac_chan(chan); atchan 968 drivers/dma/at_xdmac.c first = at_xdmac_interleaved_queue_desc(chan, atchan, atchan 997 drivers/dma/at_xdmac.c desc = at_xdmac_interleaved_queue_desc(chan, atchan, atchan 1003 drivers/dma/at_xdmac.c &atchan->free_descs_list); atchan 1036 drivers/dma/at_xdmac.c struct at_xdmac_chan *atchan = to_at_xdmac_chan(chan); atchan 1075 drivers/dma/at_xdmac.c spin_lock_irqsave(&atchan->lock, irqflags); atchan 1076 drivers/dma/at_xdmac.c desc = at_xdmac_get_desc(atchan); atchan 1077 drivers/dma/at_xdmac.c spin_unlock_irqrestore(&atchan->lock, irqflags); atchan 1081 drivers/dma/at_xdmac.c list_splice_init(&first->descs_list, &atchan->free_descs_list); atchan 1137 drivers/dma/at_xdmac.c struct at_xdmac_chan *atchan, atchan 1176 drivers/dma/at_xdmac.c spin_lock_irqsave(&atchan->lock, flags); atchan 1177 drivers/dma/at_xdmac.c desc = at_xdmac_get_desc(atchan); atchan 1178 drivers/dma/at_xdmac.c spin_unlock_irqrestore(&atchan->lock, flags); atchan 1208 drivers/dma/at_xdmac.c struct at_xdmac_chan *atchan = to_at_xdmac_chan(chan); atchan 1217 drivers/dma/at_xdmac.c desc = at_xdmac_memset_create_desc(chan, atchan, dest, len, value); atchan 1232 drivers/dma/at_xdmac.c struct at_xdmac_chan *atchan = to_at_xdmac_chan(chan); atchan 1250 drivers/dma/at_xdmac.c desc = at_xdmac_memset_create_desc(chan, atchan, atchan 1256 drivers/dma/at_xdmac.c &atchan->free_descs_list); atchan 1305 drivers/dma/at_xdmac.c &atchan->free_descs_list); atchan 1368 drivers/dma/at_xdmac.c &atchan->free_descs_list); atchan 1393 drivers/dma/at_xdmac.c struct at_xdmac_chan *atchan = to_at_xdmac_chan(chan); atchan 1394 drivers/dma/at_xdmac.c struct at_xdmac *atxdmac = to_at_xdmac(atchan->chan.device); atchan 1411 drivers/dma/at_xdmac.c spin_lock_irqsave(&atchan->lock, flags); atchan 1413 drivers/dma/at_xdmac.c desc = list_first_entry(&atchan->xfers_list, struct at_xdmac_desc, xfer_node); atchan 1441 drivers/dma/at_xdmac.c at_xdmac_write(atxdmac, AT_XDMAC_GSWF, atchan->mask); atchan 1442 drivers/dma/at_xdmac.c while (!(at_xdmac_chan_read(atchan, AT_XDMAC_CIS) & AT_XDMAC_CIS_FIS)) atchan 1473 drivers/dma/at_xdmac.c check_nda = at_xdmac_chan_read(atchan, AT_XDMAC_CNDA) & 0xfffffffc; atchan 1475 drivers/dma/at_xdmac.c cur_ubc = at_xdmac_chan_read(atchan, AT_XDMAC_CUBC); atchan 1477 drivers/dma/at_xdmac.c initd = !!(at_xdmac_chan_read(atchan, AT_XDMAC_CC) & AT_XDMAC_CC_INITD); atchan 1479 drivers/dma/at_xdmac.c cur_nda = at_xdmac_chan_read(atchan, AT_XDMAC_CNDA) & 0xfffffffc; atchan 1499 drivers/dma/at_xdmac.c at_xdmac_write(atxdmac, AT_XDMAC_GSWF, atchan->mask); atchan 1500 drivers/dma/at_xdmac.c while (!(at_xdmac_chan_read(atchan, AT_XDMAC_CIS) & AT_XDMAC_CIS_FIS)) atchan 1525 drivers/dma/at_xdmac.c spin_unlock_irqrestore(&atchan->lock, flags); atchan 1530 drivers/dma/at_xdmac.c static void at_xdmac_remove_xfer(struct at_xdmac_chan *atchan, atchan 1533 drivers/dma/at_xdmac.c dev_dbg(chan2dev(&atchan->chan), "%s: desc 0x%p\n", __func__, desc); atchan 1540 drivers/dma/at_xdmac.c list_splice_init(&desc->descs_list, &atchan->free_descs_list); atchan 1543 drivers/dma/at_xdmac.c static void at_xdmac_advance_work(struct at_xdmac_chan *atchan) atchan 1548 drivers/dma/at_xdmac.c spin_lock_irqsave(&atchan->lock, flags); atchan 1554 drivers/dma/at_xdmac.c if (!at_xdmac_chan_is_enabled(atchan) && !list_empty(&atchan->xfers_list)) { atchan 1555 drivers/dma/at_xdmac.c desc = list_first_entry(&atchan->xfers_list, atchan 1558 drivers/dma/at_xdmac.c dev_vdbg(chan2dev(&atchan->chan), "%s: desc 0x%p\n", __func__, desc); atchan 1560 drivers/dma/at_xdmac.c at_xdmac_start_xfer(atchan, desc); atchan 1563 drivers/dma/at_xdmac.c spin_unlock_irqrestore(&atchan->lock, flags); atchan 1566 drivers/dma/at_xdmac.c static void at_xdmac_handle_cyclic(struct at_xdmac_chan *atchan) atchan 1571 drivers/dma/at_xdmac.c if (!list_empty(&atchan->xfers_list)) { atchan 1572 drivers/dma/at_xdmac.c desc = list_first_entry(&atchan->xfers_list, atchan 1581 drivers/dma/at_xdmac.c static void at_xdmac_handle_error(struct at_xdmac_chan *atchan) atchan 1583 drivers/dma/at_xdmac.c struct at_xdmac *atxdmac = to_at_xdmac(atchan->chan.device); atchan 1592 drivers/dma/at_xdmac.c if (atchan->irq_status & AT_XDMAC_CIS_RBEIS) atchan 1593 drivers/dma/at_xdmac.c dev_err(chan2dev(&atchan->chan), "read bus error!!!"); atchan 1594 drivers/dma/at_xdmac.c if (atchan->irq_status & AT_XDMAC_CIS_WBEIS) atchan 1595 drivers/dma/at_xdmac.c dev_err(chan2dev(&atchan->chan), "write bus error!!!"); atchan 1596 drivers/dma/at_xdmac.c if (atchan->irq_status & AT_XDMAC_CIS_ROIS) atchan 1597 drivers/dma/at_xdmac.c dev_err(chan2dev(&atchan->chan), "request overflow error!!!"); atchan 1599 drivers/dma/at_xdmac.c spin_lock_bh(&atchan->lock); atchan 1602 drivers/dma/at_xdmac.c at_xdmac_write(atxdmac, AT_XDMAC_GD, atchan->mask); atchan 1603 drivers/dma/at_xdmac.c while (at_xdmac_read(atxdmac, AT_XDMAC_GS) & atchan->mask) atchan 1606 drivers/dma/at_xdmac.c bad_desc = list_first_entry(&atchan->xfers_list, atchan 1610 drivers/dma/at_xdmac.c spin_unlock_bh(&atchan->lock); atchan 1613 drivers/dma/at_xdmac.c dev_dbg(chan2dev(&atchan->chan), atchan 1623 drivers/dma/at_xdmac.c struct at_xdmac_chan *atchan = (struct at_xdmac_chan *)data; atchan 1627 drivers/dma/at_xdmac.c dev_dbg(chan2dev(&atchan->chan), "%s: status=0x%08x\n", atchan 1628 drivers/dma/at_xdmac.c __func__, atchan->irq_status); atchan 1634 drivers/dma/at_xdmac.c if (at_xdmac_chan_is_cyclic(atchan)) { atchan 1635 drivers/dma/at_xdmac.c at_xdmac_handle_cyclic(atchan); atchan 1636 drivers/dma/at_xdmac.c } else if ((atchan->irq_status & AT_XDMAC_CIS_LIS) atchan 1637 drivers/dma/at_xdmac.c || (atchan->irq_status & error_mask)) { atchan 1640 drivers/dma/at_xdmac.c if (atchan->irq_status & error_mask) atchan 1641 drivers/dma/at_xdmac.c at_xdmac_handle_error(atchan); atchan 1643 drivers/dma/at_xdmac.c spin_lock(&atchan->lock); atchan 1644 drivers/dma/at_xdmac.c desc = list_first_entry(&atchan->xfers_list, atchan 1647 drivers/dma/at_xdmac.c dev_vdbg(chan2dev(&atchan->chan), "%s: desc 0x%p\n", __func__, desc); atchan 1649 drivers/dma/at_xdmac.c dev_err(chan2dev(&atchan->chan), "Xfer not active: exiting"); atchan 1650 drivers/dma/at_xdmac.c spin_unlock(&atchan->lock); atchan 1656 drivers/dma/at_xdmac.c at_xdmac_remove_xfer(atchan, desc); atchan 1657 drivers/dma/at_xdmac.c spin_unlock(&atchan->lock); atchan 1659 drivers/dma/at_xdmac.c if (!at_xdmac_chan_is_cyclic(atchan)) { atchan 1667 drivers/dma/at_xdmac.c at_xdmac_advance_work(atchan); atchan 1674 drivers/dma/at_xdmac.c struct at_xdmac_chan *atchan; atchan 1696 drivers/dma/at_xdmac.c atchan = &atxdmac->chan[i]; atchan 1697 drivers/dma/at_xdmac.c chan_imr = at_xdmac_chan_read(atchan, AT_XDMAC_CIM); atchan 1698 drivers/dma/at_xdmac.c chan_status = at_xdmac_chan_read(atchan, AT_XDMAC_CIS); atchan 1699 drivers/dma/at_xdmac.c atchan->irq_status = chan_status & chan_imr; atchan 1703 drivers/dma/at_xdmac.c dev_vdbg(chan2dev(&atchan->chan), atchan 1706 drivers/dma/at_xdmac.c at_xdmac_chan_read(atchan, AT_XDMAC_CC), atchan 1707 drivers/dma/at_xdmac.c at_xdmac_chan_read(atchan, AT_XDMAC_CNDA), atchan 1708 drivers/dma/at_xdmac.c at_xdmac_chan_read(atchan, AT_XDMAC_CNDC), atchan 1709 drivers/dma/at_xdmac.c at_xdmac_chan_read(atchan, AT_XDMAC_CSA), atchan 1710 drivers/dma/at_xdmac.c at_xdmac_chan_read(atchan, AT_XDMAC_CDA), atchan 1711 drivers/dma/at_xdmac.c at_xdmac_chan_read(atchan, AT_XDMAC_CUBC)); atchan 1713 drivers/dma/at_xdmac.c if (atchan->irq_status & (AT_XDMAC_CIS_RBEIS | AT_XDMAC_CIS_WBEIS)) atchan 1714 drivers/dma/at_xdmac.c at_xdmac_write(atxdmac, AT_XDMAC_GD, atchan->mask); atchan 1716 drivers/dma/at_xdmac.c tasklet_schedule(&atchan->tasklet); atchan 1727 drivers/dma/at_xdmac.c struct at_xdmac_chan *atchan = to_at_xdmac_chan(chan); atchan 1729 drivers/dma/at_xdmac.c dev_dbg(chan2dev(&atchan->chan), "%s\n", __func__); atchan 1731 drivers/dma/at_xdmac.c if (!at_xdmac_chan_is_cyclic(atchan)) atchan 1732 drivers/dma/at_xdmac.c at_xdmac_advance_work(atchan); atchan 1740 drivers/dma/at_xdmac.c struct at_xdmac_chan *atchan = to_at_xdmac_chan(chan); atchan 1746 drivers/dma/at_xdmac.c spin_lock_irqsave(&atchan->lock, flags); atchan 1748 drivers/dma/at_xdmac.c spin_unlock_irqrestore(&atchan->lock, flags); atchan 1755 drivers/dma/at_xdmac.c struct at_xdmac_chan *atchan = to_at_xdmac_chan(chan); atchan 1756 drivers/dma/at_xdmac.c struct at_xdmac *atxdmac = to_at_xdmac(atchan->chan.device); atchan 1761 drivers/dma/at_xdmac.c if (test_and_set_bit(AT_XDMAC_CHAN_IS_PAUSED, &atchan->status)) atchan 1764 drivers/dma/at_xdmac.c spin_lock_irqsave(&atchan->lock, flags); atchan 1765 drivers/dma/at_xdmac.c at_xdmac_write(atxdmac, AT_XDMAC_GRWS, atchan->mask); atchan 1766 drivers/dma/at_xdmac.c while (at_xdmac_chan_read(atchan, AT_XDMAC_CC) atchan 1769 drivers/dma/at_xdmac.c spin_unlock_irqrestore(&atchan->lock, flags); atchan 1776 drivers/dma/at_xdmac.c struct at_xdmac_chan *atchan = to_at_xdmac_chan(chan); atchan 1777 drivers/dma/at_xdmac.c struct at_xdmac *atxdmac = to_at_xdmac(atchan->chan.device); atchan 1782 drivers/dma/at_xdmac.c spin_lock_irqsave(&atchan->lock, flags); atchan 1783 drivers/dma/at_xdmac.c if (!at_xdmac_chan_is_paused(atchan)) { atchan 1784 drivers/dma/at_xdmac.c spin_unlock_irqrestore(&atchan->lock, flags); atchan 1788 drivers/dma/at_xdmac.c at_xdmac_write(atxdmac, AT_XDMAC_GRWR, atchan->mask); atchan 1789 drivers/dma/at_xdmac.c clear_bit(AT_XDMAC_CHAN_IS_PAUSED, &atchan->status); atchan 1790 drivers/dma/at_xdmac.c spin_unlock_irqrestore(&atchan->lock, flags); atchan 1798 drivers/dma/at_xdmac.c struct at_xdmac_chan *atchan = to_at_xdmac_chan(chan); atchan 1799 drivers/dma/at_xdmac.c struct at_xdmac *atxdmac = to_at_xdmac(atchan->chan.device); atchan 1804 drivers/dma/at_xdmac.c spin_lock_irqsave(&atchan->lock, flags); atchan 1805 drivers/dma/at_xdmac.c at_xdmac_write(atxdmac, AT_XDMAC_GD, atchan->mask); atchan 1806 drivers/dma/at_xdmac.c while (at_xdmac_read(atxdmac, AT_XDMAC_GS) & atchan->mask) atchan 1810 drivers/dma/at_xdmac.c list_for_each_entry_safe(desc, _desc, &atchan->xfers_list, xfer_node) atchan 1811 drivers/dma/at_xdmac.c at_xdmac_remove_xfer(atchan, desc); atchan 1813 drivers/dma/at_xdmac.c clear_bit(AT_XDMAC_CHAN_IS_PAUSED, &atchan->status); atchan 1814 drivers/dma/at_xdmac.c clear_bit(AT_XDMAC_CHAN_IS_CYCLIC, &atchan->status); atchan 1815 drivers/dma/at_xdmac.c spin_unlock_irqrestore(&atchan->lock, flags); atchan 1822 drivers/dma/at_xdmac.c struct at_xdmac_chan *atchan = to_at_xdmac_chan(chan); atchan 1827 drivers/dma/at_xdmac.c spin_lock_irqsave(&atchan->lock, flags); atchan 1829 drivers/dma/at_xdmac.c if (at_xdmac_chan_is_enabled(atchan)) { atchan 1836 drivers/dma/at_xdmac.c if (!list_empty(&atchan->free_descs_list)) { atchan 1850 drivers/dma/at_xdmac.c list_add_tail(&desc->desc_node, &atchan->free_descs_list); atchan 1858 drivers/dma/at_xdmac.c spin_unlock_irqrestore(&atchan->lock, flags); atchan 1864 drivers/dma/at_xdmac.c struct at_xdmac_chan *atchan = to_at_xdmac_chan(chan); atchan 1868 drivers/dma/at_xdmac.c list_for_each_entry_safe(desc, _desc, &atchan->free_descs_list, desc_node) { atchan 1884 drivers/dma/at_xdmac.c struct at_xdmac_chan *atchan = to_at_xdmac_chan(chan); atchan 1887 drivers/dma/at_xdmac.c if (at_xdmac_chan_is_enabled(atchan) && !at_xdmac_chan_is_cyclic(atchan)) atchan 1903 drivers/dma/at_xdmac.c struct at_xdmac_chan *atchan = to_at_xdmac_chan(chan); atchan 1905 drivers/dma/at_xdmac.c atchan->save_cc = at_xdmac_chan_read(atchan, AT_XDMAC_CC); atchan 1906 drivers/dma/at_xdmac.c if (at_xdmac_chan_is_cyclic(atchan)) { atchan 1907 drivers/dma/at_xdmac.c if (!at_xdmac_chan_is_paused(atchan)) atchan 1909 drivers/dma/at_xdmac.c atchan->save_cim = at_xdmac_chan_read(atchan, AT_XDMAC_CIM); atchan 1910 drivers/dma/at_xdmac.c atchan->save_cnda = at_xdmac_chan_read(atchan, AT_XDMAC_CNDA); atchan 1911 drivers/dma/at_xdmac.c atchan->save_cndc = at_xdmac_chan_read(atchan, AT_XDMAC_CNDC); atchan 1924 drivers/dma/at_xdmac.c struct at_xdmac_chan *atchan; atchan 1935 drivers/dma/at_xdmac.c atchan = &atxdmac->chan[i]; atchan 1936 drivers/dma/at_xdmac.c while (at_xdmac_chan_read(atchan, AT_XDMAC_CIS)) atchan 1942 drivers/dma/at_xdmac.c atchan = to_at_xdmac_chan(chan); atchan 1943 drivers/dma/at_xdmac.c at_xdmac_chan_write(atchan, AT_XDMAC_CC, atchan->save_cc); atchan 1944 drivers/dma/at_xdmac.c if (at_xdmac_chan_is_cyclic(atchan)) { atchan 1945 drivers/dma/at_xdmac.c if (at_xdmac_chan_is_paused(atchan)) atchan 1947 drivers/dma/at_xdmac.c at_xdmac_chan_write(atchan, AT_XDMAC_CNDA, atchan->save_cnda); atchan 1948 drivers/dma/at_xdmac.c at_xdmac_chan_write(atchan, AT_XDMAC_CNDC, atchan->save_cndc); atchan 1949 drivers/dma/at_xdmac.c at_xdmac_chan_write(atchan, AT_XDMAC_CIE, atchan->save_cim); atchan 1951 drivers/dma/at_xdmac.c at_xdmac_write(atxdmac, AT_XDMAC_GE, atchan->mask); atchan 2067 drivers/dma/at_xdmac.c struct at_xdmac_chan *atchan = &atxdmac->chan[i]; atchan 2069 drivers/dma/at_xdmac.c atchan->chan.device = &atxdmac->dma; atchan 2070 drivers/dma/at_xdmac.c list_add_tail(&atchan->chan.device_node, atchan 2073 drivers/dma/at_xdmac.c atchan->ch_regs = at_xdmac_chan_reg_base(atxdmac, i); atchan 2074 drivers/dma/at_xdmac.c atchan->mask = 1 << i; atchan 2076 drivers/dma/at_xdmac.c spin_lock_init(&atchan->lock); atchan 2077 drivers/dma/at_xdmac.c INIT_LIST_HEAD(&atchan->xfers_list); atchan 2078 drivers/dma/at_xdmac.c INIT_LIST_HEAD(&atchan->free_descs_list); atchan 2079 drivers/dma/at_xdmac.c tasklet_init(&atchan->tasklet, at_xdmac_tasklet, atchan 2080 drivers/dma/at_xdmac.c (unsigned long)atchan); atchan 2083 drivers/dma/at_xdmac.c while (at_xdmac_chan_read(atchan, AT_XDMAC_CIS)) atchan 2128 drivers/dma/at_xdmac.c struct at_xdmac_chan *atchan = &atxdmac->chan[i]; atchan 2130 drivers/dma/at_xdmac.c tasklet_kill(&atchan->tasklet); atchan 2131 drivers/dma/at_xdmac.c at_xdmac_free_chan_resources(&atchan->chan);