[PATCH] mmc: sdhci: Fix setting wrong buswidth
Sascha Hauer
s.hauer at pengutronix.de
Wed Jan 26 01:20:07 PST 2022
a0e22fc7bc accidently replaced SDHCI_DATA_WIDTH_4BIT with SDHCI_CTRL_8BITBUS.
Replace with SDHCI_CTRL_4BITBUS.
Reported-by: Antony Pavlov <antonynpavlov at gmail.com>
Fixes: a0e22fc7bc ("mci: sdhci: Use Linux defines for SDHCI_HOST_CONTROL register")
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
drivers/mci/atmel-sdhci-common.c | 4 ++--
drivers/mci/dove-sdhci.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/mci/atmel-sdhci-common.c b/drivers/mci/atmel-sdhci-common.c
index eff2a993db..129480aa55 100644
--- a/drivers/mci/atmel-sdhci-common.c
+++ b/drivers/mci/atmel-sdhci-common.c
@@ -302,11 +302,11 @@ static int at91_sdhci_set_bus_width(struct at91_sdhci *host, unsigned bus_width)
break;
case MMC_BUS_WIDTH_4:
reg &= ~SDHCI_CTRL_8BITBUS;
- reg |= SDHCI_CTRL_8BITBUS;
+ reg |= SDHCI_CTRL_4BITBUS;
break;
default:
reg &= ~SDHCI_CTRL_8BITBUS;
- reg &= ~SDHCI_CTRL_8BITBUS;
+ reg &= ~SDHCI_CTRL_4BITBUS;
}
sdhci_write8(sdhci, SDHCI_HOST_CONTROL, reg);
diff --git a/drivers/mci/dove-sdhci.c b/drivers/mci/dove-sdhci.c
index e6ac769bde..7581511285 100644
--- a/drivers/mci/dove-sdhci.c
+++ b/drivers/mci/dove-sdhci.c
@@ -181,13 +181,13 @@ static void dove_sdhci_mci_set_ios(struct mci_host *mci, struct mci_ios *ios)
/* set bus width */
val = sdhci_read8(&host->sdhci, SDHCI_HOST_CONTROL) &
- ~(SDHCI_CTRL_8BITBUS | SDHCI_CTRL_8BITBUS);
+ ~(SDHCI_CTRL_4BITBUS | SDHCI_CTRL_8BITBUS);
switch (ios->bus_width) {
case MMC_BUS_WIDTH_8:
val |= SDHCI_CTRL_8BITBUS;
break;
case MMC_BUS_WIDTH_4:
- val |= SDHCI_CTRL_8BITBUS;
+ val |= SDHCI_CTRL_4BITBUS;
break;
}
--
2.30.2
More information about the barebox
mailing list