linux-sg2042/drivers/mmc/core
Russell King d9812780a0 mmc: sd: limit SD card power limit according to cards capabilities
The SD card specification allows cards to error out a SWITCH command
where the requested function in a group is not supported.  The spec
provides for a set of capabilities which indicate which functions are
supported.

In the case of the power limit, requesting an unsupported power level
via the SWITCH command fails, resulting in the power level remaining at
the power-on default of 0.72W, even though the host and card may support
higher powers levels.

This has been seen with SanDisk 8GB cards, which support the default
0.72W and 1.44W (200mA and 400mA) in combination with an iMX6 host,
supporting up to 2.88W (800mA).  This currently causes us to try to set
a power limit function value of '3' (2.88W) which the card errors out
on, and thereby causes the power level to remain at 0.72W rather than
the desired 1.44W.

Arrange to limit the selected current limit by the capabilities reported
by the card to avoid the SWITCH command failing.  Select the highest
current limit that the host and card combination support.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Fixes: a39ca6ae0a ("mmc: core: Simplify and fix for SD switch processing")
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2016-01-13 10:56:27 +01:00
..
Kconfig mmc: core: Remove MMC_CLKGATE 2015-10-26 16:00:09 +01:00
Makefile mmc: pwrseq: add driver for emmc hardware reset 2015-02-04 09:45:09 +01:00
bus.c mmc: enable MMC/SD/SDIO device to suspend/resume asynchronously 2015-12-22 11:32:16 +01: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: Optimize boot time by detecting cards simultaneously 2015-12-28 10:08:09 +01:00
core.h mmc: fix mmc_{un,}register_pm_notifier prototypes 2015-12-22 11:32:09 +01:00
debugfs.c mmc: core: Remove MMC_CLKGATE 2015-10-26 16:00:09 +01:00
host.c mmc: core: Refactor code to register the MMC PM notifier 2015-12-22 11:32:04 +01:00
host.h mmc: host: Add facility to support re-tuning 2015-06-01 09:06:53 +02:00
mmc.c mmc: It is not an error for the card to be removed while suspended 2015-12-28 12:51:38 +01:00
mmc_ops.c mmc: core: fix __mmc_switch timeout caused by preempt 2015-12-22 11:32:18 +01:00
mmc_ops.h mmc: core: Convert __mmc_switch() into an internal core function 2015-10-26 15:59:54 +01:00
pwrseq.c mmc: pwrseq: Fix error code propagation in mmc_pwrseq_simple_alloc() 2015-04-17 10:17:19 +02:00
pwrseq.h mmc: pwrseq: constify mmc_pwrseq_ops structures 2015-12-22 11:32:07 +01:00
pwrseq_emmc.c mmc: pwrseq: constify mmc_pwrseq_ops structures 2015-12-22 11:32:07 +01:00
pwrseq_simple.c mmc: pwrseq: constify mmc_pwrseq_ops structures 2015-12-22 11:32:07 +01:00
quirks.c mmc: core: Remove MMC_CLKGATE 2015-10-26 16:00:09 +01:00
sd.c mmc: sd: limit SD card power limit according to cards capabilities 2016-01-13 10:56:27 +01:00
sd.h mmc: drop the speed mode of card's state 2014-05-12 18:05:53 -04:00
sd_ops.c mmc: sd: warn if card stays busy during init 2014-07-09 11:26:07 +02:00
sd_ops.h mmc: add erase, secure erase, trim and secure trim operations 2010-08-12 08:43:30 -07:00
sdio.c mmc: sdio: Fix invalid vdd in voltage switch power cycle 2015-12-22 11:32:15 +01:00
sdio_bus.c mmc: enable MMC/SD/SDIO device to suspend/resume asynchronously 2015-12-22 11:32:16 +01:00
sdio_bus.h mmc: basic SDIO device model 2007-09-23 19:45:31 +02:00
sdio_cis.c mmc: sdio: Change pr_warning to pr_warn_ratelimited 2012-07-22 15:25:48 -04:00
sdio_cis.h sdio: split up common and function CIS parsing 2007-09-23 20:44:22 +02:00
sdio_io.c mmc: sdio: Use multiple scatter/gather list 2012-12-06 13:54:43 -05:00
sdio_irq.c mmc: core: Remove MMC_CLKGATE 2015-10-26 16:00:09 +01:00
sdio_ops.c mmc: sdio: Use multiple scatter/gather list 2012-12-06 13:54:43 -05:00
sdio_ops.h mmc: Add mmc_is_io_op helper function 2015-10-26 16:00:01 +01:00
slot-gpio.c mmc: slot-gpio: Allow host driver to provide isr for card-detect interrupts 2015-01-19 09:56:29 +01:00
slot-gpio.h mmc: slot-gpio: Make mmc_gpio_alloc() available for MMC core 2015-01-19 09:56:17 +01:00