Lines Matching refs:dmae

739 	struct mmci_dmae_priv *dmae;  in mmci_dmae_setup()  local
741 dmae = devm_kzalloc(mmc_dev(host->mmc), sizeof(*dmae), GFP_KERNEL); in mmci_dmae_setup()
742 if (!dmae) in mmci_dmae_setup()
745 host->dma_priv = dmae; in mmci_dmae_setup()
747 dmae->rx_channel = dma_request_chan(mmc_dev(host->mmc), "rx"); in mmci_dmae_setup()
748 if (IS_ERR(dmae->rx_channel)) { in mmci_dmae_setup()
749 int ret = PTR_ERR(dmae->rx_channel); in mmci_dmae_setup()
750 dmae->rx_channel = NULL; in mmci_dmae_setup()
754 dmae->tx_channel = dma_request_chan(mmc_dev(host->mmc), "tx"); in mmci_dmae_setup()
755 if (IS_ERR(dmae->tx_channel)) { in mmci_dmae_setup()
756 if (PTR_ERR(dmae->tx_channel) == -EPROBE_DEFER) in mmci_dmae_setup()
759 dmae->tx_channel = NULL; in mmci_dmae_setup()
767 if (dmae->rx_channel && !dmae->tx_channel) in mmci_dmae_setup()
768 dmae->tx_channel = dmae->rx_channel; in mmci_dmae_setup()
770 if (dmae->rx_channel) in mmci_dmae_setup()
771 rxname = dma_chan_name(dmae->rx_channel); in mmci_dmae_setup()
775 if (dmae->tx_channel) in mmci_dmae_setup()
776 txname = dma_chan_name(dmae->tx_channel); in mmci_dmae_setup()
787 if (dmae->tx_channel) { in mmci_dmae_setup()
788 struct device *dev = dmae->tx_channel->device->dev; in mmci_dmae_setup()
794 if (dmae->rx_channel) { in mmci_dmae_setup()
795 struct device *dev = dmae->rx_channel->device->dev; in mmci_dmae_setup()
802 if (!dmae->tx_channel || !dmae->rx_channel) { in mmci_dmae_setup()
816 struct mmci_dmae_priv *dmae = host->dma_priv; in mmci_dmae_release() local
818 if (dmae->rx_channel) in mmci_dmae_release()
819 dma_release_channel(dmae->rx_channel); in mmci_dmae_release()
820 if (dmae->tx_channel) in mmci_dmae_release()
821 dma_release_channel(dmae->tx_channel); in mmci_dmae_release()
822 dmae->rx_channel = dmae->tx_channel = NULL; in mmci_dmae_release()
827 struct mmci_dmae_priv *dmae = host->dma_priv; in mmci_dma_unmap() local
831 chan = dmae->rx_channel; in mmci_dma_unmap()
833 chan = dmae->tx_channel; in mmci_dma_unmap()
841 struct mmci_dmae_priv *dmae = host->dma_priv; in mmci_dmae_error() local
847 dmaengine_terminate_all(dmae->cur); in mmci_dmae_error()
849 dmae->cur = NULL; in mmci_dmae_error()
850 dmae->desc_current = NULL; in mmci_dmae_error()
858 struct mmci_dmae_priv *dmae = host->dma_priv; in mmci_dmae_finalize() local
897 dmae->cur = NULL; in mmci_dmae_finalize()
898 dmae->desc_current = NULL; in mmci_dmae_finalize()
906 struct mmci_dmae_priv *dmae = host->dma_priv; in _mmci_dmae_prep_data() local
925 chan = dmae->rx_channel; in _mmci_dmae_prep_data()
928 chan = dmae->tx_channel; in _mmci_dmae_prep_data()
981 struct mmci_dmae_priv *dmae = host->dma_priv; in mmci_dmae_prep_data() local
982 struct mmci_dmae_next *nd = &dmae->next_data; in mmci_dmae_prep_data()
990 if (dmae->cur && dmae->desc_current) in mmci_dmae_prep_data()
994 return _mmci_dmae_prep_data(host, data, &dmae->cur, in mmci_dmae_prep_data()
995 &dmae->desc_current); in mmci_dmae_prep_data()
1000 struct mmci_dmae_priv *dmae = host->dma_priv; in mmci_dmae_start() local
1004 ret = dma_submit_error(dmaengine_submit(dmae->desc_current)); in mmci_dmae_start()
1009 dma_async_issue_pending(dmae->cur); in mmci_dmae_start()
1018 struct mmci_dmae_priv *dmae = host->dma_priv; in mmci_dmae_get_next_data() local
1019 struct mmci_dmae_next *next = &dmae->next_data; in mmci_dmae_get_next_data()
1026 dmae->desc_current = next->desc; in mmci_dmae_get_next_data()
1027 dmae->cur = next->chan; in mmci_dmae_get_next_data()
1036 struct mmci_dmae_priv *dmae = host->dma_priv; in mmci_dmae_unprep_data() local
1044 struct mmci_dmae_next *next = &dmae->next_data; in mmci_dmae_unprep_data()
1047 chan = dmae->rx_channel; in mmci_dmae_unprep_data()
1049 chan = dmae->tx_channel; in mmci_dmae_unprep_data()
1052 if (dmae->desc_current == next->desc) in mmci_dmae_unprep_data()
1053 dmae->desc_current = NULL; in mmci_dmae_unprep_data()
1055 if (dmae->cur == next->chan) { in mmci_dmae_unprep_data()
1057 dmae->cur = NULL; in mmci_dmae_unprep_data()