[PATCH 2/6] MXS/MCI: don't touch variables in the host structure

Juergen Beisert jbe at pengutronix.de
Fri Apr 26 05:31:48 EDT 2013


MMC_BUS_WIDTH_* macros do not correspond with the real bus width.
After setting a bus width larger than 1 bit the next call to change the
frequency ends in the default handler and the host interface stays silently
at the previous frequency.

Signed-off-by: Juergen Beisert <jbe at pengutronix.de>
---
 drivers/mci/mxs.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/mci/mxs.c b/drivers/mci/mxs.c
index e2ffa43..3045e6a 100644
--- a/drivers/mci/mxs.c
+++ b/drivers/mci/mxs.c
@@ -515,23 +515,23 @@ static void mxs_mci_set_ios(struct mci_host *host, struct mci_ios *ios)
 	switch (ios->bus_width) {
 	case MMC_BUS_WIDTH_8:
 		mxs_mci->bus_width = 2;
-		host->bus_width = 8;	/* 8 bit is possible */
+		pr_debug("IO settings: changing bus width to 8 bits\n");
 		break;
 	case MMC_BUS_WIDTH_4:
 		mxs_mci->bus_width = 1;
-		host->bus_width = 4;	/* 4 bit is possible */
+		pr_debug("IO settings: changing bus width to 4 bits\n");
 		break;
 	case MMC_BUS_WIDTH_1:
 		mxs_mci->bus_width = 0;
-		host->bus_width = 1;	/* 1 bit is possible */
+		pr_debug("IO settings: changing bus width to 1 bit\n");
 		break;
 	default:
+		pr_debug("IO settings: unsupported bus width!\n");
 		return;
 	}
 
 	mxs_mci->clock = mxs_mci_setup_clock_speed(mxs_mci, ios->clock);
-	pr_debug("IO settings: bus width=%d, frequency=%u Hz\n", host->bus_width,
-			mxs_mci->clock);
+	pr_debug("IO settings: frequency=%u Hz\n", mxs_mci->clock);
 }
 
 /* ----------------------------------------------------------------------- */
-- 
1.8.2.rc2




More information about the barebox mailing list