6.由于linux2.6.34.2在s3c6410上的nand驱动支持不是很好,所以自己添加修改arch/arm/mach-s3c64xx/mach-smdk6410.c文件,添加Nand Flash的分区信息和Nand Flash的硬件信息。(蓝色字体为添加部分)
#pwd
#gedit mach-smdk6410.c //add here static struct mtd_partition s3c_partition_info[] = { [0] = { .name = "u-boot", .offset = 0, .size = 0x40000, .mask_flags = MTD_CAP_NANDFLASH, }, [1] = { .name = "Kernel", .offset = 0x200000, .size = 0x300000, .mask_flags = MTD_CAP_NANDFLASH, }, [2] = { .name = "Yaffs2", .offset = 0x500000, .size = MTDPART_SIZ_FULL, }};static struct s3c2410_nand_set s3c_nandset[]={ [0]= { .name ="s3c24xx-nand", .nr_chips= 1, .nr_partitions =ARRAY_SIZE(s3c_partition_info), .partitions =s3c_partition_info, }};static struct s3c2410_platform_nand s3c_platform={ .tacls =0, .twrph0 =30, .sets = &s3c_nandset, .nr_sets =ARRAY_SIZE(s3c_nandset),};//add here…static struct platform_device *smdk6410_devices[] __initdata = {#ifdef CONFIG_SMDK6410_SD_CH0 &s3c_device_hsmmc0,#endif#ifdef CONFIG_SMDK6410_SD_CH1 &s3c_device_hsmmc1,#endif &s3c_device_i2c0, &s3c_device_i2c1, &s3c_device_fb, &s3c_device_ohci, &s3c_device_usb_hsotg, &s3c64xx_device_iisv4, //add here &s3c_device_nand, //add here…}static void __init smdk6410_map_io(void){ u32 tmp; //add here s3c_device_nand.name = "s3c6410-nand"; //add here…}…static void __init smdk6410_machine_init(void){ u32 cs1; s3c_i2c0_set_platdata(NULL); s3c_i2c1_set_platdata(NULL); s3c_fb_set_platdata(&smdk6410_lcd_pdata); //add here s3c_nand_set_platdata(&s3c_platform);// //add here…}