I'm using the Linux BSP source code from git://git.freescale.com/imx/linux-2.6-imx.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: fix-gpmi-fsl-legacy-bch-geometry-device-tree-option.patch.zip