1. 31 Mar, 2015 4 commits
    • Doug Anderson's avatar
      mmc: dw_mmc: Don't try to enable the CD until we're sure we're not deferring · b793f658
      Doug Anderson authored
      If dw_mci_init_slot() returns that we got a probe deferral then it may
      leave slot->mmc as NULL.  That will cause dw_mci_enable_cd() to crash
      when it calls mmc_gpio_get_cd().
      
      Fix this by moving the call of dw_mci_enable_cd() until we're sure
      that we're good.  Note that if we have more than one slot and one
      defers (but the others don't) things won't work so well.  ...but
      that's not a new thing and everyone has already agreed that multislot
      support ought to be removed from dw_mmc eventually anyway since it is
      unused, untested, and you can see several bugs like this by inspecting
      the code.
      
      Fixes: bcafaf5470f0 ("mmc: dw_mmc: Only enable CD after setup and only if needed")
      Signed-off-by: default avatarDoug Anderson <dianders@chromium.org>
      Signed-off-by: default avatarJaehoon Chung <jh80.chung@samsung.com>
      Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      b793f658
    • Doug Anderson's avatar
      mmc: dw_mmc: Add a timeout for sending CMD11 · 5c935165
      Doug Anderson authored
      In the Designware databook's description of the "Voltage Switch Normal
      Scenario" it instructs us to set a timer and fail the voltage change
      if we don't see the voltage change interrupt within 2ms.  Let's
      implement that.  Without implementing this I have often been able to
      reproduce a hang while trying to send CMD11 on an rk3288-based board
      while constantly ejecting and inserting UHS cards.
      Signed-off-by: default avatarDoug Anderson <dianders@chromium.org>
      Signed-off-by: default avatarJaehoon Chung <jh80.chung@samsung.com>
      Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      5c935165
    • Jaehoon Chung's avatar
      mmc: dw_mmc: enable card read threshold when mode is HS400 · 488b8d63
      Jaehoon Chung authored
      Enable card-read-threshold, when eMMC mode is HS400.
      Refer to f1d2736c (mmc: dw_mmc: control card read threshold)
      Signed-off-by: default avatarJaehoon Chung <jh80.chung@samsung.com>
      Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      488b8d63
    • Ulf Hansson's avatar
      mmc: core: Enable runtime PM management of host devices · 9250aea7
      Ulf Hansson authored
      Currently those host drivers which have deployed runtime PM, deals with
      the runtime PM reference counting entirely by themselves.
      
      Since host drivers don't know when the core will send the next request
      through some of the host_ops callbacks, they need to handle runtime PM
      get/put between each an every request.
      
      In quite many cases this has some negative effects, since it leads to a
      high frequency of scheduled runtime PM suspend operations. That due to
      the runtime PM reference count will normally reach zero in-between
      every request.
      
      We can decrease that frequency, by enabling the core to deal with
      runtime PM reference counting of the host device. Since the core often
      knows that it will send a seqeunce of requests, it makes sense for it
      to keep a runtime PM reference count during these periods.
      
      More exactly, let's increase the runtime PM reference count by invoking
      pm_runtime_get_sync() from __mmc_claim_host(). Restore that action by
      invoking pm_runtime_mark_last_busy() and pm_runtime_put_autosuspend()
      in mmc_release_host(). In this way a runtime PM reference count will be
      kept during the complete cycle of a claim -> release host.
      Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      Acked-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Acked-by: default avatarKonstantin Dorfman <kdorfman@codeaurora.org>
      9250aea7
  2. 27 Mar, 2015 3 commits
  3. 25 Mar, 2015 5 commits
  4. 23 Mar, 2015 28 commits