[U-Boot] Bug in emmc subsystem

Arno Steffens star at gmx.li
Mon Apr 10 06:21:52 UTC 2017


Hi,
I am using latest release: U-boot 2017.03.
The board is a custom board, simular to Zynq-MicroZed board. 
But MicroZed board has SD card, while our board has a fixed mounted emmc vom Micron.

I compiled it again with 
#define DEBUG 1 in 
cmd/mmc.c
cmd/parts.c
cmd/mtdparts.c
driver/mmc/mmc.c
driver/mmc/zynq_sdhci.c
driver/mmc/sdhci.c
driver/mmc/mmc_write.c
driver/mmc/mmc_uclass.c
driver/mmc/mmc_legacy.c
But this doesn't give me more information for the commands "mmc info" and mmc hwpartition".

As it works with "normal" formatted mmc - have you ever tried to use enhanced partitions?
What is correct command to access a GP partition?
For me it is not 100% sure how the commands are working, but because of the non consistence in "mmc info" and "mmc hwpartition" about the existence of a GP1 partition it must be a bug in U-boot.

My main problems to debug this - I have no comparison to a working system (to know what is wrong and what is ok) and how it works. There is no help/doc about this enhanced partition

I found something here:
https://lists.denx.de/pipermail/u-boot/2014-April/177378.html

What is strange to me: mmc_startup seems not to know MMC Version 5.0. There is a switch matrix, which only goes up to 4.0 ?!?

Let me know if I can do something to go ahead with this bug.

Thanks
Arno 

> Gesendet: Donnerstag, 06. April 2017 um 14:08 Uhr
> Von: "Jaehoon Chung" <jh80.chung at samsung.com>
> An: "Arno Steffens" <star at gmx.li>, u-boot at lists.denx.de
> Betreff: Re: [U-Boot] Bug in emmc subsystem
>
> Hi,
> 
> On 04/06/2017 03:55 AM, Arno Steffens wrote:
> > There seems to be a problem handling emmc with configured GP partition.
> > 
> > Below the "mmc info". The problem might be that user capacity is calculated/shown as "0".
> > At least it shows the GP1 partition with correct size - which is not the case for "mmc hwpartition" - it denies its existence ;)
> > 
> > Can someone help me to fix this?
> 
> Which board do you use? It seems that the initializing mmc might be failed.
> After enabling debug option, share the log about mmc.
> 
> Best Regards,
> Jaehoon Chung
> 
> > 
> > Thanks a lot.
> >          - Arno
> > 
> > 
> >>mmc info
> > Device: sdhci at e0100000
> > Manufacturer ID: 13
> > OEM: 14e
> > Name: Q1J54
> > Tran Speed: 52000000
> > Rd Block Len: 512
> > MMC version 5.0
> > High Capacity: Yes
> > Capacity: 0 Bytes
> > Bus Width: 4-bit
> > Erase Group Size: 512 KiB
> > HC WP Group Size: 8 MiB
> > User Capacity: 0 Bytes WRREL
> > Boot Capacity: 2 MiB ENH
> > RPMB Capacity: 512 KiB ENH
> > GP1 Capacity: 1.8 GiB ENH WRREL
> > 
> >>mmc hwpartition
> > Partition configuration:
> >         No enhanced user data area
> >         No GP1 partition
> >         No GP2 partition
> >         No GP3 partition
> >         No GP4 partition
> > Card already partitioned
> > Failed!
> > 
> >>mmc read 0 0 1
> > MMC read: dev # 0, block # 0, count 1 ... MMC: block number 0x1 exceeds
> > max(0x0)
> > 0 blocks read: ERROR
> > 
> >>mmc dev 0 0
> > MMC: block number 0x1 exceeds max(0x0)
> > switch to partitions #0, OK
> > mmc0(part 0) is current device
> > 
> > BTW:
> > The GP partiton was created in Linux by the mmc-utils with
> > “mmc gp create -y 1908736 1 1 0 /dev/mmcblk0”
> > 
> > Linux can handle this as you can see in boot message:
> > [    1.248426] mmc0: new high speed MMC card at address 0001
> > [    1.264301] mmcblk0: mmc0:0001 Q1J54A 0 B
> > [    1.268525] mmcblk0boot0: mmc0:0001 Q1J54A partition 1 2.00 MiB
> > [    1.284605] mmcblk0boot1: mmc0:0001 Q1J54A partition 2 2.00 MiB
> > [    1.300666] mmcblk0gp0: mmc0:0001 Q1J54A partition 4 1.82 GiB
> > [    1.316563] mmcblk0rpmb: mmc0:0001 Q1J54A partition 3 512 KiB
> > [    1.325255]  mmcblk0gp0: p1 p2 p3
> > …
> > [    3.083325] EXT4-fs (mmcblk0gp0p1): INFO: recovery required on readonly filesystem
> > [    3.090893] EXT4-fs (mmcblk0gp0p1): write access will be enabled during recovery
> > [    3.189597] EXT4-fs (mmcblk0gp0p1): recovery complete
> > [    3.196310] EXT4-fs (mmcblk0gp0p1): mounted filesystem with ordered data mode. Opts: (null)
> > _______________________________________________
> > U-Boot mailing list
> > U-Boot at lists.denx.de
> > https://lists.denx.de/listinfo/u-boot
> 
>


More information about the U-Boot mailing list