All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

  1. 29 Feb, 2016 4 commits
  2. 05 Jan, 2016 1 commit
  3. 22 Dec, 2015 4 commits
  4. 27 Oct, 2015 1 commit
    • Chaotian Jing's avatar
      mmc: mmc: extend the mmc_send_tuning() · 9979dbe5
      Chaotian Jing authored
      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: default avatarChaotian Jing <>
      [Ulf: Rebased patch]
      Signed-off-by: default avatarUlf Hansson <>
  5. 26 Oct, 2015 4 commits
    • Shawn Lin's avatar
      mmc: dw_mmc: Add external dma interface support · 3fc7eaef
      Shawn Lin authored
      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: default avatarShawn Lin <>
      Signed-off-by: default avatarJaehoon Chung <>
      Signed-off-by: default avatarUlf Hansson <>
    • Douglas Anderson's avatar
      mmc: core: Add mmc_regulator_set_vqmmc() · 2086f801
      Douglas Anderson authored
      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
        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: default avatarDouglas Anderson <>
      Signed-off-by: default avatarHeiko Stuebner <>
      Signed-off-by: default avatarUlf Hansson <>
    • Ulf Hansson's avatar
      mmc: core: Remove MMC_CLKGATE · 9eadcc05
      Ulf Hansson authored
      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: default avatarUlf Hansson <>
      Reviewed-by: default avatarLinus Walleij <>
    • Ulf Hansson's avatar
      mmc: core: Convert __mmc_switch() into an internal core function · f90d2e40
      Ulf Hansson authored
      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: default avatarUlf Hansson <>
  6. 27 Aug, 2015 1 commit
  7. 17 Aug, 2015 5 commits
    • Addy Ke's avatar
      mmc: dw_mmc: add quirk for broken data transfer over scheme · 57e10486
      Addy Ke authored
      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: default avatarAddy Ke <>
      Signed-off-by: default avatarHeiko Stuebner <>
      Signed-off-by: default avatarJaehoon Chung <>
    • Jaehoon Chung's avatar
      mmc: dw_mmc: remove the unused blk_setting · 2b708df2
      Jaehoon Chung authored
      "blk_setting" doesn't use anywhere.
      Signed-off-by: default avatarJaehoon Chung <>
    • Heiko Stuebner's avatar
      mmc: dw_mmc: fix pio mode when internal dmac is enabled · 575c319d
      Heiko Stuebner authored
      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: default avatarHeiko Stuebner <>
      Signed-off-by: default avatarJaehoon Chung <>
    • Yangbo Lu's avatar
      mmc: sdio: avoid using NULL sdio_irq_thread pointer · f13e5b9f
      Yangbo Lu authored
      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: default avatarYangbo Lu <>
      Signed-off-by: default avatarUlf Hansson <>
    • David Jander's avatar
      mmc: core: Optimize case for exactly one erase-group budget · 642c28ab
      David Jander authored
      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: default avatarDavid Jander <>
      Signed-off-by: default avatarUlf Hansson <>
  8. 18 Jun, 2015 1 commit
  9. 01 Jun, 2015 9 commits
  10. 17 Apr, 2015 1 commit
    • Ulf Hansson's avatar
      Revert "mmc: core: Convert mmc_driver to device_driver" · 96541bac
      Ulf Hansson authored
      This reverts commit 6685ac62 ("mmc: core: Convert mmc_driver to
      The reverted commit went too far in simplifing the device driver parts
      for mmc.
      Let's restore the old mmc_driver to enable driver core to sooner
      or later to remove the ->probe(), ->remove() and ->shutdown() callbacks
      from the struct device_driver.
      Note that, the old ->suspend|resume() callbacks in the struct
      mmc_driver don't need to be restored, since the mmc block layer has
      converted to the modern system PM ops.
      Fixes: 6685ac62 ("mmc: core: Convert mmc_driver to device_driver")
      Signed-off-by: default avatarUlf Hansson <>
      Acked-by: default avatarJaehoon Chung <>
  11. 09 Apr, 2015 1 commit
    • Ben Dooks's avatar
      mmc: dw_mmc: fix fifo ordering in big endian · 76184ac1
      Ben Dooks authored
      The dw_mmc driver changes to make the IO accesors endian agnostic did not
      take into account the fifo accesses do not need to be swapped. To fix this
      add a mmci_fifo_read/write wrapper to allow these to be passed through the
      IO without being swapped.
      Since these are now specific functions, it would be easier just to store
      the pointer to the fifo registers in the host block instead of the offset
      to them. So change the host->data_offset to host->fifo_reg (which also
      means we catch all the places this is read or written).
      Signed-off-by: default avatarBen Dooks <>
      Signed-off-by: default avatarJaehoon Chung <>
      Signed-off-by: default avatarUlf Hansson <>
  12. 08 Apr, 2015 1 commit
  13. 31 Mar, 2015 1 commit
  14. 27 Mar, 2015 1 commit
  15. 23 Mar, 2015 3 commits
  16. 20 Mar, 2015 1 commit
  17. 13 Mar, 2015 1 commit