MT7620A SD卡初始化失败

插着TF卡开机,系统启动时TF卡初始化失败。

[    6.880000] MTK MSDC device init.
[    6.930000] mtk-sd: MediaTek MT6575 MSDC Driver
[    6.940000] sdhci-pltfm: SDHCI platform and OF driver helper
[    6.950000] usbcore: registered new interface driver usb-storage
procd: - preinit -
[    7.110000] mmc0: error -145 whilst initialising SD card
[    7.700000] mmc0: error -145 whilst initialising SD card

 

Fix:

drivers/mmc/core/sd_op.c

--- a/drivers/mmc/core/sd_ops.c
+++ b/drivers/mmc/core/sd_ops.c
@@ -40,7 +40,7 @@
         cmd.flags = MMC_RSP_SPI_R1 | MMC_RSP_R1 | MMC_CMD_BCR;
     }
 
-    err = mmc_wait_for_cmd(host, &cmd, 0);
+    err = mmc_wait_for_cmd(host, &cmd, 10);
     if (err)
         return err;
 

成功:

[    6.870000] MTK MSDC device init.
[    6.920000] mtk-sd: MediaTek MT6575 MSDC Driver
[    6.930000] sdhci-pltfm: SDHCI platform and OF driver helper
[    6.940000] usbcore: registered new interface driver usb-storage
procd: - preinit -
[    7.040000] mmc0: new high speed SDHC card at address 59b4
[    7.060000] mmcblk0: mmc0:59b4 00000 7.34 GiB 
[    7.090000]  mmcblk0: p1

 

root@iWooWiFi:~# ls /dev

mmcblk0          
mmcblk0p1

发布了154 篇原创文章 · 获赞 12 · 访问量 52万+
展开阅读全文

SD初始化失败 error -110 whilst initialising SD card

01-19

最近在uboot中做固件升级,需要在uboot阶段识别SD卡。这部分功能已经OK了,但是有一张Toshiba Exceria 128G的SDXC卡识别有问题,然后在进入kernel后也识别不出来,抛出mmc0: error -110 whilst initialising SD card。但是kernel启动完成之后,重新插拔卡是能够识别成功的。 内核中添加打印如下: mmc0: mmc_rescan_try_freq: trying to init card at 400000 Hz SCU 0x40 : 0x00000020 at 400000 Hz mmc0: starting CMD41 arg 00000000 flags 000000e1 response 0x00ff8000 0x00000000 0x00000000 0x00000000 mmc_send_app_op_cond err = 0 mmc_select_voltage = 60000 mmc0: starting CMD41 arg 40060000 flags 000000e1 response 0x00ff8000 0x00000000 0x00000000 0x00000000 mmc0: starting CMD41 arg 40060000 flags 000000e1 response 0x00ff8000 0x00000000 0x00000000 0x00000000 mmc0: starting CMD41 arg 40060000 flags 000000e1 ... mmc0: starting CMD41 arg 40060000 flags 000000e1 response **0x80ff8000** 0x00000000 0x00000000 0x00000000 mmc_sd_init_card err = -110 mmc0: error -110 whilst initialising SD card 正常情况下这个响应是0xC0ff8000。在uboot阶段的响应也是0x80ff8000,有时候也超时。 按说uboot阶段就算识别不出来也不该影响kernel才对(这部分是个人臆想逻辑),因为kernel又是从0开始做一次卡的初始化。我尝过在uboot识别失败后,让卡复位,但kernel还是不能够识别。 两个思路,一是让uboot能够识别成功彻底解决问题;二是规避措施,是否可以让卡在uboot的最后回到初始化之前的状态,不影响kernel的识别? 有没有大神支支招啊,求教! 问答

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 大白 设计师: CSDN官方博客

分享到微信朋友圈

×

扫一扫,手机浏览