From e9968c6fa8e7852184135e84116c6c77ebb2987d Mon Sep 17 00:00:00 2001 From: Ulf Hansson Date: Tue, 29 Jan 2019 15:35:56 +0100 Subject: mmc: mmci: Send a CMD12 to clear the DPSM at errors The current approach with sending a CMD12 (STOP_TRANSMISSION) to complete a data transfer request, either because of using the open-ended transmission type or because of receiving an error during a pre-defined data transfer, isn't sufficient for the STM32 sdmmc variant. More precisely, this variant needs to clear the DPSM ("Data Path State Machine") by sending a CMD12, for all failing ADTC commands. Support this, by adding a struct mmc_command inside the struct mmci_host and initialize it to a CMD12 during ->probe(). Let's also add checks for the new conditions, to enable mmci_data_irq() and mmci_cmd_irq() to postpone the calls to mmci_request_end(), but instead send the CMD12. Cc: Ludovic Barre Signed-off-by: Ulf Hansson Tested-by: Ludovic Barre --- drivers/mmc/host/mmci.h | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/mmc/host/mmci.h') diff --git a/drivers/mmc/host/mmci.h b/drivers/mmc/host/mmci.h index 24229097d05c..14df81054438 100644 --- a/drivers/mmc/host/mmci.h +++ b/drivers/mmc/host/mmci.h @@ -377,6 +377,7 @@ struct mmci_host { void __iomem *base; struct mmc_request *mrq; struct mmc_command *cmd; + struct mmc_command stop_abort; struct mmc_data *data; struct mmc_host *mmc; struct clk *clk; -- cgit v1.2.3