Lines Matching refs:dmae
635 struct mmci_dmae_priv *dmae; in mmci_dmae_setup() local
637 dmae = devm_kzalloc(mmc_dev(host->mmc), sizeof(*dmae), GFP_KERNEL); in mmci_dmae_setup()
638 if (!dmae) in mmci_dmae_setup()
641 host->dma_priv = dmae; in mmci_dmae_setup()
643 dmae->rx_channel = dma_request_slave_channel(mmc_dev(host->mmc), in mmci_dmae_setup()
645 dmae->tx_channel = dma_request_slave_channel(mmc_dev(host->mmc), in mmci_dmae_setup()
653 if (dmae->rx_channel && !dmae->tx_channel) in mmci_dmae_setup()
654 dmae->tx_channel = dmae->rx_channel; in mmci_dmae_setup()
656 if (dmae->rx_channel) in mmci_dmae_setup()
657 rxname = dma_chan_name(dmae->rx_channel); in mmci_dmae_setup()
661 if (dmae->tx_channel) in mmci_dmae_setup()
662 txname = dma_chan_name(dmae->tx_channel); in mmci_dmae_setup()
673 if (dmae->tx_channel) { in mmci_dmae_setup()
674 struct device *dev = dmae->tx_channel->device->dev; in mmci_dmae_setup()
680 if (dmae->rx_channel) { in mmci_dmae_setup()
681 struct device *dev = dmae->rx_channel->device->dev; in mmci_dmae_setup()
688 if (!dmae->tx_channel || !dmae->rx_channel) { in mmci_dmae_setup()
702 struct mmci_dmae_priv *dmae = host->dma_priv; in mmci_dmae_release() local
704 if (dmae->rx_channel) in mmci_dmae_release()
705 dma_release_channel(dmae->rx_channel); in mmci_dmae_release()
706 if (dmae->tx_channel) in mmci_dmae_release()
707 dma_release_channel(dmae->tx_channel); in mmci_dmae_release()
708 dmae->rx_channel = dmae->tx_channel = NULL; in mmci_dmae_release()
713 struct mmci_dmae_priv *dmae = host->dma_priv; in mmci_dma_unmap() local
717 chan = dmae->rx_channel; in mmci_dma_unmap()
719 chan = dmae->tx_channel; in mmci_dma_unmap()
727 struct mmci_dmae_priv *dmae = host->dma_priv; in mmci_dmae_error() local
733 dmaengine_terminate_all(dmae->cur); in mmci_dmae_error()
735 dmae->cur = NULL; in mmci_dmae_error()
736 dmae->desc_current = NULL; in mmci_dmae_error()
744 struct mmci_dmae_priv *dmae = host->dma_priv; in mmci_dmae_finalize() local
783 dmae->cur = NULL; in mmci_dmae_finalize()
784 dmae->desc_current = NULL; in mmci_dmae_finalize()
792 struct mmci_dmae_priv *dmae = host->dma_priv; in _mmci_dmae_prep_data() local
811 chan = dmae->rx_channel; in _mmci_dmae_prep_data()
814 chan = dmae->tx_channel; in _mmci_dmae_prep_data()
855 struct mmci_dmae_priv *dmae = host->dma_priv; in mmci_dmae_prep_data() local
856 struct mmci_dmae_next *nd = &dmae->next_data; in mmci_dmae_prep_data()
864 if (dmae->cur && dmae->desc_current) in mmci_dmae_prep_data()
868 return _mmci_dmae_prep_data(host, data, &dmae->cur, in mmci_dmae_prep_data()
869 &dmae->desc_current); in mmci_dmae_prep_data()
874 struct mmci_dmae_priv *dmae = host->dma_priv; in mmci_dmae_start() local
877 dmaengine_submit(dmae->desc_current); in mmci_dmae_start()
878 dma_async_issue_pending(dmae->cur); in mmci_dmae_start()
887 struct mmci_dmae_priv *dmae = host->dma_priv; in mmci_dmae_get_next_data() local
888 struct mmci_dmae_next *next = &dmae->next_data; in mmci_dmae_get_next_data()
895 dmae->desc_current = next->desc; in mmci_dmae_get_next_data()
896 dmae->cur = next->chan; in mmci_dmae_get_next_data()
905 struct mmci_dmae_priv *dmae = host->dma_priv; in mmci_dmae_unprep_data() local
913 struct mmci_dmae_next *next = &dmae->next_data; in mmci_dmae_unprep_data()
916 chan = dmae->rx_channel; in mmci_dmae_unprep_data()
918 chan = dmae->tx_channel; in mmci_dmae_unprep_data()
921 if (dmae->desc_current == next->desc) in mmci_dmae_unprep_data()
922 dmae->desc_current = NULL; in mmci_dmae_unprep_data()
924 if (dmae->cur == next->chan) { in mmci_dmae_unprep_data()
926 dmae->cur = NULL; in mmci_dmae_unprep_data()