Re: MCI print revision

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>:
> > > 
> > > +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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux