porting marvell-nand driver for u-boot

Miquel Raynal
2020-03-06T08:48:18Z

Hi Zak,

Zak Hays <zak.hays@lexmark.com> wrote on Thu, 5 Mar 2020 19:09:54 +0000:

> Hello all!
>
> I've recently run into an issue where I have enabled on-die ECC in Linux which required the block sizing I had been using to change from 2048 to 512. This is now causing UBI to throw the following error:

You know that you cannot do that and keep the content of your NAND
device right? You are basically enabling subpage access and UBI does
not support subpage changes.

Otherwise, I think subpage access are supported by the pxa driver.

> ubi0 error: ubi_io_read: error -74 (ECC error) while reading 64 bytes from PEB 0:0, read 64 bytes
> ubi0 error: validate_ec_hdr: bad VID header offset 512, expected 2048
> ubi0 error: validate_ec_hdr: bad EC header
>
> As far as I can tell, the 2048 value is hard-coded in the current pxa nand driver I had been using in u-boot. It seems like the preferred path to proceed would be to port the current marvell-nand driver from Linux into u-boot but that seems a little more involved as it will require changes to the core nand driver as well. Are there any current plans to adapt these changes from v4.16+ of Linux? If so, is there a patch set somewhere that I could pull in to start testing?
>
> Thanks!
> Zak Hays

Thanks,
Miqu?l