Hi, All
My system is imx28evk + linux, The kernel can be boot through u-boot which is stored in nandflash. There are 4 partitions in nandflash as follows:
static struct mtd_partition __initdata ek_nand_partition[] = {
{
.name = "Bootstrap", /*1st partition = Boostrap + U-Boot + U-Boot Env */
.offset = 0,
.size = 12 * SZ_1M, /* size = 12MB*/
},
{
.name = "Kernel", /*2nd partition = Kernel(8MB )*/
.offset = 12 * SZ_1M,
.size = 8 * SZ_1M, /*size = 8MB */
},
{
.name = "Rootfs", /*3rd partition = RootFS(4MB cramfs) -> /dev/mtdblock2*/
.offset = 20 * SZ_1M,
.size = 8 * SZ_1M, /*size = 8MB */
},
{
.name = "UserNand", /*4th partition = User NandFlash(/dev/mtdblock3) -> /mnt/nandflash */
.offset = 28 * SZ_1M,
.size = MTDPART_SIZ_FULL, /*size = rest of nandfalsh chip => 248MB(2G08), 100MB(1G08)*/
},
};
static struct gpmi_nfc_platform_data gpmi_nfc_platform_data = {
.nfc_version = 1,
.boot_rom_version = 1,
.clock_name = "gpmi",
.platform_init = gpmi_nfc_platform_init,
.platform_exit = gpmi_nfc_platform_exit,
.min_prop_delay_in_ns = 5,
.max_prop_delay_in_ns = 9,
.max_chip_count = 2,
.boot_area_size_in_bytes = 0,
.partition_source_types = 0,
.partitions = ek_nand_partition,
.partition_count = 4,
};
a NFS rootfs is mounted OK, then mount nandflash of user partition with yaffs2:
~$ mount -t yaffs2 /dev/mtdblock3 /mnt/nandflash
It looks OK for mounting process. But as long as writing any data to /mnt/nandflash, the console got error message:
"**>> Block XXX needs retiring…..."
Tracing the code of yaffs2, the error is from the function yaffs_HandleWriteChunkError( ) with ObjectID mismatched. I'm not sure if the problem is incompatible of yaffs2 with gpmi_nfc driver, and what I should do to fix the problem.
It's highly appreciated for any comments for this question. Thanks!
BR
Cheng Shi
Emtronix