Other Parts Discussed in Thread: DA8XX
Hi,
We want to use tow NADN chips on Omapl137 device,They
are selected by CS3 and CS4 on EMFIA,Now I can use one Nandflash chip
on CS3 with MTD. The chip can be found by uboot or Linux kernel,when
linux kernel starting ,the nandflash was created to 5 MTD partitions
on "nand_davinci.0" as below:
0x00000000-0x00020000 : "bootloader"
0x00020000-0x00040000 : "params"
0x00200000-0x00400000 : "kernel"
0x00400000-0x00800000 : "RamDisk"
0x00800000-0x04000000 : "yaffs2"
It's
ok. Now I want to use another chip which selected by CS4 for file system,2Gbits.But I don't
know how to use it,Is there any project to use linux MTD like this,or
omapl37 can't support two chips at the same time?
I tried to add a MTD device,some resouces as below:
static struct mtd_partition da8xx_evm_nand_partitions1[] = {
/* bootloader (U-Boot, etc) in first sector */
[0] = {
.name = "jffs",
.offset = 0,
.size = MTDPART_SIZ_FULL,
.mask_flags = 0,
},
};
static struct resource da8xx_evm_nand_resourcesid1[] = {
[0] = { /* First memory resource is AEMIF control registers */
.start = DA8XX_EMIF25_CONTROL_BASE,
.end = DA8XX_EMIF25_CONTROL_BASE + SZ_32K - 1,
.flags = IORESOURCE_MEM,
},
[1] = { /* Second memory resource is NAND I/O window */
.start = DA8XX_EMIF25_ASYNC_DATA_CE4_BASE,
.end = DA8XX_EMIF25_ASYNC_DATA_CE4_BASE + PAGE_SIZE - 1,
.flags = IORESOURCE_MEM,
},
};
static struct nand_davinci_platform_data da8xx_evm_nand_pdata1 = {
.options = 0,
/*.ecc_mode = NAND_ECC_HW_SYNDROME,*/
.ecc_mode = NAND_ECC_NONE,
/*.ecc_mode = NAND_ECC_SOFT,*/
.cle_mask = 0x10,
.ale_mask = 0x08,
.bbt_td = &da8xx_evm_nand_bbt_main_descr,
.bbt_md = &da8xx_evm_nand_bbt_mirror_descr,
.parts = da8xx_evm_nand_partitions1,
.nr_parts = ARRAY_SIZE(da8xx_evm_nand_partitions1),
};
static struct platform_device da8xx_evm_nand_deviceid1 = {
.name = "nand_davinci",
.id = 1,
.dev = {
.platform_data = &da8xx_evm_nand_pdata1,
},
.num_resources = ARRAY_SIZE(da8xx_evm_nand_resourcesid1),
.resource = da8xx_evm_nand_resourcesid1,
};
cross-compile linux kernel,and load,restart the board ,some information as below:
nand_davinci nand_davinci.1: cannot claim register memory region
nand_davinci: probe of nand_davinci.1 failed with error -5
I don't why ,Any thoughts/pitfalls would be appreciated.
thanks