u-boot-brain/arch
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
..
arc arc: significant cache rework 2015-07-01 17:17:27 +03:00
arm mtd: nand: mxs support oobsize bigger than 512 2015-08-25 22:53:58 -05:00
avr32 avr32: delete ancient board.c 2015-06-10 14:03:26 +02:00
blackfin arch: Make board selection choices optional 2015-05-12 18:10:02 -04:00
m68k m68k: cache: add an empty stub functions for invalidate/flush dcache 2015-08-12 20:47:46 -04:00
microblaze arch: Make board selection choices optional 2015-05-12 18:10:02 -04:00
mips MIPS: change 'extern inline' to 'static inline' 2015-07-02 11:29:33 +02:00
nds32 arch: Make board selection choices optional 2015-05-12 18:10:02 -04:00
nios2 arch: Make board selection choices optional 2015-05-12 18:10:02 -04:00
openrisc arch: Make board selection choices optional 2015-05-12 18:10:02 -04:00
powerpc Correct License and Copyright information on few files 2015-08-12 20:47:46 -04:00
sandbox dm: test: Add a size to each reg property 2015-07-21 17:39:33 -06:00
sh Move default y configs out of arch/board Kconfig 2015-06-25 22:17:55 -04:00
sparc arch: Make board selection choices optional 2015-05-12 18:10:02 -04:00
x86 x86: minnowmax: Define and enable interrupt setup 2015-08-14 09:50:14 -06:00
.gitignore .gitignore: drop include/asm/proc from ignore pattern 2014-06-19 11:18:54 -04:00
Kconfig kbuild: create symbolic link only for ARM, AVR32, SPARC, PowerPC, x86 2015-07-27 15:02:00 -04:00