Цитата
5.13.1 Configuration
Real Time Clock support is enabled at the following place in the configuration tree:
Device Drivers->Real Time Clock->RTC class
In the Embedded Artists configuration, support for setting the Linux system time from the
RTC source has also been enabled.
Device Drivers->Real Time Clock->Set system time from RTC on startup
In the configuration tree it is possible to select which RTC interface to use for user-domain
applications. All the three alternatives have been enabled in the Embedded Artists
configuration.
Device Drivers->Real Time Clock->sysfs
Device Drivers->Real Time Clock->proc
Device Drivers->Real Time Clock->dev
Finally the hardware support must also be enabled.
Device Drivers->Real Time Clock->NXP LPC2XXX RTC support
Real Time Clock support is enabled at the following place in the configuration tree:
Device Drivers->Real Time Clock->RTC class
In the Embedded Artists configuration, support for setting the Linux system time from the
RTC source has also been enabled.
Device Drivers->Real Time Clock->Set system time from RTC on startup
In the configuration tree it is possible to select which RTC interface to use for user-domain
applications. All the three alternatives have been enabled in the Embedded Artists
configuration.
Device Drivers->Real Time Clock->sysfs
Device Drivers->Real Time Clock->proc
Device Drivers->Real Time Clock->dev
Finally the hardware support must also be enabled.
Device Drivers->Real Time Clock->NXP LPC2XXX RTC support
Цитата
при компиляции получаю ошибку
Цитата
drivers/rtc/rtc-lpc22xx.c: In function `lpc22xx_rtc_interrupt':
drivers/rtc/rtc-lpc22xx.c:278: ошибка: structure has no member named `class_dev'
static irqreturn_t lpc22xx_rtc_interrupt(int irq, void *dev_id)
{
struct platform_device *pdev = dev_id;
struct rtc_device *rtc = platform_get_drvdata(pdev);
unsigned long events = 0;
unsigned char ilr = REG_RTC_ILR & 0x07;
#ifdef CONFIG_RTC_DEBUG
printk(KERN_INFO "%s(%d) irl=%x\n", __FUNCTION__, ilr);
#endif
if (ilr) { /* this interrupt is shared! Is it ours? */
if (ilr & 0x01) { // RTCCIF counter increment interrupt
events |= (RTC_UF | RTC_IRQF);
}
if (ilr & 0x02) { // RTCALF alarm interrupt
events |= (RTC_AF | RTC_IRQF);
}
if (ilr & 0x04) { // RTCSF sub-second interrupt
events |= (RTC_PF | RTC_IRQF);
}
REG_RTC_ILR = ilr;
rtc_update_irq(&rtc->class_dev, 1, events);<<============= строка 278
#ifdef CONFIG_RTC_DEBUG
printk("%s(): num=%ld, events=0x%02lx\n", __FUNCTION__,
events >> 8, events & 0x000000FF);
#endif
return IRQ_HANDLED;
}
return IRQ_NONE; /* not handled */
}
drivers/rtc/rtc-lpc22xx.c:278: ошибка: structure has no member named `class_dev'
static irqreturn_t lpc22xx_rtc_interrupt(int irq, void *dev_id)
{
struct platform_device *pdev = dev_id;
struct rtc_device *rtc = platform_get_drvdata(pdev);
unsigned long events = 0;
unsigned char ilr = REG_RTC_ILR & 0x07;
#ifdef CONFIG_RTC_DEBUG
printk(KERN_INFO "%s(%d) irl=%x\n", __FUNCTION__, ilr);
#endif
if (ilr) { /* this interrupt is shared! Is it ours? */
if (ilr & 0x01) { // RTCCIF counter increment interrupt
events |= (RTC_UF | RTC_IRQF);
}
if (ilr & 0x02) { // RTCALF alarm interrupt
events |= (RTC_AF | RTC_IRQF);
}
if (ilr & 0x04) { // RTCSF sub-second interrupt
events |= (RTC_PF | RTC_IRQF);
}
REG_RTC_ILR = ilr;
rtc_update_irq(&rtc->class_dev, 1, events);<<============= строка 278
#ifdef CONFIG_RTC_DEBUG
printk("%s(): num=%ld, events=0x%02lx\n", __FUNCTION__,
events >> 8, events & 0x000000FF);
#endif
return IRQ_HANDLED;
}
return IRQ_NONE; /* not handled */
}
сталкивался кто с таким?
нашел определение функции , которой передаётся не существующий параметр структуры и вижу что должен передаваться указатель на структуру
Цитата
extern void rtc_update_irq(struct rtc_device *rtc,
unsigned long num, unsigned long events);
unsigned long num, unsigned long events);
убрав параметр `class_dev' на который ругался компилятор удачно прошёл процесс, убедился что RTC идёт, по старту линукс их понимаю считывает, но устройство /dev/rtc не создаётся, потому что
Цитата
/> hwclock --systohc --debug
hwclock 2.4c/util-linux-2.11a
hwclock: Open of /dev/rtc failed, errno=2: No such file or directory.
No usable clock interface found.
Cannot access the Hardware Clock via any known method.
hwclock 2.4c/util-linux-2.11a
hwclock: Open of /dev/rtc failed, errno=2: No such file or directory.
No usable clock interface found.
Cannot access the Hardware Clock via any known method.
дальше мысль останавливается
