Dear All,
I'm working with different TI cortex-A8 platform (DM8148, AM335x, AM35xx) and all of the uses the driver/mtd/nand/omap2.c driver for the integrated NAND controller.
I've found some issue with some Spansion NANDs that should be compatible with other Samsung parts (we also use Micron too) that the already use without problems on the same products.
Getting deeper into the code to find the bug, I've found an issue withing the hardware ecc page read, found in variuos kernel.
For example in 2.6.37 (http://arago-project.org/git/projects/?p=linux-omap3.git;a=summary) and 3.1/3.2 (http://arago-project.org/git/projects/?p=linux-am33x.git) official kernel (for dm8148 and am33x plarform) there's an error (correct me if I'm wrong) in omap_read_page_bch().
In particular the command NAND_CMD_RNDOUT is used in the wrong way: by reading the datasheet of nearly every nand, first we must send the command to read the whole page and later send the "random access read" command withing this page. In the code of the two kernels above the page read command is never send, while into the "random access" command is send the page address too.
We look at the bus (but the source code confirm this) with a logical analizer and see that this give a transaction that's wrong, compared to the one described into the datasheet
The function can be fixed pretty easily, but I'm looking for an "official" solution.
By looking at some other kernel repositories I've found that:
- into the official (3.10.x) torvalds tree https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git the function is implemented (correctly, IIUC) by this commit
- into the git.ti.com 3.8 tree, it seems that we have a completely different implementation (at the moment of writing, I'm still trying to understand if this driver is correct or not)
http://git.ti.com/ti-linux-kernel/ti-linux-kernel/blobs/master/drivers/mtd/nand/omap2.c
Is there any other place to look for a "official" kernel tree?
Has anybody have an experience like this on some "omap2" nand driver based platform?
Has someone, hopefully in TI itself, has a fix (or want to write a fix, I can help in this, in writing and/or testing) for this issue?
Thanks in advance for any feedback and Best Regards,
Andrea