AnsweredAssumed Answered

Legacy gpmi-nand layout device tree option not handled correctly

Question asked by Austin Phillips on Jan 19, 2017



I'm using the Linux BSP source code from git://, tag rel_imx_4.1.15_1.2.0_ga.  Hardware is i.MX6 SOLO with Micron NAND MT29F4G08ABADAWP which has 2K + 64bytes OOB pages.


The gpmi-nand.c driver implements an interface to NAND parts which utilise the BCH ECC module for hardware-supported bit error correction within the i.MX 6.  The gpmi-driver supports two NAND layouts, the current and 'legacy' layouts.  From what I understand, the legacy layout was used with 3.x kernels which for the NAND device I'm using had an ECC strength of 8.  Newer layout appear to use an ECC strength of 4 for our Micron part as this is the minimum ECC strength reported by the NAND device.


According to the documentation, the gpmi-nand driver should accept a 'fsl,legacy-bch-geometry' device tree option to support the legacy BCH layout.


There is a bug in the implemention from rel_imx_4.1.15_1.2.0_ga where fsl,legacy-bch-geometry is only recognized if the option to put bad block table on flash is selected.  I've attached a patch to fix this issue.




Original Attachment has been moved to: