• Doug Anderson's avatar
    mmc: dw_mmc: Honor requests to set the clock to 0 · fdf492a1
    Doug Anderson authored
    Previously the dw_mmc driver would ignore any requests to disable the
    card's clock.  This doesn't seem like a good thing in general, but had
    one extra bad side effect in the following situation:
    * mmc core would set clk to 400kHz at boot time while scanning
    * mmc core would set clk to 0 since no card, but it would be ignored.
    * suspend to ram and resume; clocks in the dw_mmc IP block are now 0
      but dw_mmc thinks that they're 400kHz (it ignored the set to 0).
    * insert card
    * mmc core would set clk to 400kHz which would be considered a no-op.
    
    Note that if there is no card in the slot and we do a suspend/resume
    cycle, we _do_ still end up with differences in a dw_mmc register
    dump, but the differences are clock related and we've got the clock
    disabled both before and after, so this should be OK.
    Signed-off-by: default avatarDoug Anderson <dianders@chromium.org>
    Signed-off-by: default avatarSeungwon Jeon <tgih.jun@samsung.com>
    Signed-off-by: default avatarChris Ball <cjb@laptop.org>
    fdf492a1
dw_mmc.c 62.2 KB