在线时间27 小时
UID2091976
注册时间2014-5-8
NXP金币0
该用户从未签到
注册会员

- 积分
- 124
- 最后登录
- 1970-1-1
|
本帖最后由 FSL_TICS_ZJJ 于 2014-12-19 09:40 编辑
板子是mx53_loco,内核版本是linux-2.6.35.3,spi-flash是m25p16
在board文件中加入
- static struct mtd_partition mxc_dataflash_partitions[] = {
- {
- .name = "u-boot",
- .offset = MTDPART_OFS_APPEND,
- .size = 1024 * 1024,
- },
- {
- .name = "user",
- .offset = MTDPART_OFS_APPEND,
- .size = MTDPART_SIZ_FULL,
- },
- };
- static struct flash_platform_data mxc_spi_flash_data = {
- .name = "m25p80",
- .parts = mxc_dataflash_partitions,
- .nr_parts = ARRAY_SIZE(mxc_dataflash_partitions),
- .type = "m25p16",
- };
- static struct spi_board_info mxc_dataflash_device[] __initdata = {
- {
- .modalias = "m25p16",
- .max_speed_hz = 4000000, /* max spi clock (SCK) speed in HZ */
- .bus_num = 2,
- .chip_select = 2,
- .platform_data = &mxc_spi_flash_data,
- }
- };
复制代码 可在mxc_m25p80.c的probe函数中platform_data的数据没有传递过去,导致分区加载数目一直是0.请问是我哪里有遗漏吗?另外在deveices目录下有两个文件 m25p80.c 和 mxc_m25p80.c,请问我该用哪个驱动?
|
|