On Tue, Aug 24, 2010 at 9:51 AM, Ghorai, Sukumar <s-ghorai@xxxxxx> wrote: > > >> -----Original Message----- >> From: Cliff Brake [mailto:cliff.brake@xxxxxxxxx] >> Sent: Wednesday, August 18, 2010 9:16 PM >> To: Ghorai, Sukumar >> Cc: Linux OMAP Users; Kamat, Nishant >> Subject: Re: NAND ECC in linux-omap >> >> On Wed, Aug 18, 2010 at 12:14 AM, Ghorai, Sukumar <s-ghorai@xxxxxx> wrote: >> > [Ghorai] >> > 1. Can you send the git tree link and branch you are referring? >> >> git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm.git >> branch: pm >> 95e42b92313f229cbc9fc81bf68fe60aaee515aa >> >> I'm pretty sure this branch tracks linux-omap. I have not tested >> linux-omap yet >> (git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap- >> 2.6.git:master) >> >> > 2. I am working to support the NAND BCH and not upstream yet, how you >> apply this patch in PM branch. >> >> What do you mean by upstream? I'm not sure what NAND changes are in >> the above pm branch -- that is what I'm trying to figure out :-) >> Perhaps you can suggest if I'm using BCH, etc. >> >> > 3. which x-loader and u-boot you are referring? And no x-loader/ u-boot >> supports the BCH >> >> I'm using the x-loader/u-boot from for the Gumstix Overo. My >> understanding is that it uses software -- likely not BCH, but I'm not >> sure. > > [Ghorai] understand the problem, it's a nand ECC layout (location where ECC stors) problem, > I think you flush the JFFS2 flash filesystem from u-boot and kernel not able to mount it. > So let boot the image form say from MMC/SD or NFS (1st time); and use the utility after boot (flash_eraseall, nandwrite, ..) to write the JFFS2 image in NAND. And you can check JFFS2 mount or any further test. > > If this does not help, send me the nanddump of the any page you write the data from u-boot. Thanks for the suggestions. I did write the JFFS2 image with the following commands: flash_erasall -j /dev/mtd4 I then mounted the fs with: mount -t jffs2 /dev/mtdblock4 /media/mtdblock4 and extracted a tar archive into it. I immediately get some ECC errors. If I unmount, and re-mount I get continuous streaming ECC errors. As Linux is managing the entire process, it seems there must be a disconnect somewhere. Also, note that I disabled HW ECC in drivers/mtd/nand/omap2.c so that I could get x-load and u-boot to work with images written with nandwrite as noted previously in this thread. I then reverted my change that disables hw ECC, and the above procedure worked fine. So I guess I need to figure out some way that I can write images to the u-boot/kernel partitions that is compatible with my x-loader/u-boot and at the same time keep JFFS2 working. At the present, it seems that: - x-loader/u-boot will only read images written in Linux with hw ECC disabled in omap2.c - JFFS2 will only work with hw ECC enabled in omap2.c Again, thanks for the explanation, and I appreciate any suggestions going forward. Thanks, Cliff -- ================= http://bec-systems.com -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html