[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



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? 

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 @xxxxxxx.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @xxxxxxx.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @xxxxxxx.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @xxxxxxx.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @xxxxxxx.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @xxxxxxx.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @xxxxxxx.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @xxxxxxx.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @xxxxxxx.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @xxxxxxx.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @xxxxxxx.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @xxxxxxx.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @xxxxxxx.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @xxxxxxx.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @xxxxxxx.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @xxxxxxx.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @xxxxxxx.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @xxxxxxx.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @xxxxxxx.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @xxxxxxx.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @xxxxxxx.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @xxxxxxx.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @xxxxxxx.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @xxxxxxx.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @xxxxxxx.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @xxxxxxx.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @xxxxxxx.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @xxxxxxx.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @xxxxxxx.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @xxxxxxx.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @xxxxxxx.TD_ioctl cmd=40084d02
Erasing 64 Kibyte @xxxxxxx.TD_ioctl cmd=40084d02
Erased 2048 Kibyte @xxxxxxx.
TD_close
/var> 

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


To unsubscribe from this list: send the line "unsubscribe jffs-dev" in
the body of a message to majordomo@xxxxxxx.com