NAND flash mounting problem

J. Doo doodiexx at gmail.com
Wed Feb 28 10:17:18 EST 2007


> > # ./nanddump -l 512 -p /dev/mtd1
> > Block size 16384, page size 512, OOB size 16
> > Dumping data starting at 0x00000000 and ending at 0x00000200...
> > 0x00000000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> > <skipping.., all values are ff >
> > 0x000001f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
> >   OOB Data: ff ff ff ff ff ff ff ff 19 85 20 03 00 00 00 08
> >
> > The 1985 and 2003 parts seem to be wrong endian ??
>
> What are the expected values?

According to the second table in
http://www.linux-mtd.infradead.org/faq/nand.html#L_nand_bootloader
It should be 85 19 03 20 ...

> I suspect there may be something funny going on with the avr32 I/O
> accessors, although I don't know the mtd nand code well enough to know
> more specifically what the problem might be in this case...

I don't think it's because of avr32 i/o, because I have added some
printf's in flash_eraseall to see the buffer to be written to flash
and it's the same, i.e. wrong order.

So I just wanted to have people's opinion before digging the source code.

>
> Did you write the NAND setup code yourself? If so, could you send me a
> patch so that I know how things are set up?

I ported it based on the nand code for at91, it's very basic, just
handles the ALE and CLE lines and chip select...

I'll try to send you a patch later today.

>
> > The processor is big endian,
> > kernel version 2.6.18
>
> Did you apply the Atmel BSP patches or something else? AVR32 isn't
> supported in plain 2.6.18.

Using Atmel's BSP patches.

BR,
J.Doo




More information about the linux-mtd mailing list