1. 25 7月, 2016 4 次提交
  2. 17 5月, 2016 1 次提交
    • A
      mmc: core: Add a facility to "pause" re-tuning · 7ff27609
      Adrian Hunter 提交于
      Re-tuning is not possible when switched to the RPMB
      partition.  However re-tuning should not be needed
      if re-tuning is done immediately before switching,
      a small set of operations is done, and then we
      immediately switch back to the main partition.
      
      To ensure that re-tuning can't be done for a short
      while, add a facility to "pause" re-tuning.
      
      The existing facility to hold / release re-tuning
      is used but it also flags re-tuning as needed to cause
      re-tuning before the next command (which will be the
      switch to RPMB).
      
      We also need to "unpause" in the recovery path, which
      is catered for by adding it to mmc_retune_disable().
      Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com>
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      7ff27609
  3. 12 5月, 2016 1 次提交
  4. 02 5月, 2016 6 次提交
  5. 29 2月, 2016 4 次提交
  6. 06 1月, 2016 1 次提交
  7. 22 12月, 2015 4 次提交
  8. 27 10月, 2015 1 次提交
    • C
      mmc: mmc: extend the mmc_send_tuning() · 9979dbe5
      Chaotian Jing 提交于
      The mmc_execute_tuning() has already prepared the opcode,
      there is no need to prepare it again at mmc_send_tuning(),
      and, there is a BUG of mmc_send_tuning() to determine the opcode
      by bus width, assume eMMC was running at HS200, 4bit mode,
      then the mmc_send_tuning() will overwrite the opcode from CMD21
      to CMD19, then got error.
      
      in addition, extend an argument of "cmd_error" to allow getting
      if there was cmd error when tune response.
      Signed-off-by: NChaotian Jing <chaotian.jing@mediatek.com>
      [Ulf: Rebased patch]
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      9979dbe5
  9. 26 10月, 2015 4 次提交
    • S
      mmc: dw_mmc: Add external dma interface support · 3fc7eaef
      Shawn Lin 提交于
      DesignWare MMC Controller can supports two types of DMA
      mode: external dma and internal dma. We get a RK312x platform
      integrated dw_mmc and ARM pl330 dma controller. This patch add
      edmac ops to support these platforms. I've tested it on RK31xx
      platform with edmac mode and RK3288 platform with idmac mode.
      Signed-off-by: NShawn Lin <shawn.lin@rock-chips.com>
      Signed-off-by: NJaehoon Chung <jh80.chung@samsung.com>
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      3fc7eaef
    • D
      mmc: core: Add mmc_regulator_set_vqmmc() · 2086f801
      Douglas Anderson 提交于
      This adds logic to the MMC core to set VQMMC.  This is expected to be
      called by MMC drivers like dw_mmc as part of (or instead of) their
      start_signal_voltage_switch() callback.
      
      A few notes:
      
      * When setting the signal voltage to 3.3V we do our best to make VQMMC
        and VMMC match.  It's been reported that this makes some old cards
        happy since they were tested back in the day before UHS when VQMMC
        and VMMC were provided by the same regulator.  A nice side effect of
        this is that we don't end up on the hairy edge of VQMMC (2.7V),
        which some EEs claim is a little too close to the minimum for
        comfort.
        This is done in two steps. At first we try to find a VQMMC within
        a 0.3V tolerance of VMMC and if this is not supported by the
        supplying regulator we try to find a suitable voltage within the
        whole 2.7V-3.6V area of the spec.
      
      * The two step approach is currently necessary, as the used
        regulator_set_voltage_triplet(min, target, max) uses a simple
        implementation that just tries two basic steps:
      	regulator_set_voltage(target, max);
      	regulator_set_voltage(min, target);
        So with only one step with 2.7-3.6V borders, if a suitable voltage
        is a bit below VMMC, we would directly get the lowest 2.7V
        which some boards (like Rockchips) don't like at all.
      
      * When setting the signal voltage to 1.8V or 1.2V we aim for that
        specific voltage instead of picking the lowest one in the range.
      
      * We very purposely don't print errors in mmc_regulator_set_vqmmc().
        There are cases where the MMC core will try several different
        voltages and we don't want to pollute the logs.
      Signed-off-by: NDouglas Anderson <dianders@chromium.org>
      Signed-off-by: NHeiko Stuebner <heiko@sntech.de>
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      2086f801
    • U
      mmc: core: Remove MMC_CLKGATE · 9eadcc05
      Ulf Hansson 提交于
      MMC_CLKGATE was once invented to save power by gating the bus clock at
      request inactivity. At that time it served its purpose. The modern way to
      deal with power saving for these scenarios, is by using runtime PM.
      
      Nowadays, several host drivers have deployed runtime PM, but for those
      that haven't and which still cares power saving at request inactivity,
      it's certainly time to deploy runtime PM as it has been around for several
      years now.
      
      To simplify code to mmc core and thus decrease maintenance efforts, this
      patch removes all code related to MMC_CLKGATE.
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      Reviewed-by: NLinus Walleij <linus.walleij@linaro.org>
      9eadcc05
    • U
      mmc: core: Convert __mmc_switch() into an internal core function · f90d2e40
      Ulf Hansson 提交于
      As there are no users of the __mmc_switch() API, except for the mmc core
      itself, let's convert it from an exported function into an internal.
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      f90d2e40
  10. 27 8月, 2015 1 次提交
  11. 17 8月, 2015 5 次提交
    • A
      mmc: dw_mmc: add quirk for broken data transfer over scheme · 57e10486
      Addy Ke 提交于
      This patch add a new quirk to add a s/w timer to notify the driver
      to terminate current transfer and report a data timeout to the core,
      if DTO interrupt does NOT come within the given time.
      
      dw_mmc call mmc_request_done func to finish transfer depends on
      DTO interrupt. If DTO interrupt does not come in sending data state,
      the current transfer will be blocked.
      
      We got the reply from synopsys:
      There are two counters but both use the same value of [31:8] bits.
      Data timeout counter doesn't wait for stop clock and you should get
      DRTO even when the clock is not stopped.
      Host Starvation timeout counter is triggered with stop clock condition.
      
      This means that host should get DRTO and DTO interrupt.
      
      But this case really exists, when driver reads tuning data from
      card on RK3288-pink2 board. I measured waveforms by oscilloscope
      and found that card clock was always on and data lines were always
      holded high level in sending data state.
      
      There are two possibility that data over interrupt doesn't come in
      reading data state on RK3X SoCs:
      - get command done interrupt, but doesn't get any data-related interrupt.
      - get data error interrupt, but doesn't get data over interrupt.
      Signed-off-by: NAddy Ke <addy.ke@rock-chips.com>
      Signed-off-by: NHeiko Stuebner <heiko@sntech.de>
      Signed-off-by: NJaehoon Chung <jh80.chung@samsung.com>
      57e10486
    • J
      mmc: dw_mmc: remove the unused blk_setting · 2b708df2
      Jaehoon Chung 提交于
      "blk_setting" doesn't use anywhere.
      Signed-off-by: NJaehoon Chung <jh80.chung@samsung.com>
      2b708df2
    • H
      mmc: dw_mmc: fix pio mode when internal dmac is enabled · 575c319d
      Heiko Stuebner 提交于
      The dw_mci_init_dma() may decide to not use dma, but pio instead, caused
      by things like wrong dma settings in the system.
      
      Till now the code dw_mci_init_slot() always assumed that dma is available
      when CONFIG_MMC_DW_IDMAC was defined, ignoring the host->use_dma var
      set during dma init.
      
      So when now the dma init failed for whatever reason, the transfer sizes
      would still be set for dma transfers, especially including the maximum
      block-count calculated from host->ring_size and resulting in a
      
      [    4.991109] ------------[ cut here ]------------
      [    4.991111] kernel BUG at drivers/mmc/core/core.c:256!
      [    4.991113] Internal error: Oops - BUG: 0 [#1] SMP ARM
      
      because host->ring_size is 0 in this case and the slot init code uses
      the wrong code to calculate the values.
      
      Fix this by selecting the correct calculations using the host->use_dma
      variable instead of the CONFIG_MMC_DW_IDMAC config option.
      Signed-off-by: NHeiko Stuebner <heiko@sntech.de>
      Signed-off-by: NJaehoon Chung <jh80.chung@samsung.com>
      575c319d
    • Y
      mmc: sdio: avoid using NULL sdio_irq_thread pointer · f13e5b9f
      Yangbo Lu 提交于
      For Freescale QorIQ LS1021AQDS board, there is a SDIO interrupt
      in the process of resume without inserting SD adapter because of
      some unknown issue. But the driver doesn't assign sdio_irq_thread
      pointer. This will block the resume of kernel. This patch is used
      to avoid using NULL sdio_irq_thread pointer.
      Signed-off-by: NYangbo Lu <yangbo.lu@freescale.com>
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      f13e5b9f
    • D
      mmc: core: Optimize case for exactly one erase-group budget · 642c28ab
      David Jander 提交于
      In the (not so unlikely) case that the mmc controller timeout budget is
      enough for exactly one erase-group, the simplification of allowing one
      sector has an enormous performance penalty. We optimize this special case
      by introducing a flag that prohibits erase-group boundary crossing, so
      that we can allow trimming more than one sector at a time.
      Signed-off-by: NDavid Jander <david@protonic.nl>
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      642c28ab
  12. 18 6月, 2015 1 次提交
  13. 01 6月, 2015 7 次提交