реклама на сайте
подробности

 
 
> RTC на LPC 2478 - ошибка: structure has no member named `class_dev', uClinux
andybeg
сообщение Nov 13 2010, 08:24
Сообщение #1


Частый гость
**

Группа: Участник
Сообщений: 133
Регистрация: 30-11-06
Пользователь №: 22 954



пытаюсь включить поддержку RTC, делаю как прописано у EA
Цитата
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

Цитата


при компиляции получаю ошибку

Цитата
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 */
}


сталкивался кто с таким?

нашел определение функции , которой передаётся не существующий параметр структуры и вижу что должен передаваться указатель на структуру
Цитата
extern void rtc_update_irq(struct rtc_device *rtc,
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.


дальше мысль останавливается sad.gif

Сообщение отредактировал andybeg - Nov 13 2010, 14:50
Go to the top of the page
 
+Quote Post



Reply to this topicStart new topic
1 чел. читают эту тему (гостей: 1, скрытых пользователей: 0)
Пользователей: 0

 


RSS Текстовая версия Сейчас: 18th July 2025 - 00:48
Рейтинг@Mail.ru


Страница сгенерированна за 0.0135 секунд с 7
ELECTRONIX ©2004-2016