1. 25 5月, 2011 9 次提交
    • A
      mmc: sd: add support for signal voltage switch procedure · f2119df6
      Arindam Nath 提交于
      Host Controller v3.00 adds another Capabilities register. Apart
      from other things, this new register indicates whether the Host
      Controller supports SDR50, SDR104, and DDR50 UHS-I modes. The spec
      doesn't mention about explicit support for SDR12 and SDR25 UHS-I
      modes, so the Host Controller v3.00 should support them by default.
      Also if the controller supports SDR104 mode, it will also support
      SDR50 mode as well. So depending on the host support, we set the
      corresponding MMC_CAP_* flags. One more new register. Host Control2
      is added in v3.00, which is used during Signal Voltage Switch
      procedure described below.
      
      Since as per v3.00 spec, UHS-I supported hosts should set S18R
      to 1, we set S18R (bit 24) of OCR before sending ACMD41. We also
      need to set XPC (bit 28) of OCR in case the host can supply >150mA.
      This support is indicated by the Maximum Current Capabilities
      register of the Host Controller.
      
      If the response of ACMD41 has both CCS and S18A set, we start the
      signal voltage switch procedure, which if successfull, will switch
      the card from 3.3V signalling to 1.8V signalling. Signal voltage
      switch procedure adds support for a new command CMD11 in the
      Physical Layer Spec v3.01. As part of this procedure, we need to
      set 1.8V Signalling Enable (bit 3) of Host Control2 register, which
      if remains set after 5ms, means the switch to 1.8V signalling is
      successfull. Otherwise, we clear bit 24 of OCR and retry the
      initialization sequence. When we remove the card, and insert the
      same or another card, we need to make sure that we start with 3.3V
      signalling voltage. So we call mmc_set_signal_voltage() with
      MMC_SIGNAL_VOLTAGE_330 set so that we are back to 3.3V signalling
      voltage before we actually start initializing the card.
      
      Tested by Zhangfei Gao with a Toshiba uhs card and general hs card,
      on mmp2 in SDMA mode.
      Signed-off-by: NArindam Nath <arindam.nath@amd.com>
      Reviewed-by: NPhilip Rakity <prakity@marvell.com>
      Tested-by: NPhilip Rakity <prakity@marvell.com>
      Acked-by: NZhangfei Gao <zhangfei.gao@marvell.com>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      f2119df6
    • T
      mmc: sdhci: Fix read-only detection with JMicron 388 chip · 82b0e23a
      Takashi Iwai 提交于
      On HP laptops with JMicron 388 chip, the write-locked SD card isn't
      detected correctly as read-only in many cases.  This is because the
      PRESENT_STATE register becomes unsable just after plugging, and it
      returns the WRITE_PROTECT bit wrongly at the first read.
      
      This patch fixes the read-only detection by adding a new sdhci quirk
      indicating to check the register more intensively with a relatively
      long delay.
      
      The patch is tested with 2.6.39-rc4 kernel.
      
      Cc: Aries Lee <arieslee@jmicron.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      82b0e23a
    • P
      mmc: sdhci: Add pre and post reset processing for chip specific reset · 393c1a34
      Philip Rakity 提交于
      Marvell pxa controllers have private registers that may need to be
      modified before and after a reset is done.
      
      For example, the SD reset operation, RESET_ALL, will reset the private
      registers to their default state.  This will cause the clock adjustment
      registers that may have been programmed to have incorrect values.
      
      RESET_DATA sometimes needs to be delayed before the reset is done
      (depending on SoC) to enable any transactions being handled by the
      SDIO card to be completed.  Needed in pre SD 3.0 silicon to handle
      clock gating.
      
      Implement hooks to allow this to happen.
      Signed-off-by: NPhilip Rakity <prakity@marvell.com>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      393c1a34
    • M
      mmc: sdhci: Fix SDHCI_QUIRK_TIMEOUT_USES_SDCLK · 4b01681c
      Mark Brown 提交于
      Commit 373e6a (mmc: sdhci: R1B command handling + MMC_CAP_ERASE) moved the
      handling of SDHCI_QUIRK_TIMEOUT_USES_SDCLK from sdhci_calc_timeout() to
      sdhci_add_host(). This causes division by zero errors on at least the S3C
      SDHCI controller as the quirk implementation needs host->clock set to work
      but host->clock has not been set when sdhci_add_host() is called.
      
      Fix this by backing out that portion of the change, the clock may vary at
      runtime anyway. It does occur to me that we may want to move the quirk to
      where we set the clock but this seems more invasive and I'm concerned
      about undesirable side effects.
      Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
      Cc: Andrei Warkentin <andreiw@motorola.com>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      4b01681c
    • M
      mmc: sdhci: work around broken dma boundary behavior · f6a03cbf
      Mikko Vinni 提交于
      Some SD host controllers (noticed on an integrated JMicron SD reader on an
      HP Pavilion dv5-1250eo laptop) don't update the dma address register before
      signaling a dma interrupt due to a dma boundary. Update the register
      manually to the next boundary (by default 512KiB), at which the transfer
      stopped.
      
      As long as each transfer is at most 512KiB in size (guaranteed by a BUG_ON
      in sdhci_prepare_data()) and the boundary is kept at the default value,
      this fix is needed at most once per transfer. Smaller boundaries are taken
      care of by counting the transferred bytes.
      
      Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=28462Signed-off-by: NMikko Vinni <mmvinni@yahoo.com>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      f6a03cbf
    • A
      mmc: sdhci: R1B command handling + MMC_CAP_ERASE. · a3c7778f
      Andrei Warkentin 提交于
      ERASE command needs R1B response, so fix R1B-type command
      handling for SDHCI controller. For non-DAT commands using a busy
      response, the cmd->cmd_timeout_ms (in ms) field is used for timeout
      calculations.
      
      Based on patch by Chuanxiao Dong <chuanxiao.dong@intel.com>
      Signed-off-by: NAndrei Warkentin <andreiw@motorola.com>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      a3c7778f
    • A
      mmc: sdhci-pci: Fix checkpatch.pl errors · b177bc91
      Ameya Palande 提交于
      This patch fixes 21 errors and 6 warnings reported by checkpatch.pl.
      Signed-off-by: NAmeya Palande <2ameya@gmail.com>
      Reviewed-by: NWolfram Sang <w.sang@pengutronix.de>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      b177bc91
    • S
      mmc: sdhci: change CONFIG of MMC_SDHCI_TEGRA from 'tristate' to 'bool' · 766a6bf6
      Shawn Guo 提交于
      This config option is used to decide whether tegra sdhci support
      should be build into the sdhci-platform module.  So setting it 'm'
      is nonsense, since we can't build part of an module as a module.
      The effect for 'm' will probably be the same as for 'n'.
      Signed-off-by: NShawn Guo <shawn.guo@linaro.org>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      766a6bf6
    • V
      mmc: tegra: add pm_flags · c7f409e3
      Venkat Rao 提交于
      Enable fast bcm4329 WIFI suspend/resume on Tegra2 board.
      
      This patch allows the mach-tegra support to tell the tegra MMC host
      controller to NOT turn off power for the MMC controller the WIFI part
      lives behind.  Thus bcm4329 firmware doesn't need to be reloaded.
      Signed-off-by: NVenkat Rao <vrao@broadcom.com>
      Tested-by: NGrant Grundler <grundler@chromium.org>
      Reviewed-by: NOlof Johansson <olof@lixom.net>
      Acked-by: NOlof Johansson <olof@lixom.net>
      Signed-off-by: NChris Ball <cjb@laptop.org>
      c7f409e3
  2. 28 4月, 2011 5 次提交
  3. 31 3月, 2011 1 次提交
  4. 29 3月, 2011 1 次提交
  5. 28 3月, 2011 1 次提交
  6. 27 3月, 2011 1 次提交
  7. 25 3月, 2011 16 次提交
  8. 23 3月, 2011 5 次提交
  9. 18 3月, 2011 1 次提交