Chinaunix首页 | 论坛 | 博客
  • 博客访问: 931218
  • 博文数量: 96
  • 博客积分: 10071
  • 博客等级: 上将
  • 技术积分: 1118
  • 用 户 组: 普通用户
  • 注册时间: 2007-09-20 17:54
文章分类

全部博文(96)

文章存档

2011年(3)

2010年(3)

2009年(29)

2008年(54)

2007年(7)

分类: LINUX

2008-07-04 22:00:02

2.6.24.3 smdk2440的rtc驱动测试

creator
sz111@126.com

2.6.24.3 内核已经有支援RTC,只要选择就可以在Device Driver –>Real Time Clock -> 选中s3c rtc就可以。
 主设备号应该是kernel动态分配的,我的板子上254,mknode一个/dev/rtc   
 同时加入s3c_device_rtc:
 static struct platform_device *smdk2440_devices[] __initdata = {
    &s3c_device_usb,
    &s3c_device_lcd,
    &s3c_device_wdt,
    &s3c_device_i2c,
    &s3c_device_iis,
    &s3c_device_sdi,   //creator added
    &s3c_device_rtc,  //add device。
};                                                                                                                                                                                                                                                                                                                                
                                                                                                                                                                  
可以通过date设定时间                                                                                                                                                                
假如配置系统时间为2008年8月9日,10:11分,能够这样配置                                                                                                                            
1>     date 080910112008                                                                                                                                                           
2>     hwclock –w    //写入了                                                                                                                                                             
                                                                                                                                                                            
反复执行hwclock ,看看是否时间在变化。  
阅读(1773) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~