• Ludovic Barre's avatar
    mmc: mmci: add hardware busy timeout feature · 8266c585
    Ludovic Barre authored
    In the stm32_sdmmc variant, the datatimer is active not only during
    data transfers with the DPSM, but also while waiting for the busyend
    IRQs from commands having the MMC_RSP_BUSY flag set. This leads to an
    incorrect IRQ being raised to signal MCI_DATATIMEOUT error, which
    simply breaks the behaviour.
    
    Address this by updating the datatimer value before sending a command
    having the MMC_RSP_BUSY flag set. To inform the mmc core about the
    maximum supported busy timeout, which also depends on the current
    clock rate, set ->max_busy_timeout (in ms).
    Signed-off-by: default avatarLudovic Barre <ludovic.barre@st.com>
    Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
    8266c585
mmci.c 56.6 KB