sdio: add MMC_CAP_VDD_165_195 host capability
PATCH 1/1 sdio: add MMC_CAP_VDD_165_195 host capability
[resending due to mailer issues - sorry]
---
From: Ohad Ben-Cohen <[email protected]>
To allow the usage of MMC_VDD_165_195, host capability MMC_CAP_VDD_165_195 is introduced. This is necessary because MMC_VDD_165_195 is currently reserved/undefined.
Signed-off-by Ohad Ben-Cohen <[email protected]>
--- drivers/mmc/core/sdio.c | 7 +++++++ include/linux/mmc/host.h | 1 + 2 files changed, 8 insertions(+), 0 deletions(-)
drivers/mmc/core/sdio.c +7 -0
@@ -494,6 +494,13 @@ int mmc_attach_sdio(struct mmc_host *host, u32 ocr) ocr &= ~0x7F ; } +if ((ocr &MMC_VDD_165_195 ) && !(host->caps &MMC_CAP_VDD_165_195 )) { +printk (KERN_WARNING "%s: SDIO card claims to support the " +"incompletely defined 'low voltage range'. This " +"will be ignored.\n" ,mmc_hostname (host)); + ocr &= ~MMC_VDD_165_195 ; + } + host->ocr =mmc_select_voltage (host, ocr);/*
include/linux/mmc/host.h +1 -0
@@ -150,6 +150,7 @@ struct mmc_host {#define MMC_CAP_DISABLE (1 << 7)/* Can the host be disabled */ #define MMC_CAP_NONREMOVABLE (1 << 8)/* Nonremovable e.g. eMMC */ #define MMC_CAP_WAIT_WHILE_BUSY (1 << 9)/* Waits while card is busy */ +#define MMC_CAP_VDD_165_195 (1 << 10)/* Accepts MMC_VDD_165_195 */ /* host specific block data */ unsigned int max_seg_size;/* see blk_queue_max_segment_size */
Signature · 1 line
1.5.4.3