[U-Boot] [bug report] sunxi: booting from eMMC

Alexandr Bochkarev aneox.inbox at gmail.com
Sat Nov 5 11:58:21 CET 2016


Hi,

I have tried it, no success

>>U-Boot SPL 2016.11-rc3-00001-g9fa5bf3-dirty (Nov 05 2016 - 16:18:14)
>>DRAM: 1024 MiB
>>CPU: 912000000Hz, AXI/AHB/APB: 3/2/2
>>Trying to boot from MMC1
>>mmc_load_image_raw_sector: mmc block read error
>>SPL: failed to boot from all boot devices
>>### ERROR ### Please RESET the board ###


In my case, i am sure, that problem not in emmc card.
First MMC_CMD_SWITCH in mmc_change_func works well without patches, but get stuck in second, when change bus width.

I have two almost similar socs, Allwinner A13(sun5i) and A20(sun7i).
They uses same sunxi_mmc.c driver. A13 boots well with master branch, but A20 only with my patch.

Below link shows diff in boot logs, A20 CONFIG_MACH_SUN7I on left, and A13 CONFIG_MACH_SUN5I on right side. A13 works well
https://www.diffchecker.com/XrmlaZfH <https://www.diffchecker.com/XrmlaZfH>

Using logic analyzer, i analyzed all command and all responses. 
Diagrams absolutely the same, from u-boot spl start, on both socs, until mmc_rint_wait return error.

https://dl.dropboxusercontent.com/u/10252748/A20vsA13.png <https://dl.dropboxusercontent.com/u/10252748/A20vsA13.png>
https://dl.dropboxusercontent.com/u/10252748/A20vsA13_ZOMMED.png <https://dl.dropboxusercontent.com/u/10252748/A20vsA13_ZOMMED.png>

at first look, looks like emmc not respond to A20, but if zoom more, 
https://www.dropbox.com/s/80u232i7wod93gf/A20.png?dl=0 <https://www.dropbox.com/s/80u232i7wod93gf/A20.png?dl=0>
we see, that no clocks in some time. If take A13 diagram, no empty clocks!
I have no jtag to debug more. I am not sure, but i think, for some reason, this empty clocks cause card fail.

So, only with this patch, Allwinner A20 soc can boot from emmc https://www.dropbox.com/s/0lfe2xifzbdbokb/emmcFix.patch?dl=0 <https://www.dropbox.com/s/0lfe2xifzbdbokb/emmcFix.patch?dl=0>



> 5 нояб. 2016 г., в 14:18, Hans de Goede <hdegoede at redhat.com> написал(а):
> 
> Hi,
> 
> Maxime posted a proper fix for this issue yesterday:
> 
> https://patchwork.ozlabs.org/patch/691284/
> 
> Can you give that one a try and see if it fixes things for you
> as well ?
> 
> Regards,
> 
> Hans
> 


More information about the U-Boot mailing list