Can I use whole flash chip in one mtd partition with jffs2 filesystem?

Sam Fei jffs at samfei.8800.org
Wed Aug 13 20:30:55 EDT 2003


linux-mtd,您好!

	I have two flash chips, I want use second chip to store my application data, 
make it jffs2 filesytem. The chip has 2M bytes and the sectors is:
 16K(1) 8K(2) 32K(1) 64K (31)
I made mtd partion: 

static struct mtd_partition my_partitions[] = {
       {
               name: "user (2048K)",
               size: 0x200000,
               offset: 0x0
       }
}; 

When i erase /dev/mtd0, found :
the numEraseRegions is 0 

=================================
the debug information: 

MTD_open minor=0
MTD_open devnum=0
MTD_open numeraseregions=0
Erase Total 1 Units
MTD_ioctl cmd=80044d07
numeraseregions=0
MTD_ioctl cmd=801e4d01
PerformTing Flash Erase of length 65536 at offset 0x0
done
MTD_close
=================================== 

The /proc/mtd information is: 

/var> cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00200000 00010000 "user (2048K)" 


Is this correct?   Why the NumEraseRegions is zero?   I think it is 4.

The eraseall information: 

/var> eraseall /dev/mtd0
MTD_open minor=0
MTD_open devnum=0
MTD_open numeraseregions=0
MTD_ioctl cmd=801e4d01
Erasing 64 Kibyte @ 0 --M  0 % complete.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @ 1000M0 --  3 % complete.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @ 2000M0 --  6 % complete.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @ 3000M0 --  9 % complete.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @ 4000M0 -- 12 % complete.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @ 5000M0 -- 15 % complete.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @ 6000M0 -- 18 % complete.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @ 7000M0 -- 21 % complete.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @ 8000M0 -- 25 % complete.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @ 9000M0 -- 28 % complete.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @ a000M0 -- 31 % complete.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @ b000M0 -- 34 % complete.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @ c000M0 -- 37 % complete.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @ d000M0 -- 40 % complete.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @ e000M0 -- 43 % complete.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @ f000M0 -- 46 % complete.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @ 1000M00 -- 50 % complete.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @ 1100M00 -- 53 % complete.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @ 1200M00 -- 56 % complete.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @ 1300M00 -- 59 % complete.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @ 1400M00 -- 62 % complete.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @ 1500M00 -- 65 % complete.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @ 1600M00 -- 68 % complete.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @ 1700M00 -- 71 % complete.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @ 1800M00 -- 75 % complete.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @ 1900M00 -- 78 % complete.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @ 1a00M00 -- 81 % complete.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @ 1b00M00 -- 84 % complete.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @ 1c00M00 -- 87 % complete.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @ 1d00M00 -- 90 % complete.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @ 1e00M00 -- 93 % complete.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @ 1f00M00 -- 96 % complete.TD_ioctl cmd=40084d02
Erased 2048 Kibyte @ 0 -M- 100% complete.
TD_close
/var> 

df information:
/dev/mtdblock0            2048       324      1724  16% /var/data 


        致
礼!
 				
费海林
浙江浙大网新科技股份有限公司
地址:浙江杭州曙光路15号浙江世界贸易中心写字楼C座12层
电话:88270028 EXT 2222
手机:13957130355
E-mail:feihailin at insigma.com.cn

         2003-08-14





More information about the linux-mtd mailing list