1、AT91SAM9260 linux 内核支持RTC
内核显示:
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
选中I 2C
<*> GPIO-based bitbanging I2C
选中RTC
[*] Set system time from RTC on startup and resume
(rtc0) RTC used to set the system time
<*> Philips PCF8563/Epson RTC8564
注: < > AT91SAM9x/AT91CAP9 为选中内部时钟
原因:I2C linux-2.6.28与linux-2.6.20内核版本有些地方不一致
解决:在arch/arm/mach-at91/board-sam9260ek.c里添加I2C设备地址,添加代码如下:
static struct i2c_board_info __initdata ek_i2c_devices[] = {
{
I2C_BOARD_INFO("24c512", 0x50),
.platform_data = &at24c512,
},
{
I2C_BOARD_INFO("pcf8563", 0x51),
},
};