
On 03/16/2011 03:44 PM, Stefano Babic wrote:
Sure. I will inform you about my progresses (if any...).
Solved. It was a misunderstanding about how to set up the NAND driver in linux. I think the usage of the "id" field in the platform device can confuse, as it did for me. I thought the id was used only as index for multiple devices, but the driver takes it as chipselect, even if the value of the chip select itself could be derived from the resource structure.
And then, the value of the chip select is used by the driver to enable the ECC, and as I passed the wrong chip select, the hw ecc was disabled. Even if I could correctly write/read the NAND under Linux.
I have checked the two drivers and I went to the conclusion that they are fully compatible. They do exactly the same things and in the same sequence, no problem at all.
My problem was caused by the fact I have set up the device platform with "id = 1", and this is translate by the driver as chip select = 3. However, on my board chip select 2 is used ;-(
Ben, I have already tested writing from linux, and u-boot can now read the partition correctly. I think there is no incompatibility problem with the mainline kernel.
Best regards, Stefano Babic