* [PATCH] mmc: sdhci: Fix setting wrong buswidth
@ 2022-01-26 9:20 Sascha Hauer
0 siblings, 0 replies; only message in thread
From: Sascha Hauer @ 2022-01-26 9:20 UTC (permalink / raw)
To: Barebox List
a0e22fc7bc accidently replaced SDHCI_DATA_WIDTH_4BIT with SDHCI_CTRL_8BITBUS.
Replace with SDHCI_CTRL_4BITBUS.
Reported-by: Antony Pavlov <antonynpavlov@gmail.com>
Fixes: a0e22fc7bc ("mci: sdhci: Use Linux defines for SDHCI_HOST_CONTROL register")
Signed-off-by: Sascha Hauer <s.hauer@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
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-01-26 9:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-26 9:20 [PATCH] mmc: sdhci: Fix setting wrong buswidth Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox