天嵌 ARM开发社区

 找回密码
 注册
查看: 1315|回复: 1

tq2440_machine_init板级初始化函数

[复制链接]
xmayyang 发表于 2013-10-10 10:25:45 | 显示全部楼层 |阅读模式
static void __init tq2440_machine_init(void)
{
        s3c24xx_fb_set_platdata(&tq2440_fb_info);
        s3c_i2c0_set_platdata(NULL);

        platform_add_devices(tq2440_devices, ARRAY_SIZE(tq2440_devices));
        EmbedSky_machine_init();
        s3c2410_gpio_setpin(S3C2410_GPG12, 0);
        s3c2410_gpio_cfgpin(S3C2410_GPG12, S3C2410_GPIO_OUTPUT);
        s3c24xx_udc_set_platdata(&EmbedSky_udc_cfg);
}
问题1:
platform_add_devices(tq2440_devices, ARRAY_SIZE(tq2440_devices));   是注册一系列的设备,包括usb lcd wdt i2c等等,
EmbedSky_machine_init();则是注册nand和sdi。
为什么要分开注册,把nand和sdi统一加到tq2440_devices这个数组中一起注册不行吗?

问题2:
s3c2410_gpio_setpin(S3C2410_GPG12, 0);
s3c2410_gpio_cfgpin(S3C2410_GPG12, S3C2410_GPIO_OUTPUT);
设置GPG12有什么作用?
谢谢


TQ-ZQL 发表于 2013-10-10 11:58:20 | 显示全部楼层
1.可以,只是方便我们自己管理。
2.看下原理图就知道了,usb检测用的
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

关闭

i.MX8系列ARM cortex A53 M4 工控板上一条 /1 下一条

Archiver|手机版|小黑屋|天嵌 嵌入式开发社区 ( 粤ICP备11094220号-2 )

GMT+8, 2025-5-6 09:15 , Processed in 2.068863 second(s), 20 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表