From: Jan Havran <havran.jan@email.cz>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] mmc: dw_mmc: set host_caps mmc modes to equivalent buswidth and lower
Date: Fri, 31 Aug 2018 10:29:51 +0200 [thread overview]
Message-ID: <20180831082951.GA30405@antergos> (raw)
dwmci_setup_cfg was clearing all modes except the mode equivalent to
required bus width. Moreover, for buswidth = 1 was set the 4-bit mode.
This sets host caps to all modes from 1-bit up to required mode.
Signed-off-by: Jan Havran <havran.jan@email.cz>
---
drivers/mmc/dw_mmc.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c
index 13180fc0d6..8aa8362359 100644
--- a/drivers/mmc/dw_mmc.c
+++ b/drivers/mmc/dw_mmc.c
@@ -501,11 +501,13 @@ void dwmci_setup_cfg(struct mmc_config *cfg, struct dwmci_host *host,
cfg->host_caps = host->caps;
if (host->buswidth == 8) {
- cfg->host_caps |= MMC_MODE_8BIT;
- cfg->host_caps &= ~MMC_MODE_4BIT;
- } else {
- cfg->host_caps |= MMC_MODE_4BIT;
+ cfg->host_caps |= MMC_MODE_8BIT | MMC_MODE_4BIT | MMC_MODE_1BIT;
+ } else if (host->buswidth == 4) {
cfg->host_caps &= ~MMC_MODE_8BIT;
+ cfg->host_caps |= MMC_MODE_4BIT | MMC_MODE_1BIT;
+ } else {
+ cfg->host_caps &= ~MMC_MODE_8BIT & ~MMC_MODE_4BIT;
+ cfg->host_caps |= MMC_MODE_1BIT;
}
cfg->host_caps |= MMC_MODE_HS | MMC_MODE_HS_52MHz;
--
2.18.0
reply other threads:[~2018-08-31 8:29 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20180831082951.GA30405@antergos \
--to=havran.jan@email.cz \
--cc=u-boot@lists.denx.de \
/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