[1/1] mxc_nand : allow swapping the Bad block Indicator for NFC v1.
Juergen Beisert
jbe at pengutronix.de
Thu Sep 6 06:44:01 EDT 2012
Gaëtan Carlier wrote:
> Hi Javier,
>
> On 09/06/2012 11:14 AM, javier Martin wrote:
> > Hi Gaëtan,
> > has this behavior been documented by Freescale anywhere?
There is an application note available
called "FSL_AppNote_Nand_Flash_Bad_Block_Management_for_Linux_BSP.pdf"
which describes the behaviour.
After reading a page from NAND into the internal NFC's SRAM, the data layout
looks like:
SRAM Offset real NAND's Data
---------------- SRAM data area ---------------------
0
. [ 0 ... 511] 512 Byte page data
511
512
. [ 528 ... 1039] 512 Byte page data
1023
1024
. [1056 ... 1567] 512 Byte page data
1535
1536
. [1584 ... 2047] 464 Byte page data
1999
2000
. [ 0 ... 47] 48 Byte OOB data
2047
-------------- SRAM OOB area ----------------------------
2048 0x800
. [ 512 ... 527] 16 Byte page data
2063
2064 0x810
. [1040 ... 1055] 16 Byte page data
2079
2080 0x820
. [1568 ... 1583] 16 Byte page data
2095
2096 0x830
. [ 48 ... 63] 16 Byte OOB data
2112
> > Furthermore, what I can't guess is where that 0x7D0 comes from. I know
> > Jürgen described something related to the spare area being mixed with
> > the data (main) area but, is there any documentation about it we can
> > check?
See the table above: if you are interested in the byte at offset 0 in the
NAND's OOB area, you must read the byte at offset 2000 (= 0x7D0) in the SRAM
area instead.
Regards,
Juergen
--
Pengutronix e.K. | Juergen Beisert |
Linux Solutions for Science and Industry | Phone: +49-5121-206917-5128 |
Vertretung Sued/Muenchen, Germany | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de/ |
More information about the linux-mtd
mailing list