1. 09 7月, 2014 1 次提交
  2. 13 5月, 2014 5 次提交
  3. 22 4月, 2014 1 次提交
  4. 21 4月, 2014 1 次提交
  5. 23 2月, 2014 3 次提交
  6. 14 2月, 2014 4 次提交
  7. 14 1月, 2014 1 次提交
  8. 31 10月, 2013 9 次提交
    • U
      mmc: core: Add MMC_CAP_RUNTIME_RESUME to resume at runtime_resume · 4d223782
      Ulf Hansson 提交于
      In some environments it is to prefer to postpone the resume of the card
      device until runtime_resume is being carried out, since it will mean a
      signficant decrease of the total system resume time.
      
      The reason of the decreased resume time is simply because of the actual
      re-initalization of the card, which typically takes hundreds of
      milliseconds, is performed outside the resume sequence and wont thus
      affect it.
      
      For removable card, the detect work tries to re-detect the card to make
      sure it is still present, as a part of that sequence the card will also
      be runtime_resumed and thus also fully resumed.
      
      For a non-removable card, typically a mmc blk request will trigger a
      runtime_resume and thus fully resume the card. This also means the
      first request will likely suffer from an inital latency since the
      re-initialization of the card needs to be performed.
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      4d223782
    • U
      mmc: core: Improve runtime PM support during suspend/resume for sd/mmc · 0cb403a2
      Ulf Hansson 提交于
      The card device is considered as in-active after it has been suspended.
      To prevent any further runtime PM requests in suspend state, we then
      disable runtime PM.
      
      After the card device has been resumed, we shall consider it as active,
      like we also do after a probe sequence. When resumed, we can safely
      enable runtime PM again.
      
      This will make sure the PM core can request the card device to go to
      in-active state after a resume has been completed. Previously we had to
      wait for new pm_runtime_get->pm_runtime_put cycle to be executed.
      
      Additionally, once a resume has been carried out, update the last busy
      mark. At the moment this will have no effect but if the PM core will
      respect autosuspend enabled devices, when it directly triggers a
      runtime_suspend from a runtime_idle, it will mean the card device will
      be scheduled for a delayed runtime_suspend instead of done immediately.
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      0cb403a2
    • U
      mmc: core: Remove redundant mmc_power_up|off at runtime callbacks · 0cc81a8c
      Ulf Hansson 提交于
      Commit "mmc: core: Push common suspend|resume code into each bus_ops"
      moved the responsibility for doing mmc_power_up|off into each
      suspend/resume bus_ops. When using MMC_CAP_AGGRESSIVE_PM, through the
      runtime callbacks, calls to mmc_power_up|off became redundant.
      
      When removing them, we are also able to remove the calls to
      mmc_claim|release_host, thus simplifing code a bit more.
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      0cc81a8c
    • U
      mmc: Don't force card to active state when entering suspend/shutdown · 9ec775f7
      Ulf Hansson 提交于
      By adding a card state that records if it is suspended or resumed, we
      can accept asyncronus suspend/resume requests for the mmc and sd
      bus_ops.
      
      MMC_CAP_AGGRESSIVE_PM, will at request inactivity through the runtime
      bus_ops callbacks, execute a suspend of the the card. In the state were
      this has been done, we can receive a suspend request for the mmc bus,
      which for sd and mmc forced the card to active state by a
      pm_runtime_get_sync. In other words, the card was resumed and then
      immediately suspended again, completely unnecessary.
      
      Since the suspend/resume bus_ops callbacks for sd and mmc are now
      capable of handling asynchronous requests, we no longer need to force
      the card to active state before executing suspend. Evidently preventing
      the above sequence for MMC_CAP_AGGRESSIVE_PM.
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      9ec775f7
    • U
      mmc: core: Collect common code for card ocr validation · 726d6f23
      Ulf Hansson 提交于
      Since mmc_select_voltage now only gets called from the attach sequence,
      it makes sense to move the out of spec validations of the card ocr into
      this function.
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      726d6f23
    • U
      mmc: core: Prevent violation of specs while initializing cards · ce69d37b
      Ulf Hansson 提交于
      According to eMMC/SD/SDIO specs, the VDD (VCC) voltage level must be
      maintained during the initialization sequence. If we want/need to tune
      the voltage level, a complete power cycle of the card must be executed.
      
      Most host drivers conforms to the specifications by only allowing to
      change VDD voltage level at the MMC_POWER_UP state, but some also cares
      about MMC_POWER_ON state, which they should'nt. This patch will not
      break those drivers, but they could clean up code to better reflect
      what is expected from the protocol layer.
      
      A big re-work of the mmc_select_voltage function is done to only change
      VDD voltage level if the host supports MMC_CAP2_FULL_PWR_CYCLE.
      Otherwise only validation of the host and card ocr mask will be done.
      
      A very nice side-effect of this patch is that we now don't need to
      reset the negotiated ocr mask at the mmc_power_off function, since now
      it will actually reflect the present voltage level, which safely can be
      used at the next power up and re-initialization. Moreover, we then only
      need to execute mmc_select_voltage from the attach sequence.
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      ce69d37b
    • U
      mmc: core: Move cached value of the negotiated ocr mask to card struct · 69041150
      Ulf Hansson 提交于
      The negotiated ocr mask is directly related to the card. Once a card
      gets removed, the mask shall be dropped. By moving the cache of the ocr
      mask from the host struct to the card struct we have accomplished this.
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      69041150
    • U
      mmc: core: Let mmc_power_up|cycle take ocr as parameter · 4a065193
      Ulf Hansson 提交于
      As a step to fixup the setup of the negotiated ocr mask, we need the
      mmc_power_up|cycle functions to take the ocr as a parameter.
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      4a065193
    • U
      mmc: core: Do not poll for busy with status cmd for all switch cmds · 878e200b
      Ulf Hansson 提交于
      Some switch operations like poweroff notify, shall according to the
      spec not be followed by any other new commands. For these cases and
      when the host does'nt support MMC_CAP_WAIT_WHILE_BUSY, we must not
      send status commands to poll for busy detection. Instead wait for
      the stated timeout from the EXT_CSD before completing the request.
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      Cc: Jaehoon Chung <jh80.chung@samsung.com>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      878e200b
  9. 06 7月, 2013 1 次提交
    • R
      mmc: core: production year for eMMC 4.41 and later · 7c4f10ac
      Romain Izard 提交于
      The field containing the production date in the CID register only uses
      4 bits to encode the year, starting from 1997 in the original standard.
      In 2013, the production year field contains 0, and the kernel reports a
      1997 production date.
      
      The eMMC 4.51 specification adds a new interpretation rule. For all
      devices implementing the 4.41 specification or later, the production
      year field will be interpreted as a value between 2010 and 2025, with
      0 corresponding to 2013.
      Signed-off-by: NRomain Izard <romain.izard.pro@gmail.com>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      7c4f10ac
  10. 28 6月, 2013 5 次提交
  11. 27 6月, 2013 1 次提交
  12. 27 5月, 2013 5 次提交
    • F
      mmc: core: Fix select power class after resume · 60443712
      Fredrik Soderstedt 提交于
      Use the saved values in card->ext_csd when selecting power class.
      By doing this the power class will be selected even if mmc_init_card
      is called with oldcard != NULL, which is the case after a suspend/resume.
      
      Today ext_csd is NULL if mmc_init_card is called with oldcard != NULL
      and power class will not be selected.
      
      According to the eMMC specification the POWER_CLASS value is reset after
      power failure, H/W reset assertion and any CMD0 reset.
      Signed-off-by: NFredrik Soderstedt <fredrik.soderstedt@stericsson.com>
      Reviewed-by: NJohan Rudholm <jrudholm@gmail.com>
      Acked By: Girish K S <girish.shivananjappa@linaro.org>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      60443712
    • U
      mmc: core: Restructure and simplify code for mmc sleep|awake · 07a68216
      Ulf Hansson 提交于
      The mmc_card_sleep|awake APIs are not being used since the support is
      already properly encapsulated within the suspend sequence. Sleep|awake
      command is also specific for eMMC.
      
      We remove the sleep|awake bus_ops, the mmc_card_sleep|awake APIs and
      move the code into the mmc specific core instead. This also includes
      the mmc ops function, mmc_sleepawake. All releated functions have then
      become static and we have got far less code to maintain.
      
      Additionally this patch also simplifies the code from mmc_sleepawake,
      since it is only used to put the card to sleep and not awake.
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      07a68216
    • U
      mmc: core: Support aggressive power management for (e)MMC/SD · c4d770d7
      Ulf Hansson 提交于
      Aggressive power management is suitable when saving power is
      essential. At request inactivity timeout, aka pm runtime
      autosuspend timeout, the card will be suspended.
      
      Once a new request arrives, the card will be re-initalized and
      thus the first request will suffer from a latency. This latency
      is card-specific, experiments has shown in general that SD-cards
      has quite poor initialization time, around 300ms-1100ms. eMMC is
      not surprisingly far better but still a couple of hundreds of ms
      has been observed.
      
      Except for the request latency, it is important to know that
      suspending the card will also prevent the card from executing
      internal house-keeping operations in idle mode. This could mean
      degradation in performance.
      
      To use this feature make sure the request inactivity timeout is
      chosen carefully. This has not been done as a part of this patch.
      
      Enable this feature by using host cap MMC_CAP_AGGRESSIVE_PM and
      by setting CONFIG_MMC_UNSAFE_RESUME.
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      c4d770d7
    • U
      mmc: block: Enable runtime pm for mmc blkdevice · e94cfef6
      Ulf Hansson 提交于
      Once the mmc blkdevice is being probed, runtime pm will be enabled.
      By using runtime autosuspend, the power save operations can be done
      when request inactivity occurs for a certain time. Right now the
      selected timeout value is set to 3 s. Obviously this value will likely
      need to be configurable somehow since it needs to be trimmed depending
      on the power save algorithm.
      
      For SD-combo cards, we are still leaving the enablement of runtime PM
      to the SDIO init sequence since it depends on the capabilities of the
      SDIO func driver.
      
      Moreover, when the blk device is being suspended, we make sure the device
      will be runtime resumed. The reason for doing this is that we want the
      host suspend sequence to be unaware of any runtime power save operations
      done for the card in this phase. Thus it can just handle the suspend as
      the card is fully powered from a runtime perspective.
      
      Finally, this patch prepares to make it possible to move BKOPS handling
      into the runtime callbacks for the mmc bus_ops. Thus IDLE BKOPS can be
      accomplished.
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      e94cfef6
    • U
      mmc: core: Stop bkops for eMMC only from mmc suspend · 39b9431b
      Ulf Hansson 提交于
      Move mmc suspend specific operations to be executed from the .suspend
      callback in the mmc bus_ops. This simplifies the mmc_suspend_host
      function which is supposed to handle nothing but common suspend tasks.
      
      Since eMMC can be considered non-removable there are no need to check
      for ongoing bkops at PM_SUSPEND_PREPARE notification so remove it.
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      39b9431b
  13. 05 4月, 2013 1 次提交
  14. 23 3月, 2013 1 次提交
  15. 25 2月, 2013 1 次提交