mtd newbie & mtdblock write

Eli Carter eli.carter at inet.com
Wed Jun 11 14:35:26 EDT 2003


All,

I'm trying to use mdtblock on an AMD (CFI) flash chip.
I can read the data from the chip and I can mount a filesystem residing 
on the chip, so that much works.

But write and erase don't work.

When I try to write 0's to part of the chip, I get this message in 
/var/log/messages:
"Last[2] is ff, datum is 0 "
The command used is:
%dd if=/dev/zero of=/dev/mtdblock1 seek=4096 count=1
dd: /dev/mtdblock1: Invalid argument
1+0 records in
1+0 records out
%
(Done as root)

I'm using 2.5.68-rmk1 (+modifications).

I have specified 2 partitions, the first at offset 0, size 0x170000, and 
the second at offset 0x170000, size 8MB-0x170000.  The first partition 
has mask_flags set to MTD_WRITABLE (making it read-only, correct?), but 
the second partition does not.

Am I doing something obviously wrong?  Is there a good starting point 
for figuring out what has gone awry?

TIA,

Eli

PS
My kernel config is has
# Memory Technology Devices (MTD)
CONFIG_MTD=y
# CONFIG_MTD_DEBUG is not set
CONFIG_MTD_PARTITIONS=y
# CONFIG_MTD_CONCAT is not set
CONFIG_MTD_REDBOOT_PARTS=y
# CONFIG_MTD_CMDLINE_PARTS is not set
# CONFIG_MTD_AFS_PARTS is not set
CONFIG_MTD_CHAR=y
CONFIG_MTD_BLOCK=y
CONFIG_MTD_CFI=y
# CONFIG_MTD_JEDECPROBE is not set
CONFIG_MTD_GEN_PROBE=y
# CONFIG_MTD_CFI_ADV_OPTIONS is not set
CONFIG_MTD_CFI_INTELEXT=y
CONFIG_MTD_CFI_AMDSTD=y
# CONFIG_MTD_RAM is not set
# CONFIG_MTD_ROM is not set
# CONFIG_MTD_ABSENT is not set
# CONFIG_MTD_OBSOLETE_CHIPS is not set
# CONFIG_MTD_PHYSMAP is not set
# CONFIG_MTD_NORA is not set
# CONFIG_MTD_ARM_INTEGRATOR is not set
CONFIG_MTD_IQ80321=y
# CONFIG_MTD_EDB7312 is not set
# CONFIG_MTD_PCI is not set
# CONFIG_MTD_UCLINUX is not set
# Self-contained MTD device drivers
# CONFIG_MTD_PMC551 is not set
# CONFIG_MTD_SLRAM is not set
# CONFIG_MTD_MTDRAM is not set
# CONFIG_MTD_BLKMTD is not set
# CONFIG_MTD_DOC1000 is not set
# CONFIG_MTD_DOC2000 is not set
# CONFIG_MTD_DOC2001 is not set
# CONFIG_MTD_NAND is not set

-- 
--------------------. "If it ain't broke now,
Eli Carter           \                  it will be soon." -- crypto-gram
eli.carter(a)inet.com `-------------------------------------------------




More information about the linux-mtd mailing list