AnsweredAssumed Answered

mxc_nand.c driver in uBoot

Question asked by Michael McTernan on Feb 10, 2012
Latest reply on Sep 12, 2012 by George Huntington

Hi,

I'm trying to get uBoot working from NAND on an i.MX53 (actually a Karo TX53 module).  I've got it starting up okay and the FEC works, but I'm finding a few problems with the NAND driver.

Specifically while uBoot thinks it can read and write okay, when booting Linux the JFFS system reports lots and lots of CRC errors and fails to mount.  JFFS is fine when if I use RedBoot to write the flash.

So I'm not entirely sure if the uBoot mxc_nand.c supports this NAND device (Samsung K9F1G08U0A, 128MB, 2k pages).  Specifically I notice in the uBoot mxc_nand driver that it doesn't appear to have the ECC layouts used by the Linux Kernel version of this same driver (struct nand_ecclayout nandv2_hw_eccoob_largepage is missing for example).  Also the driver has the following unhelpful code which appears to make the BBT non-standard such that RedBoot and Linux don't see it and vice versa:

/* keep compatible for bbt table with old soc */
#ifdef CONFIG_MX53
    bbt_mirror_descr.offs = BAD_BLK_MARKER_OOB_OFFS + 2;
    bbt_main_descr.offs = BAD_BLK_MARKER_OOB_OFFS + 2;
    bbt_mirror_descr.veroffs = bbt_mirror_descr.offs + 4;
    bbt_main_descr.veroffs = bbt_main_descr.offs + 4;
#endif

This is with uBoot taken from Freescale's L2.6.35_11.09.01_ER BSP fwhich itself looks to be pretty old.  However, the mainline uboot imx git tree (git://www.denx.de/git/u-boot-imx.git), while much much neater, appears to have an older drivers for the mxc_nand controller.

I was wondering if anyone else has had success with NAND access from uboot on an i.MX53, and which flash device and software version they used?

Regards,

Mike

 

 

 

Outcomes