Re: [PATCH] sdio: add MMC_CAP_VDD_165_195 host capability

David Vrabel
2009-09-28T18:10:52Z

Ohad Ben-Cohen wrote:
> From: Ohad Ben-Cohen <ohad@wizery.com>
>
> 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.

The host already reports what voltages it supports (in
mmc_host::ocr_avail) so a seperate MMC_CAP_* isn't needed.

This interpretation of the reserved bits in the OCR should only done for
certain cards where the bits actually do mean 1.8 V operation (with v2.0
signalling) is possible.

That's a fair amount of work so perhaps in the interim something like this:

--- a/drivers/mmc/core/sdio.c
+++ b/drivers/mmc/core/sdio.c
@@ -494,6 +494,9 @@ int mmc_attach_sdio(struct mmc_host *host, u32 ocr)
ocr &= ~0x7F;
}

+ if (ocr & MMC_VDD_165_195)
+ printk(KERN_WARNING "%s: warning: card claims non-standard 1.65-1.95
V support"
+
host->ocr = mmc_select_voltage(host, ocr);

/*

And revisit this if these bits either: a) gain a (different) standard
meaning; or b) some other card uses these bits in a different
non-standard way. Neither seems likely.

David
--
David Vrabel, Senior Software Engineer, Drivers
CSR, Churchill House, Cambridge Business Park, Tel: +44 (0)1223 692562
Cowley Road, Cambridge, CB4 0WZ http://www.csr.com/

Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom