unrecognised EXT_CSD revision 6解决办法

来源:互联网 发布:百度人工智能开发文档 编辑:程序博客网 时间:2024/06/10 23:05

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

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

mmc: core: Detect eMMC v4.5 ext_csd entriesGitweb:     http://git.kernel.org/linus/38ca285044be88a0fb47b6eb91deeeb729435fd0Commit:     38ca285044be88a0fb47b6eb91deeeb729435fd0Parent:     d5a5bd1c3f7e8d010393530d60df8da75218a488Author:     Kyungmin Park <kyungmin.park <at> samsung.com>AuthorDate: Tue Jul 26 17:12:37 2011 +0900Committer:  Chris Ball <cjb <at> laptop.org>CommitDate: Sat Aug 13 14:50:22 2011 -0400    mmc: core: Detect eMMC v4.5 ext_csd entries    The eMMC v4.5 Spec is released now:    EXT_CSD_REVExtended CSD Revision    255-7Reserved    6Revision 1.6 (for MMC v4.5)    5Revision 1.5 (for MMV v4.41)    ...    Signed-off-by: Kyungmin Park <kyungmin.park <at> samsung.com>    Signed-off-by: Chris Ball <cjb <at> laptop.org>--- drivers/mmc/core/mmc.c |    2 +- 1 files changed, 1 insertions(+), 1 deletions(-)diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.cindex aa7d1d7..5700b1c 100644--- a/drivers/mmc/core/mmc.c+++ b/drivers/mmc/core/mmc.c <at>  <at>  -259,7 +259,7  <at>  <at>  static int mmc_read_ext_csd(struct mmc_card *card, u8 *ext_csd) } card->ext_csd.rev = ext_csd[EXT_CSD_REV];-if (card->ext_csd.rev > 5) {+if (card->ext_csd.rev > 6) { printk(KERN_ERR "%s: unrecognised EXT_CSD revision %d\n", mmc_hostname(card->host), card->ext_csd.rev); err = -EINVAL;--To unsubscribe from this list: send the line "unsubscribe git-commits-head" inthe body of a message to majordomo <at> vger.kernel.orgMore 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定义:


额外的一段资料

mmc: core: Update the ext-csd.rev check for eMMC5.1  00/55800/5authorYuvaraj CD <yuvaraj.cd@gmail.com>Tue, 21 May 2013 17:38:43 +0800 (09:38 +0000)committerChromeBot <chrome-bot@google.com>Thu, 23 May 2013 08:57:28 +0800 (17:57 -0700)With the new eMMC5.1 spec,there is a new EXT_CSD register withthe revision number(EXT_CSD_REV) 7.This patch updates the checkfor ext-csd.rev number as 7.This patch was picked from patchwork:  http://patchwork.kernel.org/patch/2596591/BUG=chrome-os-partner:19007TEST=Boot kernel on SMDK5420. /wo this patch emmc gives error "mmc0:     unrecognised EXT_CSD revision 7"     /w this patch the above error is not seen.Change-Id: I08843976eeba6e63adc27c02365f71f8d4dc6fa0Signed-off-by: Alim Akhtar <alim.akthar@samsung.com>Signed-off-by: Yuvaraj Kumar C D <yuvaraj.cd@samsung.com>Signed-off-by: Doug Anderson <dianders@chromium.org>Reviewed-on: https://gerrit.chromium.org/gerrit/55800drivers/mmc/core/mmc.cpatch | blob | blame | historydiff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.cindex 089e8ea..66b996f 100644 (file)--- a/drivers/mmc/core/mmc.c+++ b/drivers/mmc/core/mmc.c@@ -292,7 +292,7 @@ static int mmc_read_ext_csd(struct mmc_card *card, u8 *ext_csd)        }         card->ext_csd.rev = ext_csd[EXT_CSD_REV];-       if (card->ext_csd.rev > 6) {+       if (card->ext_csd.rev > 7) {                pr_err("%s: unrecognised EXT_CSD revision %d\n",                        mmc_hostname(card->host), card->ext_csd.rev);                err = -EINVAL;

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