Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mmc: core: Invent MMC_CAP2_FULL_PWR_CYCLE

MMC_CAP2_FULL_PWR_CYCLE shall be set by host drivers which are able to
do a complete power cycle of the card. In the eMMC case that includes
both vcc and vccq.

This CAP is providing the protocol layer with important information,
needed to take optimized decisions during card initialization and in
the suspend/resume sequence.

MMC_CAP2_POWEROFF_NOTIFY is replaced by MMC_CAP2_FULL_PWR_CYCLE, since
it makes sense to use a wider scope for it.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>

authored by

Ulf Hansson and committed by
Chris Ball
53275c21 43235679

+2 -2
+1 -1
drivers/mmc/core/mmc.c
··· 1484 1484 goto out; 1485 1485 1486 1486 if (mmc_can_poweroff_notify(host->card) && 1487 - ((host->caps2 & MMC_CAP2_POWEROFF_NOTIFY) || !is_suspend)) 1487 + ((host->caps2 & MMC_CAP2_FULL_PWR_CYCLE) || !is_suspend)) 1488 1488 err = mmc_poweroff_notify(host->card, notify_type); 1489 1489 else if (mmc_can_sleep(host->card)) 1490 1490 err = mmc_sleep(host);
+1 -1
include/linux/mmc/host.h
··· 264 264 265 265 #define MMC_CAP2_BOOTPART_NOACC (1 << 0) /* Boot partition no access */ 266 266 #define MMC_CAP2_CACHE_CTRL (1 << 1) /* Allow cache control */ 267 - #define MMC_CAP2_POWEROFF_NOTIFY (1 << 2) /* Notify poweroff supported */ 267 + #define MMC_CAP2_FULL_PWR_CYCLE (1 << 2) /* Can do full power cycle */ 268 268 #define MMC_CAP2_NO_MULTI_READ (1 << 3) /* Multiblock reads don't work */ 269 269 #define MMC_CAP2_NO_SLEEP_CMD (1 << 4) /* Don't allow sleep command */ 270 270 #define MMC_CAP2_HS200_1_8V_SDR (1 << 5) /* can support */