[U-Boot] [PATCH v7 02/19] nand: mxc: Add support for i.MX5

Fabio Estevam festevam at gmail.com
Tue Feb 26 17:35:28 CET 2013


On Tue, Feb 26, 2013 at 1:08 PM, Benoît Thébaudeau
<benoit.thebaudeau at advansee.com> wrote:

> This boot pin / fuse config has been used by this driver for all i.MX platforms
> from the beginning. I don't think that we really need one more software config
> here. This is hardware stuff, and the i.MX provides a dedicated hardware
> configuration for it, so I think that we should use it, even if it's made for
> NAND boot, since it's just describing the present hardware, just like DT would.
>
> In the particular case of the mx53ard, there is a DIP switch that you can use to
> fix this config to 8-bit NAND Flash. But if you have blown the fuses to override
> the boot pin config, then of course we're doomed because a wrong NAND Flash
> config has been blow.

The boot config jumpers are correctly set to boot from MMC card and
this is what I am using as the boot media.

Why should we decide the NAND width via boot pins if I am not booting
from NAND at all?

I see that current mxc nand drivers are doing like this, but I don't
think this makes sense if we use NAND and does not boot from it.

I agree with this comment from tt01.h:

"/*
 * it's not 16 bit:
 * #define CONFIG_SYS_NAND_BUSWIDTH_16BIT
 *    the current u-boot mxc_nand.c tries to auto-detect, but this only
 *    reads the boot settings during reset (which might be wrong)
 */"

and we can also see the a workaround at board/davedenx/qong/qong.c in
order to tell the nand bus width is 8 bits:

void qong_nand_plat_init(void *chip)
{
	struct nand_chip *nand = (struct nand_chip *)chip;
	nand->chip_delay = 20;
	nand->select_chip = qong_nand_select_chip;
	nand->options &= ~NAND_BUSWIDTH_16;
	board_nand_setup();
}


More information about the U-Boot mailing list