From mboxrd@z Thu Jan 1 00:00:00 1970 From: Timo Ketola Date: Fri, 13 Apr 2012 21:12:52 +0300 Subject: [U-Boot] [PATCH 4/9] imx: nand: Place BBT patterns into free OOB region In-Reply-To: <4F88600F.90507@freescale.com> References: <1334223234-23383-1-git-send-email-timo@exertus.fi> <1334316061-26019-1-git-send-email-timo@exertus.fi> <1334316061-26019-5-git-send-email-timo@exertus.fi> <4F88600F.90507@freescale.com> Message-ID: <4F886CA4.5000908@exertus.fi> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 13.04.2012 20:19, Scott Wood wrote: > On 04/13/2012 06:20 AM, Timo Ketola wrote: >> First two bytes of the first OOB of erase block are reserved for factory >> bad block marking, usually. >> >> Signed-off-by: Timo Ketola >> --- >> drivers/mtd/nand/mxc_nand.c | 35 +++++++++++++++++++++++++++++++++++ >> 1 files changed, 35 insertions(+), 0 deletions(-) > > So what happened before? The default is at offset 8, which doesn't > conflict with the bad block marker. It seems the actual issue is a > conflict with ECC? You seem to be right. I think I was badly confused with the kernel behaviour. > And NAND_USE_FLASH_BBT wasn't defined before, so a better subject line > for this patch would be "nand/mxc: support flash-based BBT". Most probably right too. > Won't veroffs = 6 conflict with ECC in the MXC_NFC_V1 case? Seems to. > What about 8-bit small page support, in which case the bad block marker > is at offset 5? What about putting into the block #if defined(MXC_NFC_V1) #ifndef CONFIG_SYS_NAND_LARGEPAGE defines for pattern and version offsets and use them in bbt_*_descr initializations? Or should they be in board configuration file? >> +#ifdef CONFIG_SYS_NAND_USE_FLASH_BBT >> + >> + this->options = NAND_USE_FLASH_BBT; >> + this->bbt_td =&bbt_main_descr; >> + this->bbt_md =&bbt_mirror_descr; >> + >> +#endif > > Please remove those blank lines inside the ifdef. Ok -- Timo