[U-Boot] [PATCH] mxc_nand: add nand driver for MX2/MX3

Scott Wood scottwood at freescale.com
Mon Aug 3 18:58:43 CEST 2009


On Mon, Aug 03, 2009 at 06:01:03AM +0400, Ilya Yanok wrote:
> >> +		return;
> >> +	}
> >> +
> >> +	if (chip == -1) {
> >> +		writew(readw(&host->regs->nfc_config1) & ~NFC_CE,
> >> +				&host->regs->nfc_config1);
> >> +		return;
> >> +	}
> >> +
> >> +	writew(readw(&host->regs->nfc_config1) | NFC_CE,
> >> +			&host->regs->nfc_config1);
> >> +#endif
> >>     
> >
> > #else?
> >   
> 
> For me it just works (I've never defined CONFIG_MTD_NAND_MXC_FORCE_CE).

If you've never defined it, how do you know it "just works"? :-)

Under what circumstances would one define it?  Should we take it out, to be
added later by someone who can test it, and understands it better?

> >> +		if (column >= mtd->writesize) {
> >> +			/*
> >> +			 * before sending SEQIN command for partial write,
> >> +			 * we need read one page out. FSL NFC does not support
> >> +			 * partial write. It alway send out 512+ecc+512+ecc ...
> >> +			 * for large page nand flash. But for small page nand
> >> +			 * flash, it does support SPARE ONLY operation.
> >> +			 */
> >> +			if (host->pagesize_2k) {
> >> +				/* call ourself to read a page */
> >> +				mxc_nand_command(mtd, NAND_CMD_READ0, 0,
> >> +						page_addr);
> >> +			}
> >>     
> >
> > #ifdef CONFIG_MXC_NAND_HWECC?
> >   
> 
> Uh... I have to admit I don't really have clear understanding of this
> problem and I can't find it's description in i.MX27 Reference Manual...
> Maybe you can point me in some direction? For now I'm not sure if
> putting this under #ifdef won't break something...

It was my understanding that the whole reason for using soft ecc on this
controller was to avoid the weird OOB layout.  If you're only testing with
hard ecc, though, then I'd leave it as is -- I don't want to make untested
changes.

-Scott


More information about the U-Boot mailing list