(一)拷贝s3c2410_nand.c为s3c2440_nand.c
1、分析nand_init的过程
drivers/mtd/nand.c
nand_init
nand_init_chip
board_nand_init
设置nand_chip结构体, 提供底层的操作函数
nand_scan
nand_scan_ident
nand_set_defaults
chip->select_chip = nand_select_chip;
chip->cmdfunc = nand_command;
chip->read_byte = busw ? nand_read_byte16 : nand_read_byte;
nand_get_flash_type
chip->select_chip
chip->cmdfunc(mtd, NAND_CMD_RESET, -1, -1);
nand_command()
chip->cmd_ctrl
s3c24x0_hwcontrol
chip->cmdfunc(mtd, NAND_CMD_READID, 0x00, -1);
*maf_id = chip->read_byte(mtd);
*dev_id = chip->read_byte(mtd);
2、拷贝drivers/mtd/nand/s3c2410_nand.c 为 drivers/mtd/nand/s3c2440_nand.c
book@ubuntu:~/u-boot-2016.11$ cd drivers/mtd/nand/
book@ubuntu:~/u-boot-2016.11/drivers/mtd/nand$ cp s3c2410_nand.c s3c2440_nand.c
3、修改drivers/mtd/nand/Makefile
diff -urN u-boot-2016.11/drivers/mtd/nand/Makefile u-boot-2016.11_s