1. 19 6月, 2019 1 次提交
  2. 29 5月, 2019 1 次提交
  3. 23 5月, 2019 2 次提交
  4. 22 5月, 2019 2 次提交
    • M
      mmc: tmio: sdhi: HS400 manual adjustment · b5900a58
      Marek Vasut 提交于
      Since Gen3 SDHI has an internal DS signal AC-spec violation in HS400 mode,
      CRC-error may occur in read command in HS400 mode. This phoenomenon occurs
      at low/high temperature.
      
      To fix this, after completion of HS400 tuning, enable manual calibration.
      However, Gen3 M3 Ver.1.2 or earlier and H3 1.x does not support HS400.
      These SoC forcibly use HS200 mode by SoC attribute.
      
      The DT adjustment of the tuning parameters is not supported until the
      DT property names become clear.
      Signed-off-by: NMarek Vasut <marek.vasut+renesas@gmail.com>
      Adapted from a patch by Takeshi Saito <takeshi.saito.xv@renesas.com>
      Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
      Cc: Peng Fan <peng.fan@nxp.com>
      b5900a58
    • M
      mmc: tmio: sdhi: Minor macro cleanup · 1bac2b6b
      Marek Vasut 提交于
      Clean up the whitespaces in macros, no functional change.
      Signed-off-by: NMarek Vasut <marek.vasut+renesas@gmail.com>
      Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
      Cc: Peng Fan <peng.fan@nxp.com>
      1bac2b6b
  5. 20 5月, 2019 1 次提交
    • L
      Revert "mmc: fsl_esdhc: fix sd/mmc ddr mode clock setting issue" · b6a04275
      Lukasz Majewski 提交于
      This reverts commit 72a89e0d, which
      causes the imx53 HSC to hang as the eMMC is not working properly anymore.
      
      The exact error message:
      MMC write: dev # 0, block # 2, count 927 ... mmc write failed
      0 blocks written: ERROR
      
      imx53 is not using the DDR mode.
      
      Debugging of pre_div and div generation showed that those values are
      generated in a way, which is not matching the ones from working setup.
      
      As the original patch was performing code refactoring, let's revert this
      change, so all imx53 boards would work again.
      Signed-off-by: NLukasz Majewski <lukma@denx.de>
      b6a04275
  6. 05 5月, 2019 1 次提交
  7. 03 5月, 2019 4 次提交
    • F
      mmc: sdhci: Add Support for ADMA2 · 37cb626d
      Faiz Abbas 提交于
      The Standard Host Controller Interface (SDHCI) specification version
      3.00 adds support for Advanced DMA (ADMA) for both 64 and 32 bit widths
      of DMA. ADMA2 uses a table of descriptors for aggregating DMA requests.
      This significantly improves read and write throughput.
      
      Add Support for the same.
      Signed-off-by: NFaiz Abbas <faiz_abbas@ti.com>
      37cb626d
    • F
      mmc: sdhci: Move DMA handling to prepare_dma() function · 6d6af205
      Faiz Abbas 提交于
      In preparation for addition of ADMA2 support, cleanup SDMA handling by
      moving it to a new sdhci_prepare_dma() function. Also add a flags field
      in sdhci_host to indicate if DMA is enabled.
      Signed-off-by: NFaiz Abbas <faiz_abbas@ti.com>
      6d6af205
    • Y
      mmc: fsl_esdhc: Fix wp_enable issue · da8e1f3c
      Ye Li 提交于
      The wp-gpios property is used for gpio, if this is set, the WP pin is muxed
      to gpio function, can't be used as internal WP checking. However the codes
      remain to use internal WP checking.
      
      This patch changes to examine the "fsl,wp-controller" for enabling internal WP
      checking, and "wp-gpios" for muxing to gpio.
      Signed-off-by: NYe Li <ye.li@nxp.com>
      da8e1f3c
    • Y
      mmc: fsl_esdhc: fix sd/mmc ddr mode clock setting issue · 72a89e0d
      Ye Li 提交于
      When sd/mmc work at DDR mode, like HS400/HS400ES/DDR52/DDR50 mode,
      the output clock rate is half of the internal clock rate.
      
      This patch set the DDR_EN bit first for DDR mode, hardware divide
      the usdhc clock automatically, then follow the original sdr clock
      setting method.
      Signed-off-by: NHaibo Chen <haibo.chen@nxp.com>
      Signed-off-by: NYe Li <ye.li@nxp.com>
      72a89e0d
  8. 01 5月, 2019 1 次提交
  9. 29 4月, 2019 3 次提交
    • M
      mmc: dw_mmc: Round up descriptor end to nearest multiple of cacheline size · bdb5df1a
      Marek Vasut 提交于
      The driver currently calculates the end address of cache flush operation
      for the DMA descriptors by adding cacheline size to the start address of
      the last DMA descriptor. This is not safe, as the cacheline size may be,
      in some unlikely cases, smaller than the DMA descriptor size. Replace the
      addition with roundup() applied on the end address of the last DMA
      descriptor to round it up to the nearest cacheline size multiple.
      Signed-off-by: NMarek Vasut <marex@denx.de>
      Cc: Jaehoon Chung <jh80.chung@samsung.com>
      Cc: Simon Glass <sjg@chromium.org>
      bdb5df1a
    • M
      mmc: dw_mmc: Handle return value from bounce_buffer_start() · 6ad5aec4
      Marek Vasut 提交于
      The bounce_buffer_start() can return -ENOMEM in case memory allocation
      failed. However, in that case, the bounce buffer address is the same as
      the possibly unaligned input address, and the cache maintenance operations
      were not applied to this address. This could cause subtle problems. Add
      handling for the bounce_buffer_start() return value to prevent such a
      problem from happening.
      Signed-off-by: NMarek Vasut <marex@denx.de>
      Cc: Jaehoon Chung <jh80.chung@samsung.com>
      Cc: Simon Glass <sjg@chromium.org>
      6ad5aec4
    • M
      mmc: dw_mmc: Calculate timeout from transfer length · 4e16f0a6
      Marek Vasut 提交于
      The current 4-minute data transfer timeout is misleading and broken.
      Instead of such a long wait, calculate the timeout duration based on
      the length of the data transfer. The current formula is the transfer
      length in bits, divided by a multiplication of bus frequency in Hz,
      bus width, DDR mode and converted the mSec. The value is bounded from
      the bottom to 1000 mSec.
      Signed-off-by: NMarek Vasut <marex@denx.de>
      Cc: Jaehoon Chung <jh80.chung@samsung.com>
      Cc: Simon Glass <sjg@chromium.org>
      4e16f0a6
  10. 26 4月, 2019 1 次提交
  11. 24 4月, 2019 3 次提交
  12. 23 4月, 2019 3 次提交
  13. 18 4月, 2019 1 次提交
  14. 12 4月, 2019 1 次提交
  15. 29 3月, 2019 1 次提交
    • B
      mmc: correct the HS400 initialization process · 5cf12031
      BOUGH CHEN 提交于
      After the commit b9a2a0e2 ("mmc: Add support for downgrading
      HS200/HS400 to HS mode"), it add a parameter in mmc_set_card_speed()
      which indicates that the HS200/HS400 to HS downgrade is happening.
      
      During the HS400 initialization, first select to HS200, and config
      the related clock rate, then downgrade to HS mode. So here also need
      to config the downgrade value to be true for two reasons. First,
      make sure in the function mmc_set_card_speed(), after switch to HS
      mode, first config the clock rate, then read the EXT_CSD, avoid
      receiving data of EXT_CSD in HS mode at 200MHz. Second, after issue
      the MMC_CMD_SWITCH command, it need to wait a bit then switch bus
      properties.
      
      Test on i.MX8QM MEK board, some Micron eMMC will stuck in transfer
      mode in this case, and USDHC will never get data transfer complete
      status, cause the uboot hang.
      Signed-off-by: NHaibo Chen <haibo.chen@nxp.com>
      Acked-by: NMarek Vasut <marek.vasut@gmail.com>
      5cf12031
  16. 26 3月, 2019 2 次提交
  17. 25 3月, 2019 1 次提交
    • M
      mmc: Align MMC_TRACE with tiny printf · 7d5ccb1a
      Marek Vasut 提交于
      The tiny printf implementation only supports %x format specifier,
      it does not support %X . Since it makes little difference whether
      the debug output prints hex numbers in capitals or not, change it
      to %x and make the MMC_TRACE output work with tiny printf too.
      Signed-off-by: NMarek Vasut <marex@denx.de>
      Cc: Jaehoon Chung <jh80.chung@samsung.com>
      Cc: Simon Glass <sjg@chromium.org>
      7d5ccb1a
  18. 25 2月, 2019 2 次提交
  19. 18 2月, 2019 1 次提交
  20. 17 2月, 2019 3 次提交
  21. 16 2月, 2019 1 次提交
  22. 10 2月, 2019 2 次提交
  23. 09 2月, 2019 2 次提交
    • F
      mmc: omap_hsmmc: Workaround errata regarding SDR104/HS200 tuning failures (i929) · 351a4aa0
      Faiz Abbas 提交于
      Errata i929 in certain OMAP5/DRA7XX/AM57XX silicon revisions
      (SPRZ426D - November 2014 - Revised February 2018 [1]) mentions
      unexpected tuning pattern errors. A small failure band may be present
      in the tuning range which may be missed by the current algorithm.
      Furthermore, the failure bands vary with temperature leading to
      different optimum tuning values for different temperatures.
      
      As suggested in the related Application Report (SPRACA9B - October 2017
      - Revised July 2018 [2]), tuning should be done in two stages.
      In stage 1, assign the optimum ratio in the maximum pass window for the
      current temperature. In stage 2, if the chosen value is close to the
      small failure band, move away from it in the appropriate direction.
      
      References:
      [1] http://www.ti.com/lit/pdf/sprz426
      [2] http://www.ti.com/lit/pdf/SPRACA9Signed-off-by: NFaiz Abbas <faiz_abbas@ti.com>
      351a4aa0
    • M
      mmc: Do not poll using CMD13 when changing timing · 6892550c
      Marek Vasut 提交于
      When using CMD6 to switch eMMC card timing from HS200/HS400 to HS/legacy,
      do not poll for the completion status using CMD13, but rather wait 50mS.
      
      Once the card receives the CMD6 and starts executing it, the bus is in
      undefined state until both the card finishes executing the command and
      until the controller switches the bus to matching timing configuration.
      During this time, it is not possible to transport any commands or data
      across the bus, which includes the CMD13.
      Signed-off-by: NMarek Vasut <marek.vasut+renesas@gmail.com>
      Cc: Jaehoon Chung <jh80.chung@samsung.com>
      6892550c