mmc: mmci: create common mmci_dma_setup/release
authorLudovic Barre <ludovic.barre@st.com>
Mon, 8 Oct 2018 12:08:33 +0000 (14:08 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 9 Oct 2018 07:13:03 +0000 (09:13 +0200)
commitc3647fdc6a5a48699a1248a7f3d9a0429369e939
tree991fad512b5c4613290f3dc9b1feaa4ef94130c2
parentf0061fed1f8a9f86ddec303a3f94742a71b20cb7
mmc: mmci: create common mmci_dma_setup/release

This patch creates a common mmci_dma_setup/release which calls
dma_setup/release callbacks of mmci_host_ops and manages
common features like use_dma... If there is a fallbacks to
pio mode, dma functions must check use_dma.

error management:
-mmci_dmae_setup fail if Tx and Rx dma channels are not defined
-qcom_dma_setup fail if one of both dma channels is not defined,
 Qcom has no specific resource to release, just mmci dmae resource.

Signed-off-by: Ludovic Barre <ludovic.barre@st.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/mmci.c
drivers/mmc/host/mmci.h
drivers/mmc/host/mmci_qcom_dml.c