]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
mmc: dw_mmc: add quirk for broken data transfer over scheme
authorAddy Ke <addy.ke@rock-chips.com>
Mon, 10 Aug 2015 16:27:18 +0000 (01:27 +0900)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 17 Aug 2015 10:45:28 +0000 (12:45 +0200)
commit57e104864bc4874a36796fd222d8d084dbf90b9b
tree9f7445eb170c5d5ba794b01d454ad08fa73d74e4
parent40a7a463a80ae9e3b85a9fd85cf704fb9ac28b6f
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>
drivers/mmc/host/dw_mmc-rockchip.c
drivers/mmc/host/dw_mmc.c
include/linux/mmc/dw_mmc.h