From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH] mmc: sdhci: Fix setting wrong buswidth
Date: Wed, 26 Jan 2022 10:20:07 +0100 [thread overview]
Message-ID: <20220126092007.4010252-1-s.hauer@pengutronix.de> (raw)
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
reply other threads:[~2022-01-26 9:24 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=20220126092007.4010252-1-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
/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