aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mmc/dw_mmc.h
diff options
context:
space:
mode:
authorAddy Ke <addy.ke@rock-chips.com>2015-08-11 01:27:18 +0900
committerUlf Hansson <ulf.hansson@linaro.org>2015-08-17 12:45:28 +0200
commit57e104864bc4874a36796fd222d8d084dbf90b9b (patch)
tree9f7445eb170c5d5ba794b01d454ad08fa73d74e4 /include/linux/mmc/dw_mmc.h
parentmmc: dw_mmc: print the message for deprecated property (diff)
downloadlinux-dev-57e104864bc4874a36796fd222d8d084dbf90b9b.tar.xz
linux-dev-57e104864bc4874a36796fd222d8d084dbf90b9b.zip
mmc: dw_mmc: add quirk for broken data transfer over scheme
This patch add a new quirk to add a s/w timer to notify the driver to terminate current transfer and report a data timeout to the core, if DTO interrupt does NOT come within the given time. dw_mmc call mmc_request_done func to finish transfer depends on DTO interrupt. If DTO interrupt does not come in sending data state, the current transfer will be blocked. We got the reply from synopsys: There are two counters but both use the same value of [31:8] bits. Data timeout counter doesn't wait for stop clock and you should get DRTO even when the clock is not stopped. Host Starvation timeout counter is triggered with stop clock condition. This means that host should get DRTO and DTO interrupt. But this case really exists, when driver reads tuning data from card on RK3288-pink2 board. I measured waveforms by oscilloscope and found that card clock was always on and data lines were always holded high level in sending data state. There are two possibility that data over interrupt doesn't come in reading data state on RK3X SoCs: - get command done interrupt, but doesn't get any data-related interrupt. - get data error interrupt, but doesn't get data over interrupt. Signed-off-by: Addy Ke <addy.ke@rock-chips.com> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Diffstat (limited to 'include/linux/mmc/dw_mmc.h')
-rw-r--r--include/linux/mmc/dw_mmc.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/mmc/dw_mmc.h b/include/linux/mmc/dw_mmc.h
index b14fcb5012f1..134c57422740 100644
--- a/include/linux/mmc/dw_mmc.h
+++ b/include/linux/mmc/dw_mmc.h
@@ -98,6 +98,7 @@ struct mmc_data;
* @irq_flags: The flags to be passed to request_irq.
* @irq: The irq value to be passed to request_irq.
* @sdio_id0: Number of slot0 in the SDIO interrupt registers.
+ * @dto_timer: Timer for broken data transfer over scheme.
*
* Locking
* =======
@@ -200,6 +201,7 @@ struct dw_mci {
int sdio_id0;
struct timer_list cmd11_timer;
+ struct timer_list dto_timer;
};
/* DMA ops for Internal/External DMAC interface */
@@ -222,6 +224,8 @@ struct dw_mci_dma_ops {
#define DW_MCI_QUIRK_HIGHSPEED BIT(2)
/* Unreliable card detection */
#define DW_MCI_QUIRK_BROKEN_CARD_DETECTION BIT(3)
+/* Timer for broken data transfer over scheme */
+#define DW_MCI_QUIRK_BROKEN_DTO BIT(4)
struct dma_pdata;