s3cchan 258 drivers/dma/s3c24xx-dma.c static bool s3c24xx_dma_phy_valid(struct s3c24xx_dma_chan *s3cchan, s3cchan 261 drivers/dma/s3c24xx-dma.c struct s3c24xx_dma_engine *s3cdma = s3cchan->host; s3cchan 263 drivers/dma/s3c24xx-dma.c struct s3c24xx_dma_channel *cdata = &pdata->channels[s3cchan->id]; s3cchan 267 drivers/dma/s3c24xx-dma.c if (!s3cchan->slave) s3cchan 286 drivers/dma/s3c24xx-dma.c struct s3c24xx_dma_phy *s3c24xx_dma_get_phy(struct s3c24xx_dma_chan *s3cchan) s3cchan 288 drivers/dma/s3c24xx-dma.c struct s3c24xx_dma_engine *s3cdma = s3cchan->host; s3cchan 300 drivers/dma/s3c24xx-dma.c if (!s3c24xx_dma_phy_valid(s3cchan, phy)) s3cchan 306 drivers/dma/s3c24xx-dma.c phy->serving = s3cchan; s3cchan 370 drivers/dma/s3c24xx-dma.c static u32 s3c24xx_dma_getbytes_chan(struct s3c24xx_dma_chan *s3cchan) s3cchan 372 drivers/dma/s3c24xx-dma.c struct s3c24xx_dma_phy *phy = s3cchan->phy; s3cchan 373 drivers/dma/s3c24xx-dma.c struct s3c24xx_txd *txd = s3cchan->at; s3cchan 382 drivers/dma/s3c24xx-dma.c struct s3c24xx_dma_chan *s3cchan = to_s3c24xx_dma_chan(chan); s3cchan 391 drivers/dma/s3c24xx-dma.c spin_lock_irqsave(&s3cchan->vc.lock, flags); s3cchan 393 drivers/dma/s3c24xx-dma.c if (!s3cchan->slave) { s3cchan 398 drivers/dma/s3c24xx-dma.c s3cchan->cfg = *config; s3cchan 401 drivers/dma/s3c24xx-dma.c spin_unlock_irqrestore(&s3cchan->vc.lock, flags); s3cchan 439 drivers/dma/s3c24xx-dma.c static void s3c24xx_dma_start_next_sg(struct s3c24xx_dma_chan *s3cchan, s3cchan 442 drivers/dma/s3c24xx-dma.c struct s3c24xx_dma_engine *s3cdma = s3cchan->host; s3cchan 443 drivers/dma/s3c24xx-dma.c struct s3c24xx_dma_phy *phy = s3cchan->phy; s3cchan 462 drivers/dma/s3c24xx-dma.c if (s3cchan->slave) { s3cchan 464 drivers/dma/s3c24xx-dma.c &pdata->channels[s3cchan->id]; s3cchan 494 drivers/dma/s3c24xx-dma.c if (!s3cchan->slave) s3cchan 503 drivers/dma/s3c24xx-dma.c static void s3c24xx_dma_start_next_txd(struct s3c24xx_dma_chan *s3cchan) s3cchan 505 drivers/dma/s3c24xx-dma.c struct s3c24xx_dma_phy *phy = s3cchan->phy; s3cchan 506 drivers/dma/s3c24xx-dma.c struct virt_dma_desc *vd = vchan_next_desc(&s3cchan->vc); s3cchan 511 drivers/dma/s3c24xx-dma.c s3cchan->at = txd; s3cchan 519 drivers/dma/s3c24xx-dma.c s3c24xx_dma_start_next_sg(s3cchan, txd); s3cchan 523 drivers/dma/s3c24xx-dma.c struct s3c24xx_dma_chan *s3cchan) s3cchan 527 drivers/dma/s3c24xx-dma.c vchan_get_all_descriptors(&s3cchan->vc, &head); s3cchan 528 drivers/dma/s3c24xx-dma.c vchan_dma_desc_free_list(&s3cchan->vc, &head); s3cchan 536 drivers/dma/s3c24xx-dma.c static void s3c24xx_dma_phy_alloc_and_start(struct s3c24xx_dma_chan *s3cchan) s3cchan 538 drivers/dma/s3c24xx-dma.c struct s3c24xx_dma_engine *s3cdma = s3cchan->host; s3cchan 541 drivers/dma/s3c24xx-dma.c phy = s3c24xx_dma_get_phy(s3cchan); s3cchan 544 drivers/dma/s3c24xx-dma.c s3cchan->name); s3cchan 545 drivers/dma/s3c24xx-dma.c s3cchan->state = S3C24XX_DMA_CHAN_WAITING; s3cchan 550 drivers/dma/s3c24xx-dma.c phy->id, s3cchan->name); s3cchan 552 drivers/dma/s3c24xx-dma.c s3cchan->phy = phy; s3cchan 553 drivers/dma/s3c24xx-dma.c s3cchan->state = S3C24XX_DMA_CHAN_RUNNING; s3cchan 555 drivers/dma/s3c24xx-dma.c s3c24xx_dma_start_next_txd(s3cchan); s3cchan 559 drivers/dma/s3c24xx-dma.c struct s3c24xx_dma_chan *s3cchan) s3cchan 561 drivers/dma/s3c24xx-dma.c struct s3c24xx_dma_engine *s3cdma = s3cchan->host; s3cchan 564 drivers/dma/s3c24xx-dma.c phy->id, s3cchan->name); s3cchan 571 drivers/dma/s3c24xx-dma.c phy->serving = s3cchan; s3cchan 572 drivers/dma/s3c24xx-dma.c s3cchan->phy = phy; s3cchan 573 drivers/dma/s3c24xx-dma.c s3cchan->state = S3C24XX_DMA_CHAN_RUNNING; s3cchan 574 drivers/dma/s3c24xx-dma.c s3c24xx_dma_start_next_txd(s3cchan); s3cchan 581 drivers/dma/s3c24xx-dma.c static void s3c24xx_dma_phy_free(struct s3c24xx_dma_chan *s3cchan) s3cchan 583 drivers/dma/s3c24xx-dma.c struct s3c24xx_dma_engine *s3cdma = s3cchan->host; s3cchan 600 drivers/dma/s3c24xx-dma.c s3c24xx_dma_phy_valid(p, s3cchan->phy)) { s3cchan 607 drivers/dma/s3c24xx-dma.c s3c24xx_dma_terminate_phy(s3cchan->phy); s3cchan 620 drivers/dma/s3c24xx-dma.c s3c24xx_dma_phy_reassign_start(s3cchan->phy, next); s3cchan 628 drivers/dma/s3c24xx-dma.c s3c24xx_dma_put_phy(s3cchan->phy); s3cchan 631 drivers/dma/s3c24xx-dma.c s3cchan->phy = NULL; s3cchan 632 drivers/dma/s3c24xx-dma.c s3cchan->state = S3C24XX_DMA_CHAN_IDLE; s3cchan 638 drivers/dma/s3c24xx-dma.c struct s3c24xx_dma_chan *s3cchan = to_s3c24xx_dma_chan(vd->tx.chan); s3cchan 640 drivers/dma/s3c24xx-dma.c if (!s3cchan->slave) s3cchan 649 drivers/dma/s3c24xx-dma.c struct s3c24xx_dma_chan *s3cchan = phy->serving; s3cchan 661 drivers/dma/s3c24xx-dma.c if (unlikely(!s3cchan)) { s3cchan 670 drivers/dma/s3c24xx-dma.c spin_lock(&s3cchan->vc.lock); s3cchan 671 drivers/dma/s3c24xx-dma.c txd = s3cchan->at; s3cchan 678 drivers/dma/s3c24xx-dma.c s3c24xx_dma_start_next_sg(s3cchan, txd); s3cchan 680 drivers/dma/s3c24xx-dma.c s3cchan->at = NULL; s3cchan 687 drivers/dma/s3c24xx-dma.c if (vchan_next_desc(&s3cchan->vc)) s3cchan 688 drivers/dma/s3c24xx-dma.c s3c24xx_dma_start_next_txd(s3cchan); s3cchan 690 drivers/dma/s3c24xx-dma.c s3c24xx_dma_phy_free(s3cchan); s3cchan 696 drivers/dma/s3c24xx-dma.c s3c24xx_dma_start_next_sg(s3cchan, txd); s3cchan 699 drivers/dma/s3c24xx-dma.c spin_unlock(&s3cchan->vc.lock); s3cchan 710 drivers/dma/s3c24xx-dma.c struct s3c24xx_dma_chan *s3cchan = to_s3c24xx_dma_chan(chan); s3cchan 711 drivers/dma/s3c24xx-dma.c struct s3c24xx_dma_engine *s3cdma = s3cchan->host; s3cchan 715 drivers/dma/s3c24xx-dma.c spin_lock_irqsave(&s3cchan->vc.lock, flags); s3cchan 717 drivers/dma/s3c24xx-dma.c if (!s3cchan->phy && !s3cchan->at) { s3cchan 719 drivers/dma/s3c24xx-dma.c s3cchan->id); s3cchan 724 drivers/dma/s3c24xx-dma.c s3cchan->state = S3C24XX_DMA_CHAN_IDLE; s3cchan 727 drivers/dma/s3c24xx-dma.c if (s3cchan->phy) s3cchan 728 drivers/dma/s3c24xx-dma.c s3c24xx_dma_phy_free(s3cchan); s3cchan 731 drivers/dma/s3c24xx-dma.c if (s3cchan->at) { s3cchan 732 drivers/dma/s3c24xx-dma.c vchan_terminate_vdesc(&s3cchan->at->vd); s3cchan 733 drivers/dma/s3c24xx-dma.c s3cchan->at = NULL; s3cchan 737 drivers/dma/s3c24xx-dma.c s3c24xx_dma_free_txd_list(s3cdma, s3cchan); s3cchan 739 drivers/dma/s3c24xx-dma.c spin_unlock_irqrestore(&s3cchan->vc.lock, flags); s3cchan 746 drivers/dma/s3c24xx-dma.c struct s3c24xx_dma_chan *s3cchan = to_s3c24xx_dma_chan(chan); s3cchan 748 drivers/dma/s3c24xx-dma.c vchan_synchronize(&s3cchan->vc); s3cchan 760 drivers/dma/s3c24xx-dma.c struct s3c24xx_dma_chan *s3cchan = to_s3c24xx_dma_chan(chan); s3cchan 768 drivers/dma/s3c24xx-dma.c spin_lock_irqsave(&s3cchan->vc.lock, flags); s3cchan 776 drivers/dma/s3c24xx-dma.c spin_unlock_irqrestore(&s3cchan->vc.lock, flags); s3cchan 780 drivers/dma/s3c24xx-dma.c vd = vchan_find_desc(&s3cchan->vc, cookie); s3cchan 792 drivers/dma/s3c24xx-dma.c txd = s3cchan->at; s3cchan 798 drivers/dma/s3c24xx-dma.c bytes += s3c24xx_dma_getbytes_chan(s3cchan); s3cchan 800 drivers/dma/s3c24xx-dma.c spin_unlock_irqrestore(&s3cchan->vc.lock, flags); s3cchan 819 drivers/dma/s3c24xx-dma.c struct s3c24xx_dma_chan *s3cchan = to_s3c24xx_dma_chan(chan); s3cchan 820 drivers/dma/s3c24xx-dma.c struct s3c24xx_dma_engine *s3cdma = s3cchan->host; s3cchan 826 drivers/dma/s3c24xx-dma.c len, s3cchan->name); s3cchan 874 drivers/dma/s3c24xx-dma.c return vchan_tx_prep(&s3cchan->vc, &txd->vd, flags); s3cchan 881 drivers/dma/s3c24xx-dma.c struct s3c24xx_dma_chan *s3cchan = to_s3c24xx_dma_chan(chan); s3cchan 882 drivers/dma/s3c24xx-dma.c struct s3c24xx_dma_engine *s3cdma = s3cchan->host; s3cchan 884 drivers/dma/s3c24xx-dma.c struct s3c24xx_dma_channel *cdata = &pdata->channels[s3cchan->id]; s3cchan 894 drivers/dma/s3c24xx-dma.c size, period, s3cchan->name); s3cchan 938 drivers/dma/s3c24xx-dma.c slave_addr = s3cchan->cfg.dst_addr; s3cchan 939 drivers/dma/s3c24xx-dma.c txd->width = s3cchan->cfg.dst_addr_width; s3cchan 944 drivers/dma/s3c24xx-dma.c slave_addr = s3cchan->cfg.src_addr; s3cchan 945 drivers/dma/s3c24xx-dma.c txd->width = s3cchan->cfg.src_addr_width; s3cchan 971 drivers/dma/s3c24xx-dma.c return vchan_tx_prep(&s3cchan->vc, &txd->vd, flags); s3cchan 979 drivers/dma/s3c24xx-dma.c struct s3c24xx_dma_chan *s3cchan = to_s3c24xx_dma_chan(chan); s3cchan 980 drivers/dma/s3c24xx-dma.c struct s3c24xx_dma_engine *s3cdma = s3cchan->host; s3cchan 982 drivers/dma/s3c24xx-dma.c struct s3c24xx_dma_channel *cdata = &pdata->channels[s3cchan->id]; s3cchan 991 drivers/dma/s3c24xx-dma.c sg_dma_len(sgl), s3cchan->name); s3cchan 1027 drivers/dma/s3c24xx-dma.c slave_addr = s3cchan->cfg.dst_addr; s3cchan 1028 drivers/dma/s3c24xx-dma.c txd->width = s3cchan->cfg.dst_addr_width; s3cchan 1033 drivers/dma/s3c24xx-dma.c slave_addr = s3cchan->cfg.src_addr; s3cchan 1034 drivers/dma/s3c24xx-dma.c txd->width = s3cchan->cfg.src_addr_width; s3cchan 1060 drivers/dma/s3c24xx-dma.c return vchan_tx_prep(&s3cchan->vc, &txd->vd, flags); s3cchan 1069 drivers/dma/s3c24xx-dma.c struct s3c24xx_dma_chan *s3cchan = to_s3c24xx_dma_chan(chan); s3cchan 1072 drivers/dma/s3c24xx-dma.c spin_lock_irqsave(&s3cchan->vc.lock, flags); s3cchan 1073 drivers/dma/s3c24xx-dma.c if (vchan_issue_pending(&s3cchan->vc)) { s3cchan 1074 drivers/dma/s3c24xx-dma.c if (!s3cchan->phy && s3cchan->state != S3C24XX_DMA_CHAN_WAITING) s3cchan 1075 drivers/dma/s3c24xx-dma.c s3c24xx_dma_phy_alloc_and_start(s3cchan); s3cchan 1077 drivers/dma/s3c24xx-dma.c spin_unlock_irqrestore(&s3cchan->vc.lock, flags); s3cchan 1415 drivers/dma/s3c24xx-dma.c struct s3c24xx_dma_chan *s3cchan; s3cchan 1420 drivers/dma/s3c24xx-dma.c s3cchan = to_s3c24xx_dma_chan(chan); s3cchan 1422 drivers/dma/s3c24xx-dma.c return s3cchan->id == (uintptr_t)param;