免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2749 | 回复: 1
打印 上一主题 下一主题

SD卡驱动移植时出现下面问题 [复制链接]

论坛徽章:
3
CU大牛徽章
日期:2013-03-14 14:14:08CU大牛徽章
日期:2013-03-14 14:14:26CU大牛徽章
日期:2013-03-14 14:14:29
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-05-04 23:53 |只看该作者 |倒序浏览
本帖最后由 liugang9931706 于 2010-05-04 23:55 编辑

照着mini2440说明移植SD卡驱动出现问题:
arch/arm/mach-s3c2440/mach-mini2440.c:87: error: implicit declaration of function 'S3C2410_GPG'
arch/arm/mach-s3c2440/mach-mini2440.c:87: error: initializer element is not constant
arch/arm/mach-s3c2440/mach-mini2440.c:87: error: (near initialization for 'mini2440_mmc_cfg.gpio_detect')
arch/arm/mach-s3c2440/mach-mini2440.c:88: error: implicit declaration of function 'S3C2410_GPH'
arch/arm/mach-s3c2440/mach-mini2440.c:88: error: initializer element is not constant
arch/arm/mach-s3c2440/mach-mini2440.c:88: error: (near initialization for 'mini2440_mmc_cfg.gpio_wprotect')
make[1]: *** [arch/arm/mach-s3c2440/mach-mini2440.o] 错误 1
make: *** [arch/arm/mach-s3c2440] 错误 2

出问题的部分代码:
/*MMC/SD  add by liugang*/
static struct s3c24xx_mci_pdata mini2440_mmc_cfg = {
   .gpio_detect   = S3C2410_GPG(8  ),    // S3C2410_GPG没有定义
   .gpio_wprotect = S3C2410_GPH(8  ),  //S3C2410_GPH没有定义
   .set_power     = NULL,
   .ocr_avail     = MMC_VDD_32_33|MMC_VDD_33_34,
};

不知S3C2410_GPG和S3C2410_GPH应该在哪里定义??如何定义??

论坛徽章:
0
2 [报告]
发表于 2010-05-05 16:32 |只看该作者
可以grep一下吧
没在2440上弄过,应该是有头文件没包含咯
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP