[1/1] mxc_nand : allow swapping the Bad block Indicator for NFC v1.

Gaëtan Carlier gcembed at gmail.com
Thu Sep 6 05:49:35 EDT 2012


Hi Javier,
On 09/06/2012 11:14 AM, javier Martin wrote:
> Hi Gaëtan,
> has this behavior been documented by Freescale anywhere?
It is not documented but this value come from patch for RedBoot (eCos) 
provided by Freescale :
ecos_20050912.tar.gz + redboot_mx27pdk.zip (that includes 
patch-redboot-200840-base.bz2, patch-redboot-200840-mx27.bz2 and 
patch-redboot-200840-mx27pdk.bz2).
I don't have official document. I learned this bug at a training and 
they said : Check the box "BI SWAP" in Freescale Advanced Toolkit and 
that's it.
The sources of kernel 2.6.22 that gave us also have this bugfix in patch.
That is all that I know/have.
>
> I understand that the 0x835 offset is the offset meant for BI in the
> real spare area for 8 bit NANDs. However, this value is not correct
> for 16 bits. It should be 0x83A instead [1].
Have I to add a Test on the width of the bus of current NAND ?
>
> 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?
In the ecos patch, there is the patch
#define NAND_MAIN_BUF3                  (NFC_BASE + 0x600)
#define NAND_SPAR_BUF3                  (NFC_BASE + 0x830)
// read column 464-465 byte but only 464 for bad block marker^M
#define BAD_BLK_MARKER_464          (NAND_MAIN_BUF3 + 464)^M
// read column 4-5 byte, but only 5 is used for swapped main area data^M
#define BAD_BLK_MARKER_SP_5         (NAND_SPAR_BUF3 + 4)^M

>
> Regards.
>
> [1] page 704, Freescale, i.MX27 Reference Manual, Rev. 0.4, 06/2012.
> [2] http://lists.infradead.org/pipermail/linux-mtd/2011-July/036885.html
>
Juergen Beisert have sent an email few minutes earlier about this patch. 
I still have to read it.
Regards,
Gaëtan Carlier.



More information about the linux-mtd mailing list