From: Ohad Ben-Cohen <ohad@bencohen.org>
To: akpm@linux-foundation.org
Cc: "p hilipl"@overt.org, ian@mnementh.co.uk, matt@console-pimps.org,
pierre@ossman.eu, roberto.foglietta@gmail.com,
david.vrabel@csr.com, linux-mmc@vger.kernel.org
Subject: [PATCH] sdio: add MMC_CAP_VDD_165_195 host capability
Date: Mon, 28 Sep 2009 19:51:09 +0200 [thread overview]
Message-ID: <1254160269.10634.15.camel@localhost> (raw)
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.
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
---
drivers/mmc/core/sdio.c | 7 +++++++
include/linux/mmc/host.h | 1 +
2 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c
index cdb845b..a9f3ed6 100644
--- a/drivers/mmc/core/sdio.c
+++ b/drivers/mmc/core/sdio.c
@@ -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);
/*
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index 81bb423..5fa95b3 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -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 */
--
1.5.4.3
next reply other threads:[~2009-09-28 17:42 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-28 17:51 Ohad Ben-Cohen [this message]
2009-09-28 18:09 ` [PATCH] sdio: add MMC_CAP_VDD_165_195 host capability David Vrabel
2009-09-28 20:02 ` Ohad Ben-Cohen
2009-09-29 2:25 ` Philip Langdale
2009-09-29 18:28 ` Pierre Ossman
2009-09-29 20:20 ` Philip Langdale
2009-09-29 21:37 ` Pierre Ossman
2009-09-30 6:10 ` Philip Langdale
2009-10-08 18:38 ` Pierre Ossman
2009-10-10 18:42 ` Philip Langdale
2009-10-12 13:11 ` David Vrabel
2009-10-13 2:39 ` Philip Langdale
2009-10-14 7:56 ` Ohad Ben-Cohen
2009-10-14 8:48 ` Pierre Ossman
2009-10-14 10:34 ` David Vrabel
2009-10-14 11:05 ` Pierre Ossman
-- strict thread matches above, loose matches on Subject: below --
2009-09-28 17:55 Ohad Ben-Cohen
2009-09-28 17:58 Ohad Ben-Cohen
2009-09-28 18:10 ` Matt Fleming
2009-09-28 20:10 ` Ohad Ben-Cohen
2009-09-28 22:59 ` Andrew Morton
2009-09-29 5:53 ` Matt Fleming
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1254160269.10634.15.camel@localhost \
--to=ohad@bencohen.org \
--cc="p hilipl"@overt.org \
--cc=akpm@linux-foundation.org \
--cc=david.vrabel@csr.com \
--cc=ian@mnementh.co.uk \
--cc=linux-mmc@vger.kernel.org \
--cc=matt@console-pimps.org \
--cc=pierre@ossman.eu \
--cc=roberto.foglietta@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox