• D
    mmc: dw_mmc: Cleanup the DTO timer like the CTO one · 93c23ae3
    Douglas Anderson 提交于
    The recent CTO timer introduced in commit 03de1921 ("mmc: dw_mmc:
    introduce timer for broken command transfer over scheme") was causing
    observable problems due to race conditions.  Previous patches have
    fixed those race conditions.
    
    It can be observed that these same race conditions ought to be
    theoretically possible with the DTO timer too though they are
    massively less likely to happen because the data timeout is always set
    to 0xffffff right now.  That means even at a 200 MHz card clock we
    were arming the DTO timer for 94 ms:
      >>> (0xffffff * 1000. / 200000000) + 10
      93.886075
    
    We always also were setting the DTO timer _after_ starting the
    transfer, unlike how the old code was seting the CTO timer.
    
    In any case, even though the DTO timer is much less likely to have
    races, it still makes sense to add code to handle it _just in case_.
    Signed-off-by: NDouglas Anderson <dianders@chromium.org>
    Reviewed-by: NShawn Lin <shawn.lin@rock-chips.com>
    Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
    93c23ae3
dw_mmc.c 90.0 KB