1. 31 10月, 2013 4 次提交
  2. 25 8月, 2013 2 次提交
  3. 28 6月, 2013 2 次提交
  4. 27 5月, 2013 3 次提交
    • 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
    • F
      mmc: core: Only execute tuning for SDR50 and SDR104 · 810e08ee
      Fredrik Soderstedt 提交于
      Only execute tuning for sd and sdio devices that are using
      SDR50 or SDR104.
      
      Make sure clock is hold during tuning for sdio devices.
      Signed-off-by: NFredrik Soderstedt <fredrik.soderstedt@stericsson.com>
      Acked-by: NJohan Rudholm <jrudholm@gmail.com>
      Acked-by: NUlf Hansson <ulf.hansson@linaro.org>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      810e08ee
  5. 25 2月, 2013 4 次提交
    • K
      mmc: sdhci: enhance preset value function · 52983382
      Kevin Liu 提交于
      4d55c5a1 ("mmc: sdhci: enable preset value after uhs initialization")
      added preset value support and enabled it by default during sd card init.
      
      Below are the enhancements introduced by this patch:
      
      1. In current code, preset value is enabled after setting clock finished,
      which means the clock is manually set by driver firstly and then suddenly
      switched to preset value at this point. So the first setting is useless
      and unnecessary. What's more, the first clock setting may differ from the
      preset one.  The better way is enable preset value just after switch to
      UHS mode so the preset value can take effect immediately. So move preset
      value enable from mmc_sd_init_card to sdhci_set_ios which will be called
      during set timing.
      
      2. In current code, preset value is disabled at the beginning of
      mmc_attach_sd.  It's too late since low freq (400khz) should be set in
      mmc_power_up.  So move preset value disable to sdhci_set_ios which will
      be called during power up.
      
      3. host->clock and ios->drv_type should also be updated according to the
      preset value if it's enabled. Current code missed this.
      
      4. This patch also introduce a quirk to disable preset value in case
      preset value doesn't work.
      
      This patch has been verified on sdhci-pxav3 platform with both preset
      enabled and disabled.
      Signed-off-by: NKevin Liu <kliu5@marvell.com>
      Reviewed-by: NUlf Hansson <ulf.hansson@linaro.org>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      52983382
    • J
      mmc: core: Fixup signal voltage switch · 0797e5f1
      Johan Rudholm 提交于
      When switching SD and SDIO cards from 3.3V to 1.8V signal levels, the
      clock should be gated for 5 ms during the step. After enabling the
      clock, the host should wait for at least 1 ms before checking for
      failure. Failure by the card to switch is indicated by dat[0:3] being
      pulled low. The host should check for this condition and power-cycle
      the card if failure is indicated.
      
      Add a retry mechanism for the SDIO case.
      
      If the voltage switch fails repeatedly, give up and continue the
      initialization using the original voltage.
      
      This patch places a couple of requirements on the host driver:
      
       1) mmc_set_ios with ios.clock = 0 must gate the clock
       2) mmc_power_off must actually cut the power to the card
       3) The card_busy host_ops member must be implemented
      
      if these requirements are not fulfilled, the 1.8V signal voltage switch
      will still be attempted but may not be successful.
      Signed-off-by: NJohan Rudholm <johan.rudholm@stericsson.com>
      Signed-off-by: NKevin Liu <kliu5@marvell.com>
      Acked-by: NUlf Hansson <ulf.hansson@linaro.org>
      Tested-by: NWei WANG <wei_wang@realsil.com.cn>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      0797e5f1
    • J
      mmc: core: Break out start_signal_voltage_switch · 567c8903
      Johan Rudholm 提交于
      Allow callers to access the start_signal_voltage_switch host_ops
      member without going through any cmd11 logic. This is mostly a
      preparation for the following signal voltage switch patch.
      
      Also, reset ios.signal_voltage to its original value if
      start_signal_voltage_switch fails.
      Signed-off-by: NJohan Rudholm <johan.rudholm@stericsson.com>
      Acked-by: NUlf Hansson <ulf.hansson@linaro.org>
      Tested-by: NWei WANG <wei_wang@realsil.com.cn>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      567c8903
    • J
      3f8a7fab
  6. 23 7月, 2012 3 次提交
    • A
      mmc: core: reset signal voltage on power up · 108ecc4c
      Aaron Lu 提交于
      Add a call to mmc_set_signal_voltage() to set signal voltage to 3.3v in
      mmc_power_up so that we do not need to touch signal voltage setting in
      mmc/sd/sdio init functions and rescan function.
      
      For mmc/sd cards, when doing a suspend/resume cycle, consider the unsafe
      resume case, the card will lose its power and when powered on again, we
      will set signal voltage to 3.3v in mmc_power_up before its resume function
      gets called, which will re-init the card.
      
      And for sdio cards, when doing a suspend/resume cycle, consider the unsafe
      resume case, the card will either lose its power or not depending on if it
      wants to wakeup the host. If power is not maintained, it is the same case as
      mmc/sd cards. If power is maintained, mmc_power_up will not be called and
      the card's signal voltage will remain at the last setting.
      Signed-off-by: NAaron Lu <aaron.lu@amd.com>
      Tested-by: NVenkatraman S <svenkatr@ti.com>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      108ecc4c
    • A
      mmc: sd: Fix sd current limit setting · 55c4665e
      Aaron Lu 提交于
      Host has different current capabilities at different voltages, we need
      to record these settings seperately. The defined voltages are 1.8/3.0/3.3.
      For other voltages, we do not touch current limit setting.
      
      Before we set the current limit for the sd card, find out the host's
      operating voltage first and then find out the current capabilities of
      the host at that voltage to set the current limit.
      Signed-off-by: NAaron Lu <aaron.lu@amd.com>
      Reviewed-by: NPhilip Rakity <prakity@marvell.com>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      55c4665e
    • A
      mmc: core: Simplify and fix for SD switch processing · a39ca6ae
      Aaron Lu 提交于
      In mmc_read_switch, just do a one time mode 0 switch command to get the
      support bits information, no need to do multiple times as the support
      bits do not change with different arguments.
      
      And no need to check current limit support bits, as these bits are
      fixed according to the signal voltage. If the signal voltage is 1.8V,
      the support bits would be 0xf and if the signal voltage is 3.3V, the
      support bits would be 0x01. We will check host's ability to set the
      current limit.
      Signed-off-by: NAaron Lu <aaron.lu@amd.com>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      a39ca6ae
  7. 21 7月, 2012 2 次提交
  8. 06 6月, 2012 1 次提交
  9. 05 3月, 2012 1 次提交
  10. 14 2月, 2012 1 次提交
  11. 13 1月, 2012 1 次提交
  12. 12 1月, 2012 3 次提交
  13. 01 11月, 2011 1 次提交
  14. 27 10月, 2011 4 次提交
  15. 01 9月, 2011 1 次提交
    • S
      mmc: sd: UHS-I bus speed should be set last in UHS initialization · 93c712f9
      Subhash Jadavani 提交于
      mmc_sd_init_uhs_card function sets the driver type, current limit
      and bus speed mode on card as well as on host controller side.
      
      Currently bus speed mode is set by sending CMD6 to card and
      immediately setting the timing mode in host controller. But
      then before initiating tuning sequence, it also tries to set
      current limit by sending CMD6 to card which results in data
      timeout errors in controller if bus speed mode is SDR50/SDR104 mode.
      
      So basically bus speed mode should be set only after current limit
      is set in the card and immediately after setting the bus speed mode,
      tuning sequence should be initiated.
      Signed-off-by: NSubhash Jadavani <subhashj@codeaurora.org>
      Reviewed-by: NArindam Nath <arindam.nath@amd.com>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      93c712f9
  16. 21 7月, 2011 1 次提交
    • P
      mmc: core: Set non-default Drive Strength via platform hook · ca8e99b3
      Philip Rakity 提交于
      Non default Drive Strength cannot be set automatically.  It is a function
      of the board design and only if there is a specific platform handler can
      it be set.  The platform handler needs to take into account the board
      design.  Pass to the platform code the necessary information.
      
      For example:  The card and host controller may indicate they support HIGH
      and LOW drive strength.  There is no way to know what should be chosen
      without specific board knowledge.  Setting HIGH may lead to reflections
      and setting LOW may not suffice.  There is no mechanism (like ethernet
      duplex or speed pulses) to determine what should be done automatically.
      
      If no platform handler is defined -- use the default value.
      Signed-off-by: NPhilip Rakity <prakity@marvell.com>
      Reviewed-by: NArindam Nath <arindam.nath@amd.com>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      ca8e99b3
  17. 26 5月, 2011 1 次提交
  18. 25 5月, 2011 5 次提交