On Mon, 2013-09-30 at 23:52 +0530, Pekon Gupta wrote: > +#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_SYS_NAND_ONFI_DETECTION) > + /* device bus-width determined from ONFI params */ > + nand->options &= ~NAND_BUSWIDTH_16; > +#else > + /* device bus-width passed via CONFIG_xx */ > + if (CONFIG_SYS_NAND_DEVICE_WIDTH == 16) > + nand->options |= NAND_BUSWIDTH_16; > + else > + nand->options &= ~NAND_BUSWIDTH_16; > +#endif
BTW, CONFIG_SYS_NAND_ONFI_DETECTION is misnamed -- it should be CONFIG_NAND_ONFI_DETECTION and it should only indicate whether we're building ONFI support, rather than making an assertion about whether the device actually is ONFI. You could do what the Linux driver does, and retry as 16-bit if an 8-bit ident fails. -Scott _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot