From: Doug Anderson <dianders@chromium.org>
To: linux-mmc@vger.kernel.org
Cc: Olof Johansson <olof@lixom.net>,
Alim Akhtar <alim.akhtar@samsung.com>,
Thomas P Abraham <thomas.ab@samsung.com>,
Chris Ball <cjb@laptop.org>, Will Newton <will.newton@imgtec.com>,
Seungwon Jeon <tgih.jun@samsung.com>,
Jaehoon Chung <jh80.chung@samsung.com>,
James Hogan <james.hogan@imgtec.com>,
linux-kernel@vger.kernel.org,
Linus Walleij <linus.walleij@linaro.org>,
Ulf Hansson <ulf.hansson@linaro.org>,
Adrian Hunter <adrian.hunter@intel.com>,
Doug Anderson <dianders@chromium.org>
Subject: [PATCH 2/2] mmc: dw_mmc: Add a DISABLE_MMC quirk that sets the core mmc cap
Date: Tue, 21 Aug 2012 21:05:18 -0700 [thread overview]
Message-ID: <1345608318-15347-2-git-send-email-dianders@chromium.org> (raw)
In-Reply-To: <1345608318-15347-1-git-send-email-dianders@chromium.org>
On some systems we need a way to disable MMC card support in a MMC/SD
card slot. Add support in the dw_mmc to support this.
Signed-off-by: Doug Anderson <dianders@chromium.org>
---
drivers/mmc/host/dw_mmc.c | 3 +++
include/linux/mmc/dw_mmc.h | 2 ++
2 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index af40d22..09111bf 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -1810,6 +1810,9 @@ static int __init dw_mci_init_slot(struct dw_mci *host, unsigned int id)
if (host->pdata->quirks & DW_MCI_QUIRK_HIGHSPEED)
mmc->caps |= MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED;
+ if (host->pdata->quirks & DW_MCI_QUIRK_DISABLE_MMC)
+ mmc->caps2 |= MMC_CAP2_NO_MMC;
+
if (mmc->caps2 & MMC_CAP2_POWEROFF_NOTIFY)
mmc->power_notify_type = MMC_HOST_PW_NOTIFY_SHORT;
else
diff --git a/include/linux/mmc/dw_mmc.h b/include/linux/mmc/dw_mmc.h
index 7a7ebd3..5eaa9b9 100644
--- a/include/linux/mmc/dw_mmc.h
+++ b/include/linux/mmc/dw_mmc.h
@@ -201,6 +201,8 @@ struct dw_mci_dma_ops {
#define DW_MCI_QUIRK_HIGHSPEED BIT(2)
/* Unreliable card detection */
#define DW_MCI_QUIRK_BROKEN_CARD_DETECTION BIT(3)
+/* Only support SD cards, not MMC */
+#define DW_MCI_QUIRK_DISABLE_MMC BIT(4)
struct dma_pdata;
--
1.7.7.3
next prev parent reply other threads:[~2012-08-22 4:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-22 4:05 [PATCH 1/2] mmc: core: Add a capability for disabling mmc cards Doug Anderson
2012-08-22 4:05 ` Doug Anderson [this message]
2012-08-22 4:35 ` Jaehoon Chung
2012-08-22 15:44 ` Doug Anderson
2012-08-22 16:00 ` Philip Rakity
2012-08-22 16:50 ` Olof Johansson
2012-08-22 18:25 ` Nicolas Pitre
2012-08-22 18:27 ` Olof Johansson
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=1345608318-15347-2-git-send-email-dianders@chromium.org \
--to=dianders@chromium.org \
--cc=adrian.hunter@intel.com \
--cc=alim.akhtar@samsung.com \
--cc=cjb@laptop.org \
--cc=james.hogan@imgtec.com \
--cc=jh80.chung@samsung.com \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=olof@lixom.net \
--cc=tgih.jun@samsung.com \
--cc=thomas.ab@samsung.com \
--cc=ulf.hansson@linaro.org \
--cc=will.newton@imgtec.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;
as well as URLs for NNTP newsgroup(s).