mmc: dw_mmc: Allow lower TMOUT value than maximum
authorMårten Lindahl <marten.lindahl@axis.com>
Fri, 19 Nov 2021 15:53:37 +0000 (16:53 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 14 Dec 2021 20:35:25 +0000 (21:35 +0100)
commit6a8c2018e872906dddf34da40ddcac54cd7b967f
tree0b0b43a2302e0e5b6be8c9bedc04eabc45aad901
parent76bfc7ccc2fa9d382576f6013b57a0ef93d5a722
mmc: dw_mmc: Allow lower TMOUT value than maximum

The TMOUT register is always set with a full value for every transfer,
which (with a 200MHz clock) will give a full DRTO of ~84 milliseconds.
This is normally good enough to complete the request, but setting a full
value makes it impossible to test shorter timeouts, when for example
testing data read times on different SD cards.

Add a function to set any value smaller than the maximum of 0xFFFFFF.

Signed-off-by: Mårten Lindahl <marten.lindahl@axis.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Link: https://lore.kernel.org/r/20211119155337.14341-1-marten.lindahl@axis.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/dw_mmc.c