u-boot/arch/arm/include/asm/imx-common
Peng Fan 63b29d8082 mtd: nand: mxs support oobsize bigger than 512
If ecc chunk data size is 512 and oobsize is bigger than 512, there is
a chance that block_mark_bit_offset conflicts with bch ecc area.

The following graph is modified from kernel gpmi-nand.c driver with
each data block 512 bytes. We can see that Block Mark conflicts with
ecc area from bch view. We can enlarge the ecc chunk size to avoid
this problem to those oobsize which is larger than 512.

   |                          P                                        |
   |<----------------------------------------------------------------->|
   |                                                                   |
   |                                                (Block Mark)       |
   |                      P'                             |           | |   |
   |<--------------------------------------------------->|     D     | | O'|
   |                                                     |<--------->| |<->|
   V                                                     V           V V   V
   +---+--------------+-+--------------+-+--------------+-+----------+-+---+
   | M |   data       |E|   data       |E|   data       |E|   data   |E|   |
   +---+--------------+-+--------------+-+--------------+-+----------+-+---+
                                                        ^                  ^
                                                        |         O        |
                                                        |<---------------->|

       P : the page size for BCH module.
       E : The ECC strength.
       G : the length of Galois Field.
       N : The chunk count of per page.
       M : the metasize of per page.
       C : the ecc chunk size, aka the "data" above.
       P': the nand chip's page size.
       O : the nand chip's oob size.
       O': the free oob.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Tested-By: Tim Harvey <tharvey@gateworks.com>
2015-08-25 22:53:58 -05:00
..
boot_mode.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
dma.h imx: dma: correct MXS_DMA_ALIGNMENT 2015-05-26 14:14:49 +02:00
gpio.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
imximage.cfg Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
iomux-v3.h imx: mx6 add PAD_CTL_SPEED_LOW for i.MX6SX/UL 2015-08-02 11:05:08 +02:00
mx5_video.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
mxc_i2c.h i2c: mxc: refactor i2c driver and support dm 2015-05-14 18:49:36 -06:00
regs-apbh.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
regs-bch.h mtd: nand: mxs support oobsize bigger than 512 2015-08-25 22:53:58 -05:00
regs-common.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
regs-gpmi.h Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
regs-usbphy.h usb: host: Add ehci-vf USB driver for ARM Vybrid SoC's 2015-04-23 14:56:09 -04:00
sata.h nitrogen6x: Move setup_sata to common part 2013-12-17 18:12:14 +01:00
spi.h ARM: i.MX: provide declaration for board_spi_cs_gpio 2014-10-21 10:47:14 +02:00
video.h video, ipu: make ldb clock frequency overwritable through board code 2015-04-20 09:36:59 +02:00