[U-Boot] [PATCH v2 2/4] am33xx: add CONFIG_SYS_NAND_DEVICE_WIDTH to determine NAND device bus-width
Scott Wood
scottwood at freescale.com
Tue Oct 8 23:27:10 CEST 2013
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
More information about the U-Boot
mailing list