From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Date: Wed, 17 Feb 2010 13:10:48 -0600 Subject: [U-Boot] [PATCH] add explicit bbt creation to commandline In-Reply-To: <27625639.post@talk.nabble.com> References: <20080706080456.GF4167@prithivi.gnumonks.org> <27558231.post@talk.nabble.com> <20100212170411.GA21800@loki.buserror.net> <27566937.post@talk.nabble.com> <4B759454.8070906@freescale.com> <27567768.post@talk.nabble.com> <4B75A3BA.8000501@freescale.com> <27568153.post@talk.nabble.com> <27568365.post@talk.nabble.com> <4B75C6C0.8020706@freescale.com> <27571823.post@talk.nabble.com> <20100216183514.GA26893@loki.buserror.net> <27625639.post@talk.nabble.com> Message-ID: <4B7C3F38.2030707@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 Steven Zedeck wrote: > Scott Wood-2 wrote: >> On Fri, Feb 12, 2010 at 06:14:51PM -0800, Steven Zedeck wrote: >>> int board_nand_init(struct nand_chip *nand) >>> { >>> nand->ecc.mode = NAND_ECC_SOFT; >>> #ifdef CFG_NAND_DBW_16 >>> nand->options = NAND_BUSWIDTH_16; >>> #endif >>> nand->cmd_ctrl = at91sam9rlek_nand_hwcontrol; >>> nand->dev_ready = at91sam9rlek_nand_ready; >>> nand->chip_delay = 20; >>> >>> return 0; >>> } >> Add "nand->options |= NAND_USE_FLASH_BBT;". [snip] > I really appreciate your help. I added what you suggested, except since we > are using an 8 bit wide bus and not 16 I had to do the following: > > #ifdef CFG_NAND_DBW_8 > nand->options |= NAND_USE_FLASH_BBT; > #endif I don't see why the ifdef is needed -- just don't put it inside (or before) the other ifdef. > Now when my board boots I get this and then it just stops: > NAND: Entering nand_init > Nand Base 0x40000000 > Bad block table not found for chip 0 > Bad block table not found for chip 0 The messages are expected on the first boot -- but it should then create the bad block table. You'll have to debug to find out why it's hanging. If you don't set NAND_USE_FLASH_BBT, does ordinary nand read/write from the u-boot prompt work? -Scott