unrecognised EXT_CSD revision 6解决办法

我是在编译了3.0内核后发现eMMC卡怎么也初始化不了,老提示这个错误。但正常的SD卡确可以使用,经过一番研究,在结合网上查找的资料,终于将问题解决了。

在网上搜到的资料,说明了内核对eMMC4.5的支持方法:

[html] view plaincopy

  1. mmc: core: Detect eMMC v4.5 ext_csd entries  
  2.   
  3. Gitweb:     http://git.kernel.org/linus/38ca285044be88a0fb47b6eb91deeeb729435fd0  
  4. Commit:     38ca285044be88a0fb47b6eb91deeeb729435fd0  
  5. Parent:     d5a5bd1c3f7e8d010393530d60df8da75218a488  
  6. Author:     Kyungmin Park <kyungmin.park <at> samsung.com>  
  7. AuthorDate: Tue Jul 26 17:12:37 2011 +0900  
  8. Committer:  Chris Ball <cjb <at> laptop.org>  
  9. CommitDate: Sat Aug 13 14:50:22 2011 -0400  
  10.   
  11.     mmc: core: Detect eMMC v4.5 ext_csd entries  
  12.   
  13.     The eMMC v4.5 Spec is released now:  
  14.   
  15.     EXT_CSD_REV Extended CSD Revision  
  16.     255-7       Reserved  
  17.     6       Revision 1.6 (for MMC v4.5)  
  18.     5       Revision 1.5 (for MMV v4.41)  
  19.     ...  
  20.   
  21.     Signed-off-by: Kyungmin Park <kyungmin.park <at> samsung.com>  
  22.     Signed-off-by: Chris Ball <cjb <at> laptop.org>  
  23. ---  
  24.  drivers/mmc/core/mmc.c |    2 +-  
  25.  1 files changed, 1 insertions(+), 1 deletions(-)  
  26.   
  27. diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c  
  28. index aa7d1d7..5700b1c 100644  
  29. --- a/drivers/mmc/core/mmc.c  
  30. +++ b/drivers/mmc/core/mmc.c  
  31.  <at>  <at>  -259,7 +259,7  <at>  <at>  static int mmc_read_ext_csd(struct mmc_card *card, u8 *ext_csd)  
  32.     }  
  33.   
  34.     card->ext_csd.rev = ext_csd[EXT_CSD_REV];  
  35. -   if (card->ext_csd.rev > 5) {  
  36. +   if (card->ext_csd.rev > 6) {  
  37.         printk(KERN_ERR "%s: unrecognised EXT_CSD revision %d\n",  
  38.             mmc_hostname(card->host), card->ext_csd.rev);  
  39.         err = -EINVAL;  
  40. --  
  41. To unsubscribe from this list: send the line "unsubscribe git-commits-head" in  
  42. the body of a message to majordomo <at> vger.kernel.org  
  43. More majordomo info at  http://vger.kernel.org/majordomo-info.html  

3.0的内核只支持到了eMMC-v4.41版本,对应的版本号5。

最新的eMMC-v4.5对应的版本好为6,所以程序为报错,提示版本号6不支持。只要将版本号判断修改为6即可。

eMMC-v5.0协议对EXT_CSD_REV定义:

额外的一段资料

[html] view plaincopy

扫描二维码关注公众号,回复: 9308805 查看本文章
  1. mmc: core: Update the ext-csd.rev check for eMMC5.1  00/55800/5  
  2.   
  3.   
  4.   
  5. authorYuvaraj CD <[email protected]>  
  6. Tue, 21 May 2013 17:38:43 +0800 (09:38 +0000)  
  7. committerChromeBot <[email protected]>  
  8. Thu, 23 May 2013 08:57:28 +0800 (17:57 -0700)  
  9.   
  10.   
  11.   
  12. With the new eMMC5.1 spec,there is a new EXT_CSD register with  
  13.   
  14. the revision number(EXT_CSD_REV) 7.This patch updates the check  
  15.   
  16. for ext-csd.rev number as 7.  
  17.   
  18.   
  19.   
  20. This patch was picked from patchwork:  
  21.   
  22.   http://patchwork.kernel.org/patch/2596591/  
  23.   
  24.   
  25.   
  26. BUG=chrome-os-partner:19007  
  27.   
  28. TEST=Boot kernel on SMDK5420. /wo this patch emmc gives error "mmc0:  
  29.   
  30.      unrecognised EXT_CSD revision 7"  
  31.   
  32.      /w this patch the above error is not seen.  
  33.   
  34.   
  35.   
  36. Change-Id: I08843976eeba6e63adc27c02365f71f8d4dc6fa0  
  37.   
  38. Signed-off-by: Alim Akhtar <[email protected]>  
  39.   
  40. Signed-off-by: Yuvaraj Kumar C D <[email protected]>  
  41.   
  42. Signed-off-by: Doug Anderson <[email protected]>  
  43.   
  44. Reviewed-on: https://gerrit.chromium.org/gerrit/55800  
  45.   
  46.   
  47.   
  48.   
  49.   
  50.   
  51.   
  52.   
  53. drivers/mmc/core/mmc.c  
  54.   
  55. patch | blob | blame | history  
  56.   
  57.   
  58.   
  59.   
  60.   
  61.   
  62. diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c  
  63.   
  64. index 089e8ea..66b996f 100644 (file)  
  65.   
  66.   
  67. --- a/drivers/mmc/core/mmc.c  
  68. +++ b/drivers/mmc/core/mmc.c  
  69. @@ -292,7 +292,7 @@ static int mmc_read_ext_csd(struct mmc_card *card, u8 *ext_csd)  
  70.         }  
  71.    
  72.         card->ext_csd.rev = ext_csd[EXT_CSD_REV];  
  73. -       if (card->ext_csd.rev > 6) {  
  74. +       if (card->ext_csd.rev > 7) {  
  75.                 pr_err("%s: unrecognised EXT_CSD revision %d\n",  
  76.                         mmc_hostname(card->host), card->ext_csd.rev);  
  77.                 err = -EINVAL;  


更是牛人,这个是在chromium.org网站有人提交的补丁,使chromiumos支持eMMC-v5.1。

发布了6 篇原创文章 · 获赞 30 · 访问量 10万+

猜你喜欢

转载自blog.csdn.net/boyemachao/article/details/104424577