Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1417049
| From | Shawn Lin <shawn.lin@rock-chips.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [RFC PATCH 3/4] mmc: core: add cap-no-sd and cap-no-mmc properties |
| Date | 2016-06-08 10:30 +0200 |
| Message-ID | <rHH29-6b9-17@gated-at.bofh.it> (permalink) |
| References | <rHH29-6b9-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC PATCH 0/4] Introduce new caps to improve the card's init sequence Shawn Lin <shawn.lin@rock-chips.com> - 2016-06-08 10:30 +0200 [RFC PATCH 3/4] mmc: core: add cap-no-sd and cap-no-mmc properties Shawn Lin <shawn.lin@rock-chips.com> - 2016-06-08 10:30 +0200 [RFC PATCH 2/4] mmc: core: expose MMC_CAP2_NO_SDIO to dt-binding Shawn Lin <shawn.lin@rock-chips.com> - 2016-06-08 10:30 +0200
csiph-web