[U-Boot] [PATCH 23/33] mmc: dw_mmc: fix bus width setting

Ziyuan Xu xzy.xu at rock-chips.com
Mon May 15 06:07:17 UTC 2017


Hosts capable of 8-bit transfers can also do 4 bits.

Signed-off-by: Ziyuan Xu <xzy.xu at rock-chips.com>
---

 drivers/mmc/dw_mmc.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c
index dcd7fba..3b89e7a 100644
--- a/drivers/mmc/dw_mmc.c
+++ b/drivers/mmc/dw_mmc.c
@@ -559,8 +559,7 @@ 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;
+		cfg->host_caps |= MMC_MODE_8BIT | MMC_MODE_4BIT;
 	} else {
 		cfg->host_caps |= MMC_MODE_4BIT;
 		cfg->host_caps &= ~MMC_MODE_8BIT;
-- 
2.7.4




More information about the U-Boot mailing list