| 전자부품 데이터시트 검색엔진 |
|
UM0851 데이터시트(PDF) 146 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
UM0851 데이터시트(HTML) 146 Page - STMicroelectronics |
|
146 / 245 page ![]() Non-volatile memory device drivers UM0851 146/245 Doc ID 16604 Rev 2 5.3.3 Serial NOR device driver overview MTD overview The MTD is common to both NAND and NOR Flash, an overview is given in MTD overview. NOR device driver interface to MTD The NOR device driver allocates and fills the structure struct mtd_info, so that the MTD layer obtains information about the hardware. The code snippet shows some of the important data sent to MTD. struct mtd_info mtd; mtd.name = "SMI-NOR"; /*Name for the NOR device*/ mtd.type = MTD_NORFLASH; /*Type of MTD device*/ mtd.writesize = 1; mtd.flags = MTD_CAP_NORFLASH; mtd.size = sflash_ids [nor_chip].size_in_bytes; mtd.erasesize = sflash_ids [nor_chip].sectorsize; mtd.erase = spear_snor_erase; mtd.read = spear_snor_read; mtd.write = spear_snor_write; Read, Write and Erase operations on serial NOR Flash are simple and are controlled using the SMI. The SMI clock is enabled just before starting any of these operations and disabled just after completion. The NOR Flash device driver populates the struct mtd_info to MTD layer by calling these routines. … err = add_mtd_partitions( &mtd, mtd_partition_table, total_num_of_mtd_partitions ); } else { err = add_mtd_device( &mtd ); } Standard serial NOR partitioning Partitioning can be done by two ways: static or dynamic.To divide the device into static partitions, define a partitioning scheme in the NOR driver like a table (drivers/mtd/devices/spr_nor_st.h). #define NUM_PARTITIONS 4 static struct mtd_partition stwsf_par_info_primary[] = { { name: "XLoader", offset: 0x00000000, size: 0x00010000, }, { name: "UBoot", offset: 0x00010000, size: 0x00040000, }, { name: "Kernel", offset: 0x0050000, size: 0x002c0000, }, { name: "Root File system", offset: 0x00310000, size :0x004F0000, } }; |
|
링크 URL |
| ALLDATASHEET 가 귀하에 도움이 되셨나요? [ DONATE ] |
Alldatasheet는? | 광고문의 | 운영자에게 연락하기 | 개인정보취급방침 | 링크 투 데이터시트 | 링크교환 | 제조사별 검색 All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |