From: Shawn Lin <shawn.lin@rock-chips.com>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Jaehoon Chung <jh80.chung@samsung.com>,
Rob Herring <robh+dt@kernel.org>,
linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
Doug Anderson <dianders@chromium.org>,
linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org,
Shawn Lin <shawn.lin@rock-chips.com>
Subject: [RFC PATCH 3/4] mmc: core: add cap-no-sd and cap-no-mmc properties
Date: Wed, 8 Jun 2016 16:20:57 +0800 [thread overview]
Message-ID: <1465374057-2608-1-git-send-email-shawn.lin@rock-chips.com> (raw)
In-Reply-To: <1465373996-2485-1-git-send-email-shawn.lin@rock-chips.com>
Introduce cap-no-sd and cap-no-mmc properties to skip
sending sd and mmc commands during initialization
respectively.
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
---
drivers/mmc/core/host.c | 4 ++++
include/linux/mmc/host.h | 2 ++
2 files changed, 6 insertions(+)
diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c
index 933eeea..c760097 100644
--- a/drivers/mmc/core/host.c
+++ b/drivers/mmc/core/host.c
@@ -298,6 +298,10 @@ int mmc_of_parse(struct mmc_host *host)
host->caps2 |= MMC_CAP2_FULL_PWR_CYCLE;
if (of_property_read_bool(np, "cap-no-sdio"))
host->caps2 |= MMC_CAP2_NO_SDIO;
+ if (of_property_read_bool(np, "cap-no-sd"))
+ host->caps2 |= MMC_CAP2_NO_SD;
+ if (of_property_read_bool(np, "cap-no-mmc"))
+ host->caps2 |= MMC_CAP2_NO_MMC;
if (of_property_read_bool(np, "keep-power-in-suspend"))
host->pm_caps |= MMC_PM_KEEP_POWER;
if (of_property_read_bool(np, "wakeup-source") ||
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index d72c0c3..1bd77c7 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -309,6 +309,8 @@ struct mmc_host {
#define MMC_CAP2_NO_WRITE_PROTECT (1 << 18) /* No physical write protect pin, assume that card is always read-write */
#define MMC_CAP2_NO_SDIO (1 << 19) /* Do not send SDIO commands during initialization */
#define MMC_CAP2_HS400_ES (1 << 20) /* Host supports enhanced strobe */
+#define MMC_CAP2_NO_SD (1 << 21) /* Do not send SD commands during initialization */
+#define MMC_CAP2_NO_MMC (1 << 22) /* Do not send MMC commands during initialization */
mmc_pm_flag_t pm_caps; /* supported pm features */
--
2.3.7
next prev parent reply other threads:[~2016-06-08 8:21 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-08 8:19 [RFC PATCH 0/4] Introduce new caps to improve the card's init sequence Shawn Lin
2016-06-08 8:20 ` [RFC PATCH 1/4] Documentation: mmc: add description for new caps Shawn Lin
2016-06-08 20:48 ` Rob Herring
2016-06-22 12:30 ` Ulf Hansson
2016-06-22 15:06 ` Doug Anderson
2016-06-23 1:29 ` Shawn Lin
2016-06-23 4:33 ` Doug Anderson
2016-06-08 8:20 ` [RFC PATCH 2/4] mmc: core: expose MMC_CAP2_NO_SDIO to dt-binding Shawn Lin
2016-06-08 8:20 ` Shawn Lin [this message]
2016-06-08 8:22 ` [RFC PATCH 4/4] mmc: core: improve initialization flow Shawn Lin
2016-06-22 12:37 ` [RFC PATCH 0/4] Introduce new caps to improve the card's init sequence Ulf Hansson
2016-06-23 1:35 ` Shawn Lin
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=1465374057-2608-1-git-send-email-shawn.lin@rock-chips.com \
--to=shawn.lin@rock-chips.com \
--cc=devicetree@vger.kernel.org \
--cc=dianders@chromium.org \
--cc=jh80.chung@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=robh+dt@kernel.org \
--cc=ulf.hansson@linaro.org \
/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).