源码参考九鼎科技X210开发板捆绑的BSP中提取的uboot
int mmc_init(struct mmc *host)
函数定义在uboot/drivers/mmc/mmc.c中
1. 调用s3c_hsmmc_init()
在s3c_hsmmc_initialize()中进行过初始化,把函数指针赋值给mmc->init
err = host->init(host);
主要作用是reset emmc controller, 及对emmc controller相关寄存器进行赋值,最后设置时钟为400Khz
2. 发送命令进行Card初始化
emmc controller给card发送命令的方式是先进行结构体填充,再用mmc_send_cmd函数进行发送
结构体填充
struct mmc_cmd {
ushort opcode;
uint resp_type;
uint