hi
目前8127智能相机开发都完毕了,在硬件成本优化过程中,我们打算用256MB的8bit nand替换原来appro自带的镁光256 MB 16bit nand。
boot12拉低后,更改uboot中evm.c的代码 gpmc_set_cs_buswidth(0, get_sysboot_ipnc_bw()); 为 gpmc_set_cs_buswidth(0, get_sysboot_bw()); 以返回正确的bus width。
之后UBOOT以及kernel都正常起来了。但在UBI挂载分区的时候出错。vtbl_check报CRC错误 ,但是如果ECC出问题,uboot和kernel都会出问题,所以可以排除。
8127的RDK(V3.5)对16bit nand替换成8bit的nand有什么解决方法么。2个NAND的PAGE,BLOCK,chipsize都是一样的,uboot的bus width问题我也改过了,mkubifs的参数没有动过。问题还可能出在哪?
16 bit nand: MT29F2G16AADWP
8 bit nand:S34ML02G100TFI00
Louis:
Hi Liwei,
请参考: http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/716/t/195308.aspx
http://processors.wiki.ti.com/index.php/UBIFS_Support
Louis:
回复 Louis:
检查一下这个补丁是否打上?
http://arago-project.org/git/projects/?p=linux-dvr-rdk-dm81xx.git;a=commit;h=45fc6a799471a0b85b807b14b7f3bf0977dd2bc3
omap2:nand: Code fix for NAND corruption issueIt seems the code tried to put a restriction that only to apply BCH syndromecalculation and error correction on a full page (2048 bytes) or multiple fullpages NAND data read. This bug leads to the various UBIFS NAND corruptionscaused by ECC detection andcorrection is being skipped for a UBIFS.
diff –git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
index ffca884..fe6792c 100644 (file)
— a/drivers/mtd/nand/omap2.c
+++ b/drivers/mtd/nand/omap2.c
@@ -853,15 +853,12 @@ static int omap_read_page_bch(struct mtd_info *mtd, struct nand_chip *chip,
for (i = 0 ; eccsteps; eccsteps–, i += eccbytes, p += eccsize) {
int stat;
– if (!(chip->ops.len & 0x7ff)) {
– stat = chip->ecc.correct(mtd, p, &ecc_code[i],
– &ecc_calc[i]);
–
– if (stat < 0)
– mtd->ecc_stats.failed++;
– else
– mtd->ecc_stats.corrected += stat;
– }
+ stat = chip->ecc.correct(mtd, p, &ecc_code[i], &ecc_calc[i]);
+
+ if (stat < 0)
+ mtd->ecc_stats.failed++;
+ else
+ mtd->ecc_stats.corrected += stat;
}
return 0;
}
shupeng hu:
回复 Louis:
你好,
我的代码是这样的
for (i = 0 ; eccsteps; eccsteps–, i += eccbytes, p += eccsize) { int stat;
if (!(chip->ops.len & 0x7ff)) { stat = chip->ecc.correct(mtd, p, &ecc_code[i], &ecc_calc[i]);
if (stat < 0) mtd->ecc_stats.failed++; else mtd->ecc_stats.corrected += stat; } else { //printk(KERN_INFO "out ecc/n"); } }
这样会出现某些位没有经过ecc检测码,另外chip->ops.len & 0x7ff这句话的作用是什么呢
shupeng hu:
回复 Louis:
http://arago-project.org/git/projects/?p=linux-dvr-rdk-dm81xx.git;a=commit;h=45fc6a799471a0b85b807b14b7f3bf0977dd2bc3这个网站是干什么用的呢,我怎么没听说过啊,可以介绍下吗