
Hi Jaehoon,
On Tue, Sep 20, 2016 at 08:10:52AM +0900, Jaehoon Chung wrote:
So I've been on the same issue for the last couple of days.
Since that board is already supported, adding support for the eMMC basically came down to that patch on top of 2016.09-rc2.
http://code.bulix.org/kcgxri-106037?raw
(Quite hackish, the 8-Bits part being a separate issue that would need to be addressed somehow).
However, it doesn't work, neither when flashing u-boot on the eMMC itself (where there's a timeout error in the SPL) nor when trying to access the eMMC from a U-Boot loaded from the (external) SD.
In the latter case, even mmc dev 1 fails silently.
I traced that down to the mmc_switch here: http://git.denx.de/?p=u-boot.git;a=blob;f=drivers/mmc/mmc.c#l530
Which fails with ETIMEDOUT, and more specifically, it's the call to mmc_rint_wait here http://git.denx.de/?p=u-boot.git;a=blob;f=drivers/mmc/sunxi_mmc.c#l383 that times out.
Increasing the timeout value (to 10000) doesn't really change anything. I guess this is also the reason why we had a timeout error in the SPL.
timeout_msecs is expired or hit SUNXI_MMC_RINT_INTERRUPT_ERROR_BIT? If hit ERROR_BIT, did you check which bit is set?
If error is occurred when mmc_change_freq() is running, cid/ext_csd register have already read. It means the controller read the something from eMMC card.
So I've been able to test this, and we indeed not hit the timeout but the error bit is set, with 0x40.
Maxime