From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Date: Fri, 13 Apr 2012 13:17:08 -0500 Subject: [U-Boot] [PATCH 4/9] imx: nand: Place BBT patterns into free OOB region In-Reply-To: <4F886CA4.5000908@exertus.fi> 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> <4F886CA4.5000908@exertus.fi> Message-ID: <4F886DA4.7030705@freescale.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 04/13/2012 01:12 PM, Timo Ketola wrote: > 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. It looks like Linux wants the BBT to be at offset zero. Is there any plan to fix that? The two really should match... >> 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? Sure. > Or should they be in board configuration file? I don't think it belongs in the board config file (unless there's existing behavior that has to be matched for compatibility on a specific board). -Scott