kernel-fxtec-pro1x/drivers/mmc/host
Arindam Nath f2119df6b7 mmc: sd: add support for signal voltage switch procedure
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: Arindam Nath <arindam.nath@amd.com>
Reviewed-by: Philip Rakity <prakity@marvell.com>
Tested-by: Philip Rakity <prakity@marvell.com>
Acked-by: Zhangfei Gao <zhangfei.gao@marvell.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
2011-05-24 21:04:38 -04:00
..
at91_mci.c mmc: at91_mci: fix multiblock SDIO transfers 2010-12-21 11:46:32 -08:00
atmel-mci-regs.h atmel-mci: add MCI2 register definitions 2009-06-13 22:43:01 +02:00
atmel-mci.c Fix common misspellings 2011-03-31 11:26:23 -03:00
au1xmmc.c tree-wide: fix comment/printk typos 2010-11-01 15:38:34 -04:00
bfin_sdh.c mmc: bfin_sdh: fix alloc size for private data 2011-01-26 00:28:41 -05:00
cb710-mmc.c mmc: cb710: Return err value in cb710_wait_while_busy() 2011-03-15 13:49:42 -04:00
cb710-mmc.h mmc: Driver for CB710/720 memory card reader (MMC part) 2009-06-13 22:42:58 +02:00
davinci_mmc.c mmc: davinci: add support for SDIO irq handling 2011-01-09 19:16:18 -05:00
dw_mmc.c mmc: dw_mmc: set fixed burst in BMOD register 2011-03-25 10:30:49 -04:00
dw_mmc.h mmc: dw_mmc: support DDR mode 2011-03-15 13:51:47 -04:00
imxmmc.c mmc: Remove distinction between hw and phys segments 2010-10-23 21:11:11 +08:00
imxmmc.h imxmmc: use readl/writel 2008-12-16 14:58:17 +01:00
jz4740_mmc.c mmc: jz4740: don't treat NULL clk as an error 2011-01-25 21:53:51 -05:00
Kconfig mmc: sdhci: change CONFIG of MMC_SDHCI_TEGRA from 'tristate' to 'bool' 2011-05-24 20:59:34 -04:00
Makefile mmc: tmio: convert the SDHI MMC driver from MFD to a platform driver 2011-03-25 10:39:23 -04:00
mmc_spi.c Fix common misspellings 2011-03-31 11:26:23 -03:00
mmci.c mmc: mmci: Add ARM variant with extended FIFO 2011-03-25 10:30:49 -04:00
mmci.h ARM: mmci: add dmaengine-based DMA support 2011-02-04 13:25:49 +00:00
msm_sdcc.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc 2011-03-18 22:32:40 -07:00
msm_sdcc.h mmc: msm_sdcc: Add gpio handling function to driver 2011-01-21 16:58:00 -08:00
mvsdio.c mmc: Remove distinction between hw and phys segments 2010-10-23 21:11:11 +08:00
mvsdio.h mmc: SDIO driver for Marvell SoCs 2009-03-24 21:30:03 +01:00
mxcmmc.c mmc: mxcmmc: use dmaengine API 2011-03-15 13:49:32 -04:00
mxs-mmc.c mmc: mxs-mmc: add mmc host driver for i.MX23/28 2011-03-15 13:49:37 -04:00
of_mmc_spi.c mmc: of_mmc_spi: Need to include irq.h and of_irq.h 2011-03-25 10:30:49 -04:00
omap.c mmc: omap: Fix possible NULL pointer deref 2011-04-27 19:15:12 -04:00
omap_hsmmc.c drivers/mmc/host/omap_hsmmc.c: use resource_size() 2011-03-22 17:44:15 -07:00
pxamci.c mmc: Move regulator handling closer to core 2010-10-23 21:11:16 +08:00
pxamci.h
s3cmci.c Fix common misspellings 2011-03-31 11:26:23 -03:00
s3cmci.h s3cmci: DMA fixes 2009-10-01 16:11:15 -07:00
sdhci-cns3xxx.c mmc: sdhci-pltfm: move .h file into appropriate subdir 2010-10-23 21:11:21 +08:00
sdhci-dove.c mmc: Add support for the Marvell Dove SDHCI controller 2011-01-08 21:48:48 -05:00
sdhci-esdhc-imx.c mmc: sdhci-esdhc: enable esdhc on imx53 2011-03-25 10:30:50 -04:00
sdhci-esdhc.h mmc: sdhci-esdhc: remove SDHCI_QUIRK_NO_CARD_NO_RESET from esdhc 2011-03-25 10:30:49 -04:00
sdhci-of-core.c dt: Eliminate of_platform_{,un}register_driver 2011-02-28 13:22:46 -07:00
sdhci-of-esdhc.c mmc: sdhci-esdhc: remove SDHCI_QUIRK_NO_CARD_NO_RESET from esdhc 2011-03-25 10:30:49 -04:00
sdhci-of-hlwd.c sdhci: build fix: rename SDHCI I/O accessor functions 2010-05-27 09:12:40 -07:00
sdhci-of.h sdhci-of: add support for the wii sdhci controller 2009-12-17 15:45:32 -08:00
sdhci-pci.c mmc: sdhci: Fix read-only detection with JMicron 388 chip 2011-05-24 21:02:42 -04:00
sdhci-pltfm.c mmc: add sdhci-tegra driver for Tegra SoCs 2011-01-08 23:52:23 -05:00
sdhci-pltfm.h mmc: sdhci-esdhc: use writel/readl as general APIs 2011-03-25 10:30:50 -04:00
sdhci-pxa.c mmc: sdhci: 8-bit bus width changes 2010-11-22 15:12:04 -05:00
sdhci-s3c.c mmc: sdhci-s3c: Auto CMD12 support 2011-03-15 13:48:25 -04:00
sdhci-spear.c drivers: Final irq namespace conversion 2011-03-29 14:48:19 +02:00
sdhci-tegra.c mmc: tegra: add pm_flags 2011-05-24 20:59:30 -04:00
sdhci.c mmc: sd: add support for signal voltage switch procedure 2011-05-24 21:04:38 -04:00
sdhci.h mmc: sd: add support for signal voltage switch procedure 2011-05-24 21:04:38 -04:00
sdricoh_cs.c tree-wide: fix comment/printk typos 2010-11-01 15:38:34 -04:00
sh_mmcif.c mmc: sh_mmcif: support aggressive clock gating 2011-03-16 12:30:25 -04:00
sh_mobile_sdhi.c mmc: tmio: convert the SDHI MMC driver from MFD to a platform driver 2011-03-25 10:39:23 -04:00
tifm_sd.c mmc: Remove distinction between hw and phys segments 2010-10-23 21:11:11 +08:00
tmio_mmc.c mmc: tmio: split core functionality, DMA and MFD glue 2011-03-25 10:39:11 -04:00
tmio_mmc.h mmc: tmio_mmc: Move some defines into a shared header 2011-03-26 15:58:50 -04:00
tmio_mmc_dma.c mmc: tmio_mmc: Move some defines into a shared header 2011-03-26 15:58:50 -04:00
tmio_mmc_pio.c mmc: tmio: fix .set_ios(MMC_POWER_UP) handling 2011-04-27 19:16:29 -04:00
ushc.c mmc: ushc: Remove duplicate include of usb.h 2011-01-25 21:53:43 -05:00
via-sdmmc.c mmc: use pci_dev->revision 2011-03-25 10:30:49 -04:00
wbsd.c Fix common misspellings 2011-03-31 11:26:23 -03:00
wbsd.h