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

Benoît Thébaudeau benoit.thebaudeau at advansee.com
Tue Feb 26 17:08:39 CET 2013


Hi Fabio,

On Tuesday, February 26, 2013 4:33:20 PM, Fabio Estevam wrote:
> Benoit,
> 
> On Fri, Feb 15, 2013 at 6:54 PM, Benoît Thébaudeau
> <benoit.thebaudeau at advansee.com> wrote:
> 
> > +#elif defined(CONFIG_MX51) || defined(CONFIG_MX53)
> > +static int is_16bit_nand(void)
> > +{
> > +       struct src *src = (struct src *)SRC_BASE_ADDR;
> > +
> > +       if (readl(&src->sbmr) & SRC_SBMR_NF16B)
> > +               return 1;
> > +       else
> > +               return 0;
> 
> This logic is not working on my tests with mx53ard and it results in:
> 
> NAND:  NAND device: Manufacturer ID: 0xec, Chip ID: 0xd5 (Samsung NAND 2GiB
> 3,3)
> NAND bus width 16 instead 8 bit
> No NAND device found!!!
> 0 MiB
> 
> I am using NAND, but not booting from it, so I don't think we should
> use SBMR register to decide the NAND bus width.
> 
> If we are not booting from NAND, shouldn't we use a CONFIG_ option in
> mx53ard.h to tell the NAND bus width?

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.

Best regards,
Benoît


More information about the U-Boot mailing list