mmc: sdhci: Add stop transmission support
Large packed write request may take pretty long time to complete
causing the next read operation (if any) to wait for current write
to complete. Instead we should interrupt the current write operation
and execute waiting read operation and once the read is completed,
go back to interrupted write operation and resume it.
To support this functionality, we have added support for following new
host operations in our driver:
int (*stop_request)(struct mmc_host *host)
=> Call this op to stop the current transfer synchronously.
int (*get_xfer_remain)(struct mmc_host *mmc)
=> Call this op to take decision to interrupt ongoing
transfer or not.
In order to stop the existing write transfer, we have to first reset the
SDHCi controller which would also reset the ADMA (DMA engine). But if
the reset coincide with the ongoing burst on AHB bus then it may cause
the system NOC to go into error state and error response would be
returned for successive bus accesses from SDHCi ADMA. System NOC is
going to error state because of the terminated burst and give response
error for next accesses.
In order to workaround above mentioned issue, we need to ensure that
existing AHB burst request from SDHCi ADMA is completed before
resetting the SDHCi controller.
CRs-fixed: 479949
Change-Id: Ic4aaffb27bed560a1360bfe771b25e8b3b1fb51d
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org>
diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h
index c6bef8a..a3d8442 100644
--- a/drivers/mmc/host/sdhci.h
+++ b/drivers/mmc/host/sdhci.h
@@ -286,6 +286,7 @@
void (*toggle_cdr)(struct sdhci_host *host, bool enable);
unsigned int (*get_max_segments)(void);
void (*platform_bus_voting)(struct sdhci_host *host, u32 enable);
+ void (*disable_data_xfer)(struct sdhci_host *host);
};
#ifdef CONFIG_MMC_SDHCI_IO_ACCESSORS