目录
专有名词:.... 7
Linux MTD介绍:... 8
设备层和原始设备层的函数调用关系(红色部分需要我们实现):... 9
NOR型Flash芯片驱动与MTD原始设备... 10
NAND和NOR的比较... 11
源码分析... 14
头文件分析... 14
mtd.h. 14
MTD_CHAR_MAJOR. 14
MTD_BLOCK_MAJOR. 14
MAX_MTD_DEVICES. 14
mtd_info. 14
mtd_info.type的取值... 16
mtd_info.flags的取值... 16
mtd_info.ecctype的取值... 17
erase_info. 17
erase_info.state的取值... 17
mtd_notifier 17
get_mtd_device. 18
put_mtd_device. 19
partitions.h. 19
mtd_partition. 19
MTDPART_OFS_APPEND.. 20
MTDPART_SIZ_FULL. 20
map.h. 20
map_info. 20
mtd_chip_driver 21
gen_probe.h. 21
chip_probe. 22
cfi.h. 22
cfi_private. 22
cfi_private.cfi_mode的取值... 22
cfi_ident 23
cfi_ident.P_ID的取值... 23
flashchip.h. 24
flchip. 24
/drivers/mtd/子目录... 24
mtdcore.c. 25
mtd_table. 25
mtd_notifiers. 25
add_mtd_device. 25
del_mtd_device. 26
register_mtd_user 28
unregister_mtd_user 29
__get_mtd_device. 30
mtdpart.c. 31
mtd_partitions. 32
mtd_part 32
PART(x) 32
add_mtd_partitions. 32
del_mtd_partitions. 36
part_read. 37
part_write. 37
part_readv. 37
part_writev. 37
part_erase. 37
part_lock. 37
part_unlock. 37
part_sync. 37
part_suspend. 37
part_resume. 37
mtdblock.c. 38
notifier 38
mtdblk_dev. 38
mtdblks. 39
erase_callback. 39
erase_write. 39
write_cached_data. 41
do_cached_write. 42
do_cached_read. 45
mtdblock_open. 46
mtdblock_release. 49
handle_mtdblock_request 50
leaving. 52
mtdblock_thread. 52
mtdblock_ioctl 54
mtd_fops. 55
init_mtdblock. 55
cleanup_mtdblock. 57
mtdchar.c. 58
notifier 58
mtd_lseek. 58
mtd_open. 59
mtd_close. 61
MAX_KMALLOC_SIZE. 61
mtd_read. 62
mtd_write. 63
mtd_erase_callback. 65
mtd_ioctl 66
mtd_fops. 71
init_mtdchar 72
cleanup_mtdchar 73
/drivers/mtd/chips子目录... 74
chipreg.c. 74
chip_drvs_list 74
register_mtd_chip_driver 74
unregister_mtd_chip_driver 75
get_mtd_chip_driver 76
do_map_probe. 77
cfi_probe.c. 78
cfi_chipdrv. 78
cfi_probe_init 78
cfi_probe_exit 79
cfi_probe. 80
cfi_chip_probe. 80
cfi_probe_chip. 80
qry_present 81
cfi_chip_setup. 82
jedec_probe.c. 84
amd_flash_info. 84
jedec_table. 84
jedec_chipdrv. 85
jedec_probe_init 85
jedec_probe_exit 85
jedec_probe. 86
jedec_probe_chip. 87
jedec_probe_chip. 87
cfi_jedec_setup. 87
gen_probe.c. 88
mtd_do_chip_probe. 88
genprobe_ident_chips. 89
genprobe_new_chip. 90
check_cmd_set 91
cfi_cmdset_unkown. 92
cfi_cmdset_0002.c. 93
cfi_amdstd_chipdrv. 93
cfi_cmdset_0002. 93
cfi_amdstd_setup. 96
cfi_amdstd_erase_onesize. 99
do_erase_oneblock. 101
cfi_amdstd_read. 103
do_read_onechip. 105
cfi_amdstd_write. 106
do_write_oneword. 111
cfi_amdstd_sync. 113
cfi_amdstd_suspend. 113
cfi_amdstd_resume. 113
cfi_amdstd_destroy. 113
cfi_amdstd_erase_varsize. 113
cfi_amdstd_init 114
cfi_amdstd_exit 114
cfi_cmdset_0001.c. 115
/drivers/mtd/maps子目录... 115
your-flash.c. 115
WINDOW_ADDR. 115
WINDOW_SIZE. 115
BUSWIDTH. 115
mymtd. 116
your_read8. 116
your_read16. 117
your_read32. 117
your_copy_from.. 117
your_write8. 117
your_write16. 117
your_write32. 117
your_copy_to. 117
your_set_vpp. 117
your_partition. 118
NUM_PARTITIONS. 119
your_map. 119
init_yourflash. 119
cleanup_yourflash