Question about flash_info utility

H Hartley Sweeten hartleys at visionengravers.com
Wed May 12 19:13:45 EDT 2010


Hello all,

I'm trying to finalize my flash on a new product and have a
question about the mtd utilities, specifically the 'flash_info'
utility.

When my system boots I get this as part of the boot messages:

physmap platform flash device: 04000000 at 60000000
physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank
physmap-flash.0: Found an alias at 0x2000000 for the chip at 0x0
 Intel/Sharp Extended Query Table at 0x010A
 Intel/Sharp Extended Query Table at 0x010A
 Intel/Sharp Extended Query Table at 0x010A
 Intel/Sharp Extended Query Table at 0x010A
 Intel/Sharp Extended Query Table at 0x010A
Using buffer write method
Using auto-unlock on power-up/resume
cfi_cmdset_0001: Erase suspend on write enabled
erase region 0: offset=0x0,size=0x20000,blocks=255
erase region 1: offset=0x1fe0000,size=0x8000,blocks=4
cmdlinepart partition parsing not available
Searching for RedBoot partition table in physmap-flash.0 at offset 0x1fe0000
4 RedBoot partitions found on MTD device physmap-flash.0
Creating 4 MTD partitions on "physmap-flash.0":
0x000000000000-0x000000040000 : "RedBoot"
0x000000040000-0x000001fe0000 : "unallocated"
0x000001fe0000-0x000001ff8000 : "FIS directory"
0x000001ff8000-0x000002000000 : "RedBoot config"

And /proc/mtd shows:

/ # cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00040000 00020000 "RedBoot"
mtd1: 01fa0000 00020000 "unallocated"
mtd2: 00018000 00008000 "FIS directory"
mtd3: 00008000 00008000 "RedBoot config"

But when I run the 'flash_info' utility on mtd[0-3] I get:

/ # flash_info /dev/mtd0
Device /dev/mtd0 has 0 erase regions
/ # flash_info /dev/mtd1
Device /dev/mtd1 has 0 erase regions
/ # flash_info /dev/mtd2
Device /dev/mtd2 has 0 erase regions
/ # flash_info /dev/mtd3
Device /dev/mtd3 has 0 erase regions

Based on the erasesize they should be 2, 253, 3, and 1.

The 'mtd_debug' utility does appear to show the correct
information:

/ # mtd_debug info /dev/mtd0
mtd.type = MTD_NORFLASH
mtd.flags = MTD_WRITEABLE | MTD_BIT_WRITEABLE | MTD_STUPID_LOCK
mtd.size = 262144 (256K)
mtd.erasesize = 131072 (128K)
mtd.writesize = 1
mtd.oobsize = 0
regions = 0

/ # mtd_debug info /dev/mtd1
mtd.type = MTD_NORFLASH
mtd.flags = MTD_WRITEABLE | MTD_BIT_WRITEABLE | MTD_STUPID_LOCK
mtd.size = 33161216 (31M)
mtd.erasesize = 131072 (128K)
mtd.writesize = 1
mtd.oobsize = 0
regions = 0

/ # mtd_debug info /dev/mtd2
mtd.type = MTD_NORFLASH
mtd.flags = MTD_WRITEABLE | MTD_BIT_WRITEABLE | MTD_STUPID_LOCK
mtd.size = 98304 (96K)
mtd.erasesize = 32768 (32K)
mtd.writesize = 1
mtd.oobsize = 0
regions = 0

/ # mtd_debug info /dev/mtd3
mtd.type = MTD_NORFLASH
mtd.flags = MTD_WRITEABLE | MTD_BIT_WRITEABLE | MTD_STUPID_LOCK
mtd.size = 32768 (32K)
mtd.erasesize = 32768 (32K)
mtd.writesize = 1
mtd.oobsize = 0
regions = 0

Any ideas what's wrong?

Regards,
Hartley


More information about the linux-mtd mailing list