uboot如何支持emmc5.0

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

uboot如何支持emmc5.0

6,129 Views
void_
Contributor I

大家好,最近板子换了颗5.0版本的emmc后uboot就启动不了,以前的旧板子是4.4的可以正常启动

U-Boot 2014.04 (Mar 22 2017 - 14:17:58)

CPU: Freescale i.MX6Q rev1.5 at 792 MHz
CPU: Temperature 33 C, calibration data: 0x5884df7d
Reset cause: POR
Board: MX6-SabreSD
I2C: ready
DRAM: 1 GiB
MMC: FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
MMC init failed              (一直提示初始化失败)
Using default environment

No panel detected: default to Hannstar-XGA
Display: Hannstar-XGA (1024x768)
In: serial
Out: serial
Err: serial
mmc2(part 0) is current device
Net: Phy not found
PHY reset timed out
FEC [PRIME]
Warning: failed to set MAC address

Normal Boot
Hit any key to stop autoboot: 0
mmc2(part 0) is current device
Booting from net ...
*** ERROR: `ethaddr' not set
*** ERROR: `ethaddr' not set
Bad Linux ARM zImage magic!

我看了其他论坛也有人出现过这个,但没人给出有用的结论,不知道这里是否有人遇到过这个问题,kernel中有emmc版本的判断这个我知道,不知道uboot中是否也有这样的判断呢?

Labels (4)
0 Kudos
Reply
7 Replies

3,953 Views
westbrook
Contributor III

Hi, HongBo Liu

I faced this "MMC init failed" issue after I change the board boot kind. Originally the customized board is boot from SPI flash, I change to boot from eMMC, then this failed issue happened.

I found the reason of this issue, in the mmc_get_env_devno() function, it will get teh mmc device number, this is number is set by board_mmc_init() function. My emmc is 0 when boot from SPI flash, when boot from eMMC, the eMMC is set to 1.

int mmc_get_env_devno(void)
{
u32 soc_sbmr = readl(SRC_BASE_ADDR + 0x4);
u32 dev_no;
u32 bootsel;

bootsel = (soc_sbmr & 0x000000FF) >> 6 ;

/* If not boot from sd/mmc, use default value */
if (bootsel != 1)
return CONFIG_SYS_MMC_ENV_DEV;

/* BOOT_CFG2[3] and BOOT_CFG2[4] */
dev_no = (soc_sbmr & 0x00001800) >> 11;

/* need ubstract 1 to map to the mmc3 device id
* see the comments in board_mmc_init function
*/
if (2 == dev_no)
//dev_no--;

dev_no = CONFIG_SYS_MMC_ENV_DEV;     => I fix this issue by modify the device number 

return dev_no;
}

BR,

Xiao

0 Kudos
Reply

3,953 Views
Rita_Wang
NXP TechSupport
NXP TechSupport

Hi,

You can refer to the document I created in our communityEMMC 5.0 and EMMC 5.1 work on i.MX6 ,hope this can help you. You neeed to modify the value of card->ext_csd.rev.
Have a great day,
Rita

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
Reply

3,953 Views
void_
Contributor I

你好,@Rita Wang

你说的kernel部分的修改我了解,我所遇到的问题是uboot启动时就出错了,在emmc5.0的板子上我成功启动过 i.MX6 Linux BSP (L3.0.35_4.1.0),其中这个版本的uboot-2009.08是不需要做修改。现在我用的是uboot-2014.04,我对比过mmc部分的代码,两者有很大的区别

0 Kudos
Reply

3,953 Views
Rita_Wang
NXP TechSupport
NXP TechSupport

你使用的是我们官网哪个版本的BSP?你使用mfgtool烧写,可以成功烧写吗?

0 Kudos
Reply

3,953 Views
void_
Contributor I

我使用的是yocto工程,里面uboot是2014.04版本的,kernel是3.10.53版本。mfgtool原本是不能烧录的,后来我修改了kernel中的card->ext_csd.rev,重新编译了kernel固件现在是可以烧录的,但烧录后uboot一直起不来,提示mmc初始化失败

0 Kudos
Reply

3,953 Views
sunshineyang
Contributor I

请问问题解决了吗?我也遇到同样的问题

0 Kudos
Reply

3,953 Views
guangyang
Contributor I

我也遇到这个问题了,你解决了吗

0 Kudos
Reply