Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1435091
| From | Shawn Lin <shawn.lin@rock-chips.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 2/3] mmc: core: expose MMC_CAP2_NO_* to dt |
| Date | 2016-07-01 09:50 +0200 |
| Message-ID | <rQ1n4-3Pu-25@gated-at.bofh.it> (permalink) |
| References | <rQ1n3-3Pu-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
The reason for why we expose these to dt is that
most of the controllers could support all card typs including
sd, sdio and MMC card, but for the specific boards, (e)MMC or
sdio are non-removable devices, so it's impossible that these slot
will be used for other card types. Also for a certain SD slot, it
seems reasonable that we couldn't solder MMC devices or SDIO
devices. So let's expose these caps to dt for the specific boards
to imporve the behaviour of initialization.
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
---
drivers/mmc/core/host.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c
index d7e86f9..98f25ff 100644
--- a/drivers/mmc/core/host.c
+++ b/drivers/mmc/core/host.c
@@ -315,6 +315,12 @@ int mmc_of_parse(struct mmc_host *host)
host->caps2 |= MMC_CAP2_HS400_1_2V | MMC_CAP2_HS200_1_2V_SDR;
if (of_property_read_bool(np, "mmc-hs400-enhanced-strobe"))
host->caps2 |= MMC_CAP2_HS400_ES;
+ if (of_property_read_bool(np, "no-sdio"))
+ host->caps2 |= MMC_CAP2_NO_SDIO;
+ if (of_property_read_bool(np, "no-sd"))
+ host->caps2 |= MMC_CAP2_NO_SD;
+ if (of_property_read_bool(np, "no-mmc"))
+ host->caps2 |= MMC_CAP2_NO_MMC;
host->dsr_req = !of_property_read_u32(np, "dsr", &host->dsr);
if (host->dsr_req && (host->dsr & ~0xffff)) {
--
2.3.7
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/3] Expose new mmc caps to DT Shawn Lin <shawn.lin@rock-chips.com> - 2016-07-01 09:50 +0200
[PATCH 3/3] Documentation: mmc: add description for new no-sd* and no-mmc Shawn Lin <shawn.lin@rock-chips.com> - 2016-07-01 09:50 +0200
[PATCH 2/3] mmc: core: expose MMC_CAP2_NO_* to dt Shawn Lin <shawn.lin@rock-chips.com> - 2016-07-01 09:50 +0200
[PATCH 1/3] mmc: core: Allow hosts to specify non-support for MMC commands Shawn Lin <shawn.lin@rock-chips.com> - 2016-07-01 09:50 +0200
Re: [PATCH 1/3] mmc: core: Allow hosts to specify non-support for MMC commands Ulf Hansson <ulf.hansson@linaro.org> - 2016-07-06 18:30 +0200
csiph-web