s3c6410(arm11核)的nandflash移植
2013-03-12 19:05
302 查看
第一步,配置内核
<*>Memory Technology Device (MTD) support --->
[*] MTD partitioning support
<*> NAND Device Support --->
<*> NAND Flash support for Samsung S3C SoCs
<*> Support for generic platform NAND driver
第二步:配置资源,添加以下代码
(3)注册nandflah设备
1.在static void __init smdk6410_machine_init(void)函数中添加以下代码
s3c_nand_set_platdata(&s3c6410_nand_info);
2.添加平台设备
static struct platform_device*anw6410_devices[] __initdata = {
&s3c_device_fb,
&anw6410_lcd_powerdev,
&anw6410_device_eth,
//新添加
&s3c_device_nand,
};
<*>Memory Technology Device (MTD) support --->
[*] MTD partitioning support
<*> NAND Device Support --->
<*> NAND Flash support for Samsung S3C SoCs
<*> Support for generic platform NAND driver
第二步:配置资源,添加以下代码
(1)头文件 #include <linux/mtd/nand.h> #include <linux/mtd/partitions.h> #include <linux/mtd/physmap.h> #include <linux/mtd/partitions.h> #include <plat/nand.h> (2)配置信息 #define SZ_1K 0x00000400 #define SZ_1M 0x00100000 /* NAND flash controller */ #define S3C64XX_PA_NAND (0x70200000) #define S3C64XX_SZ_NAND SZ_1M struct mtd_partition s3c_partition_info[] ={ { .name = "Bootloader", .offset = 0, .size = (4 * 128 *SZ_1K), .mask_flags = MTD_CAP_NANDFLASH, }, { .name = "Kernel", .offset = (4 * 128 *SZ_1K), .size = (5*SZ_1M) , .mask_flags = MTD_CAP_NANDFLASH, }, { .name = "File System", .offset = MTDPART_OFS_APPEND, .size = MTDPART_SIZ_FULL, } }; static struct s3c2410_nand_sets3c6410_nand_sets[] = { [0]= { .name = "nand", .nr_chips = 1, .nr_partitions = ARRAY_SIZE(s3c_partition_info), .partitions = s3c_partition_info, }, }; static struct s3c2410_platform_nands3c6410_nand_info = { .tacls = 25, .twrph0 = 55, .twrph1 = 40, .nr_sets = ARRAY_SIZE(s3c6410_nand_sets), .sets = s3c6410_nand_sets, };
(3)注册nandflah设备
1.在static void __init smdk6410_machine_init(void)函数中添加以下代码
s3c_nand_set_platdata(&s3c6410_nand_info);
2.添加平台设备
static struct platform_device*anw6410_devices[] __initdata = {
&s3c_device_fb,
&anw6410_lcd_powerdev,
&anw6410_device_eth,
//新添加
&s3c_device_nand,
};
相关文章推荐
- S3C6410(arm11核)的DM9000移植
- 移植Opencv-2.0.0到ARM11(S3C6410)
- ARM11 S3C6410系列教程之四:NANDflash操作
- S3C6410(arm11核)的LCD移植
- 移植SDL运行库到ARM11(s3c6410)上
- X264编码器在wince上的移植(ARM11,S3C6410。平台配置是S3C6410_sdk)
- 基于S3C6410的ARM11 移植printf和scanf
- S3C6410移植u-boot-2010.3(3)正常化配置
- ENC28J60 SPI网卡移植 linux 2.6.28 SAMSUNG 6410 ARM11
- 快速移植Linux到S3C6410详解流程 Ubuntu12.04
- 移植Opencv-2.0.0到ARM11
- S3c6410 linux内核移植(1)---下载与配置
- ARM11、OK6410_Linux、系统移植 和 驱动加载
- arm11 s3c6410 开发板比较 哪个公司的arm11开发板好? arm11开发板推荐
- s3c6410移植3.3.7内核
- 【zz】ALSA在ARM(S3C6410)中的移植
- Nandflash 驱动移植 (一)
- 基于ARM11的嵌入式linux系统移植与实现--笔记四
- 移植linux内核到s3c6410(根文件系统加载失败问题解决:Kernel panic - not syncing: VFS: Unable to mount root fs)
- OpenCV-2.0.0移植到海思hi3520(ARM11)