Page 1 of 1

nand flash setup problem

Posted: Tue Mar 29, 2005 7:06 pm
by Edwin
Hi everyone,

I have been searching for ways to setup the nand flash on my at91rm9200 in uboot and linux for days with no success. I got up to a point where uboot 1.1.2 and kernel 2.4.27 recognized the smartmedia card as Toshiba card. But how do I read/write/erase the card (like what command and kernel setting)? I tried

# cp /tmp/bin.img mtd/2
MTD_open
MTD_write
nand_write_ecc: to = 0x00000000, len = 8192
nand_write_page: Failed write verify, page 0x00000000 cp: Write <6>MTD_close
Enand_sync: called
rror: Input/output error

It seems like I can't peform any action on it. I attached the partial .config. I have yes for the following setting


CONFIG_MTD
CONFIG_MTD_DEBUG
CONFIG_MTD_CHAR
CONFIG_MTD_BLOCK
CONFIG_MTD_NAND
CONFIG_MTD_NAND_VERIFY_WRITE
SmartMedia Card on Atmel AT91RM9200

The rest is irrelerent I think and I say no. The following is the boot msg

physmap flash device: 200000 at 10000000
CFI: Found no Physically mapped flash device at location zero
Search for id:(1f c0) interleave(1) type(2)
Found: Atmel AT49BV16X
Physically mapped flash: Found 1 x16 devices at 0x0 in 16-bit mode
number of JEDEC chips: 1
mtd: Giving out device 0 to Physically mapped flash
at91_dataflash: Atmel AT45DB642 detected [spi0] (8650752 bytes)
mtd: Giving out device 1 to Atmel AT45DB642
at91_dataflash: Unknown device (0)
SmartMedia card inserted.
NAND device: Manufacture ID: 0x98, Chip ID: 0x79 (Toshiba NAND 128MB 3,3V)
mtd: Giving out device 2 to NAND 128MB 3,3V

What have I done wrong? btw, can't read/write/erase in uboot either, I attached the uboot config

Edwin lau