* Re: [1/1] mxc_nand : allow swapping the Bad block Indicator for NFC v1. [not found] <CACKLOr0zCCZ0WNpGiOOvoUk4s_vR5Ls4aw6PhXDoYeNQFTESgQ@mail.gmail.com> @ 2012-09-06 9:49 ` Gaëtan Carlier 2012-09-06 10:44 ` Juergen Beisert ` (2 more replies) 0 siblings, 3 replies; 6+ messages in thread From: Gaëtan Carlier @ 2012-09-06 9:49 UTC (permalink / raw) To: javier Martin; +Cc: Fabio Estevam, linux-mtd 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. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [1/1] mxc_nand : allow swapping the Bad block Indicator for NFC v1. 2012-09-06 9:49 ` [1/1] mxc_nand : allow swapping the Bad block Indicator for NFC v1 Gaëtan Carlier @ 2012-09-06 10:44 ` Juergen Beisert 2012-09-06 10:57 ` Juergen Beisert 2012-09-10 13:22 ` Juergen Beisert 2 siblings, 0 replies; 6+ messages in thread From: Juergen Beisert @ 2012-09-06 10:44 UTC (permalink / raw) To: linux-mtd; +Cc: Fabio Estevam, javier Martin, Gaëtan Carlier 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/ | ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [1/1] mxc_nand : allow swapping the Bad block Indicator for NFC v1. 2012-09-06 9:49 ` [1/1] mxc_nand : allow swapping the Bad block Indicator for NFC v1 Gaëtan Carlier 2012-09-06 10:44 ` Juergen Beisert @ 2012-09-06 10:57 ` Juergen Beisert 2012-09-06 11:07 ` Juergen Beisert 2012-09-10 13:22 ` Juergen Beisert 2 siblings, 1 reply; 6+ messages in thread From: Juergen Beisert @ 2012-09-06 10:57 UTC (permalink / raw) To: linux-mtd; +Cc: Fabio Estevam, javier Martin, Gaëtan Carlier Gaëtan Carlier wrote: > [...] > > 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? Maybe this image could help to understand: http://imagebin.org/227389 jbe -- Pengutronix e.K. | Juergen Beisert | Linux Solutions for Science and Industry | http://www.pengutronix.de/ | ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [1/1] mxc_nand : allow swapping the Bad block Indicator for NFC v1. 2012-09-06 10:57 ` Juergen Beisert @ 2012-09-06 11:07 ` Juergen Beisert 2012-09-06 11:31 ` javier Martin 0 siblings, 1 reply; 6+ messages in thread From: Juergen Beisert @ 2012-09-06 11:07 UTC (permalink / raw) To: linux-mtd; +Cc: Fabio Estevam, javier Martin, Gaëtan Carlier Juergen Beisert wrote: > Gaëtan Carlier wrote: > > [...] > > > > > 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? > > Maybe this image could help to understand: > > http://imagebin.org/227389 Ups, just recognized the green line points to the wrong page offset. Sorry. But the rest should show the real behaviour of these NFCs. jbe -- Pengutronix e.K. | Juergen Beisert | Linux Solutions for Science and Industry | http://www.pengutronix.de/ | ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [1/1] mxc_nand : allow swapping the Bad block Indicator for NFC v1. 2012-09-06 11:07 ` Juergen Beisert @ 2012-09-06 11:31 ` javier Martin 0 siblings, 0 replies; 6+ messages in thread From: javier Martin @ 2012-09-06 11:31 UTC (permalink / raw) To: Juergen Beisert; +Cc: Fabio Estevam, linux-mtd, Gaëtan Carlier Hi Juergen, On 6 September 2012 13:07, Juergen Beisert <jbe@pengutronix.de> wrote: > Juergen Beisert wrote: >> Gaëtan Carlier wrote: >> > [...] >> > >> > > 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? >> >> Maybe this image could help to understand: >> >> http://imagebin.org/227389 > > Ups, just recognized the green line points to the wrong page offset. Sorry. > But the rest should show the real behaviour of these NFCs. > OK, that was very clarifying. I know understand where the offset comes from. Thank you very much. Regards. -- Javier Martin Vista Silicon S.L. CDTUC - FASE C - Oficina S-345 Avda de los Castros s/n 39005- Santander. Cantabria. Spain +34 942 25 32 60 www.vista-silicon.com ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [1/1] mxc_nand : allow swapping the Bad block Indicator for NFC v1. 2012-09-06 9:49 ` [1/1] mxc_nand : allow swapping the Bad block Indicator for NFC v1 Gaëtan Carlier 2012-09-06 10:44 ` Juergen Beisert 2012-09-06 10:57 ` Juergen Beisert @ 2012-09-10 13:22 ` Juergen Beisert 2 siblings, 0 replies; 6+ messages in thread From: Juergen Beisert @ 2012-09-10 13:22 UTC (permalink / raw) To: linux-mtd; +Cc: Fabio Estevam, javier Martin, Gaëtan Carlier Gaëtan, Gaëtan Carlier wrote: > Juergen Beisert have sent an email few minutes earlier about this patch. > I still have to read it. Did you read it? How should we proceed? The i.MX21/27/31 and i.MX25/35/51/53 have all the same issue (with minor differences between both groups). 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/ | ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-09-10 13:23 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CACKLOr0zCCZ0WNpGiOOvoUk4s_vR5Ls4aw6PhXDoYeNQFTESgQ@mail.gmail.com>
2012-09-06 9:49 ` [1/1] mxc_nand : allow swapping the Bad block Indicator for NFC v1 Gaëtan Carlier
2012-09-06 10:44 ` Juergen Beisert
2012-09-06 10:57 ` Juergen Beisert
2012-09-06 11:07 ` Juergen Beisert
2012-09-06 11:31 ` javier Martin
2012-09-10 13:22 ` Juergen Beisert
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).