linux/drivers/mmc/core
Kevin Liu 52983382c7 mmc: sdhci: enhance preset value function
4d55c5a1 ("mmc: sdhci: enable preset value after uhs initialization")
added preset value support and enabled it by default during sd card init.

Below are the enhancements introduced by this patch:

1. In current code, preset value is enabled after setting clock finished,
which means the clock is manually set by driver firstly and then suddenly
switched to preset value at this point. So the first setting is useless
and unnecessary. What's more, the first clock setting may differ from the
preset one.  The better way is enable preset value just after switch to
UHS mode so the preset value can take effect immediately. So move preset
value enable from mmc_sd_init_card to sdhci_set_ios which will be called
during set timing.

2. In current code, preset value is disabled at the beginning of
mmc_attach_sd.  It's too late since low freq (400khz) should be set in
mmc_power_up.  So move preset value disable to sdhci_set_ios which will
be called during power up.

3. host->clock and ios->drv_type should also be updated according to the
preset value if it's enabled. Current code missed this.

4. This patch also introduce a quirk to disable preset value in case
preset value doesn't work.

This patch has been verified on sdhci-pxav3 platform with both preset
enabled and disabled.

Signed-off-by: Kevin Liu <kliu5@marvell.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
2013-02-24 14:37:11 -05:00
..
bus.c mmc: fix async request mechanism for sequential read scenarios 2013-02-11 13:28:49 -05:00
bus.h mmc: rename dev_to_mmc_card() to mmc_dev_to_card() 2010-10-23 21:11:12 +08:00
core.c mmc: core: Fixup signal voltage switch 2013-02-24 14:37:08 -05:00
core.h mmc: core: Break out start_signal_voltage_switch 2013-02-24 14:37:07 -05:00
debugfs.c mmc: core: debugfs: Add signal_voltage to ios dump 2012-12-06 13:54:36 -05:00
host.c workqueue: deprecate system_nrt[_freezable]_wq 2012-08-20 14:51:24 -07:00
host.h mmc: start removing enable / disable API 2012-03-27 12:20:03 -04:00
Kconfig mmc: Aggressive clock gating framework 2011-01-08 22:48:03 -05:00
Makefile mmc: extend and rename cd-gpio helpers to handle more slot GPIO functions 2012-07-10 23:04:04 -04:00
mmc_ops.c mmc: core: Fix some driver hangs when dealing with broken devices 2012-12-06 13:54:42 -05:00
mmc_ops.h mmc: core: support HPI send command 2011-10-26 16:32:29 -04:00
mmc.c mmc: core: Break out start_signal_voltage_switch 2013-02-24 14:37:07 -05:00
quirks.c mmc: Add export.h for EXPORT_SYMBOL/THIS_MODULE as required 2011-10-31 19:32:06 -04:00
sd_ops.c mmc: Add export.h for EXPORT_SYMBOL/THIS_MODULE as required 2011-10-31 19:32:06 -04:00
sd_ops.h mmc: add erase, secure erase, trim and secure trim operations 2010-08-12 08:43:30 -07:00
sd.c mmc: sdhci: enhance preset value function 2013-02-24 14:37:11 -05:00
sd.h mmc: sd: add support for driver type selection 2011-05-24 23:53:24 -04:00
sdio_bus.c mmc: Remove redundant null check before kfree in sdio_bus.c 2012-12-06 13:55:06 -05:00
sdio_bus.h
sdio_cis.c mmc: sdio: Change pr_warning to pr_warn_ratelimited 2012-07-22 15:25:48 -04:00
sdio_cis.h
sdio_io.c mmc: sdio: Use multiple scatter/gather list 2012-12-06 13:54:43 -05:00
sdio_irq.c mmc: sdio: avoid spurious calls to interrupt handlers 2012-04-22 11:17:28 -04:00
sdio_ops.c mmc: sdio: Use multiple scatter/gather list 2012-12-06 13:54:43 -05:00
sdio_ops.h sdio: recognize io card without powercycle 2010-03-12 15:52:28 -08:00
sdio.c mmc: core: Fixup signal voltage switch 2013-02-24 14:37:08 -05:00
slot-gpio.c mmc: slot-gpio: use devm_* managed functions to ease users 2013-02-11 12:51:23 -05:00