From: Trent Piepho <tpiepho@kymetacorp.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: "barebox@lists.infradead.org" <barebox@lists.infradead.org>
Subject: Re: MCI print revision
Date: Tue, 31 May 2016 19:56:19 +0000 [thread overview]
Message-ID: <1464724586.15779.110.camel@rtred1test09.kymeta.local> (raw)
In-Reply-To: <20160531072305.GE31666@pengutronix.de>
On Tue, 2016-05-31 at 09:23 +0200, Sascha Hauer wrote:
> On Tue, May 31, 2016 at 10:02:48AM +0300, Alexander Shiyan wrote:
> > > Вторник, 31 мая 2016, 9:26 +03:00 от Sascha Hauer <s.hauer@pengutronix.de>:
> > >
> > > +Cc Trent
> > >
> > > On Mon, May 30, 2016 at 12:01:12PM +0300, Alexander Shiyan wrote:
> > > > Hello.
> > > >
> > > > Commit dbd7190295298acfb4996ec1aba5165a7be28fdc (mci: Print versions with micro levels correctly)
> > > > seems to be incorrect.
> > > >
> > > > barebox@Informer:/ mmc0.probe=1
> > > > mmc0: detected SD card version 1.a
> > > > mmc0: registered mmc0
> > >
> > > So what's the expected printout and was it correct without this patch?
> >
> > Host information:
> > current clock: 25000000
> > current buswidth: 4
> > capabilities: 4bit sd-hs mmc-hs
> > Card information:
> > Attached is an SD Card (Version: 1.10)
>
> So the %x for printing the minor should really be a %u?
No, that will print MMC version 4.41 incorrectly as 4.65.
I think the issue is the value of the version codes and how they should
be printed. AFAICT, the codes originated in u-boot but were changed in
commit "mci: Fix version handling" in 2014. The original u-boot code
was easier to print, using "0x429" for version 4.41 so it would print
correctly with "%u", but since 0x29 > 0x05 this resulted in 4.41 being
sorted after 4.5. I think the fundamental problem here is fault of the
people who created the SD and eMMC standards giving us this:
1.10 > 1.01
4.41 < 4.5
It's just not consistent. In one case the last two digits are single
number but in the other they are a minor,micro version pair.
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2016-05-31 19:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-30 9:01 Alexander Shiyan
2016-05-31 6:26 ` Sascha Hauer
2016-05-31 7:02 ` Re[2]: " Alexander Shiyan
2016-05-31 7:23 ` Sascha Hauer
2016-05-31 7:33 ` Re[2]: " Alexander Shiyan
2016-05-31 19:56 ` Trent Piepho [this message]
2016-05-31 19:58 ` [PATCH] mci: Fix version numbers again Trent Piepho
2016-06-07 6:07 ` 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=1464724586.15779.110.camel@rtred1test09.kymeta.local \
--to=tpiepho@kymetacorp.com \
--cc=barebox@lists.infradead.org \
--cc=s.hauer@pengutronix.de \
/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