码迷,mamicode.com
首页 > 其他好文 > 详细

非热插拔的SD卡在userDebug版本上可以识别,在user版本上偶尔不能识别

时间:2017-03-21 17:34:56      阅读:202      评论:0      收藏:0      [点我收藏+]

标签:int   sig   creat   dea   delay   set   always   esc   hardware   

hi,
      非热插拔的SD卡在userDebug版本上可以识别,在user版本上偶尔不能识别,不能识别的原因是kernel log中根本就没有检测到卡。user版本不能识别的概率在50%左右。userdebug都可以识别。

     而user和userdebug的kernel在时间和速度上有些差别,sd卡驱动是否会有同步方面的bug?还是其他什么原因

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Created By: Bo Du (3/20/2017 7:58 PM)
Dear customer,



Add a delay after “mmc_power_up(host, host->ocr_avail);” in  mmc_rescan_try_freq(), and test again.

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Created By: yu tan (3/20/2017 11:12 PM)
hi ,

   我的mmc_power_up()的参数和你给的不一样,如下:



--- a/drivers/mmc/core/core.c

+++ b/drivers/mmc/core/core.c

@@ -3260,6 +3260,8 @@ static int mmc_rescan_try_freq(struct mmc_host *host, unsigned freq)

#endif

        mmc_power_up(host);



+       udelay(500);

+

        /*

         * Some eMMCs (with VCCQ always on) may not be reset after power up, so

         * do a hardware reset if possible.





我使用500us这个数值合适吗?从实验结果看确实可以!请问原因是什么呢?

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Created By: Bo Du (3/21/2017 12:11 AM)
Power supply of your device might not stable at the point of starting initializaion of SD after power up.

If 500us is not enough, you can try to delay 1ms or more, it depends your hardware.

非热插拔的SD卡在userDebug版本上可以识别,在user版本上偶尔不能识别

标签:int   sig   creat   dea   delay   set   always   esc   hardware   

原文地址:http://www.cnblogs.com/steadfast/p/6595636.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!