mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Juergen Beisert <jbe@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 2/6] MXS/MCI: don't touch variables in the host structure
Date: Fri, 26 Apr 2013 11:31:48 +0200	[thread overview]
Message-ID: <1366968712-17851-3-git-send-email-jbe@pengutronix.de> (raw)
In-Reply-To: <1366968712-17851-1-git-send-email-jbe@pengutronix.de>

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@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


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2013-04-26  9:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-26  9:31 Some fixes and improvements while working with the Chumby Juergen Beisert
2013-04-26  9:31 ` [PATCH 1/6] MXS/MCI: add forgotten header file Juergen Beisert
2013-04-26  9:31 ` Juergen Beisert [this message]
2013-04-26  9:31 ` [PATCH 3/6] MCI/Core: increase the transmission frequency while card detection Juergen Beisert
2013-04-26  9:31 ` [PATCH 4/6] MCI/Core: honor transmission limits at the card's side Juergen Beisert
2013-04-26  9:31 ` [PATCH 5/6] MCI/MXS: report a better matching error code when the transfer fails Juergen Beisert
2013-04-26  9:31 ` [PATCH 6/6] MCI/Core: move an ugly ifdef to the header file Juergen Beisert
2013-04-26 22:04   ` Sascha Hauer
2013-04-26 22:08 ` Some fixes and improvements while working with the Chumby Sascha Hauer

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=1366968712-17851-3-git-send-email-jbe@pengutronix.de \
    --to=jbe@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