1. 29 12月, 2014 1 次提交
  2. 08 12月, 2014 1 次提交
  3. 05 12月, 2014 1 次提交
  4. 26 11月, 2014 5 次提交
    • M
      mmc: core: add core-level function for sending tuning commands · 996903de
      Minda Chen 提交于
      According to the SD card spec, Add a manual tuning command function
      for SDR104/HS200.
      Sending command 19 or command 21 to read data and compare with the
      tunning block pattern.
      
      This patch will help to decrease some platform private codes in SDHCI
      platform_execute_tuning() callbacks.
      Signed-off-by: NMinda Chen <Minda.Chen@csr.com>
      Signed-off-by: NBarry Song <Baohua.Song@csr.com>
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      996903de
    • V
      mmc: core: hold SD Clock before CMD11 during Signal · c6eb5880
      Vincent Yang 提交于
      Voltage Switch Procedure
      
      This patch is to fix an issue found on mb86s7x platforms.
      
      [symptom]
      There are some UHS-1 SD memory cards sometimes cannot be detected correctly,
      e.g., Transcend 600x SDXC 64GB UHS-1 memory card.
      During Signal Voltage Switch Procedure, failure to switch is indicated
      by the card holding DAT[3:0] low.
      
      [analysis]
      According to SD Host Controller Simplified Specification Version 3.00
      chapter 3.6.1, the Signal Voltage Switch Procedure should be:
      (1) Check S18A; (2) Issue CMD11; (3) Check CMD 11 response;
      (4) Stop providing SD clock; (5) Check DAT[3:0] should be 0000b;
      (6) Set 1.8V Signal Enable; (7) Wait 5ms; (8) Check 1.8V Signal Enable;
      (9) Provide SD Clock; (10) Wait 1ms; (11) Check DAT[3:0] should be 1111b;
      (12) error handling
      
      With CONFIG_MMC_CLKGATE=y, sometimes there is one more gating/un-gating
      SD clock between (2) and (3). In this case, some UHS-1 SD cards will hold
      DAT[3:0] 0000b at (11) and thus fails Signal Voltage Switch Procedure.
      
      [solution]
      By mmc_host_clk_hold() before CMD11, the additional gating/un-gating
      SD clock between (2) and (3) can be prevented and thus no failure at (11).
      It has been verified with many UHS-1 SD cards on mb86s7x platforms and
      works correctly.
      Signed-off-by: NVincent Yang <Vincent.Yang@tw.fujitsu.com>
      Reviewed-by: NJohan Rudholm <jrudholm@gmail.com>
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      c6eb5880
    • N
      mmc: core: reset sdio card properly on resume. · 006fc51c
      NeilBrown 提交于
      mmc_sdio_power_restore() calls
      	mmc_send_if_cond(host, host->card->ocr);
      
      	ret = mmc_send_io_op_cond(host, 0, NULL);
      
      between mmc_go_idle() and mmc_sdio_init_card().
      mmc_sdio_resume() needs to as well, else my libertas sdio wifi
      device doesn't resume properly from suspend.
      Signed-off-by: NNeilBrown <neilb@suse.de>
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      006fc51c
    • N
      mmc: core: use card->ocr when negotiating voltage setting in mmc_sdio_power_restore · 59b6c9e0
      NeilBrown 提交于
      As we are restoring power to a known card, it makes sense to use
      the 'ocr' value known for the card rather than the generic one
      for the host interface.
      This matches the use of card->ocr passed to mmc_power_up in
      mmc_sdio_runtime_resume  (just before mmc_sdio_power_restore is
      called), and the value passed to mmc_sdio_init_card() a little
      later in mmc_sdio_power_restore().
      Suggested-by: NUlf Hansson <ulf.hansson@linaro.org>
      Signed-off-by: NNeilBrown <neilb@suse.de>
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      59b6c9e0
    • J
      mmc: core: consistent handling of initial values · 2d079c43
      Johan Rudholm 提交于
      mmc_do_hw_reset(), mmc_power_up() and mmc_power_off() all set similar
      initial values for bus_mode, bus_width, chip_select and timing. Let's
      make this handling simpler and more consistent by sticking them
      together in a common function. This will introduce small changes in
      behavior in the following places:
      
      mmc_power_off():
      
        For SPI hosts, explicitly set bus_mode = MMC_BUSMODE_PUSHPULL and
        chip_select = MMC_CS_HIGH, before we left them as they were.
      
        For non-SPI hosts, set bus_mode = MMC_BUSMODE_PUSHPULL instead of
        MMC_BUSMODE_OPENDRAIN as before.
      
        These two changes should not be a problem since the device will be
        powered off anyway.
      
      mmc_do_hw_reset():
      
        Always set bus_mode = MMC_BUSMODE_PUSHPULL, as required by SD/SDIO
        cards. MMC cards require MMC_BUSMODE_OPENDRAIN, but this is taken
        care of by mmc_init_card() and mmc_attach_mmc().
      Signed-off-by: NJohan Rudholm <johanru@axis.com>
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      2d079c43
  5. 10 11月, 2014 25 次提交
  6. 05 11月, 2014 1 次提交
    • K
      mmc: core: fix card detection regression · a31b0c6c
      Kristina Martsenko 提交于
      Since commit 89168b48 ("mmc: core: restore detect line inversion
      semantics"), the SD card on i.MX28 (and possibly other) devices isn't
      detected and booting stops at:
      
      [    4.120617] Waiting for root device /dev/mmcblk0p3...
      
      This is caused by the MMC_CAP2_CD_ACTIVE_HIGH flag being set incorrectly
      when the host controller doesn't use a GPIO for card detection (but
      instead uses a dedicated pin). In this case mmc_gpiod_request_cd() will
      return before assigning to the gpio_invert variable, leaving the
      variable uninitialized. The variable then gets used to set the flag.
      This patch fixes the issue by making sure gpio_invert is set to false
      when a GPIO isn't used. After this patch, i.MX28 boots fine.
      
      The MMC_CAP2_RO_ACTIVE_HIGH (write protect) flag is also set incorrectly
      for the exact same reason (it uses the same uninitialized variable), so
      this patch fixes that too.
      
      Fixes: 89168b48 ("mmc: core: restore detect line inversion semantics")
      Reported-by: NStefan Wahren <stefan.wahren@i2se.com>
      Signed-off-by: NKristina Martšenko <kristina.martsenko@gmail.com>
      Tested-by: NFabio Estevam <fabio.estevam@freescale.com>
      Signed-off-by: NUlf Hansson <ulf.hansson@linaro.org>
      a31b0c6c
  7. 02 10月, 2014 1 次提交
  8. 30 9月, 2014 1 次提交
  9. 29 9月, 2014 2 次提交
  10. 24 9月, 2014 2 次提交