Skip to contentSkip to conversation

Help with rtc to hpet conversion of OSGPS driver

DISCUSSION Rick Niles 2 participants 4 messages Oct 11, 2007

lore
Share & tools
lore

Rick Niles

author
#0 lore raw

I'm the Linux maintainer for the OSGPS (open source GPS) project. Our last release version was based off Fedora 5 and since we have had some hardware issues with our on board interrupt line I was using the RTC interrupt to service the tracking loops. I've been trying to make the driver work with Fedora 7 and the 2.6.22 kernel, but the rtc_register() and other RTC functions seems to have been removed. I see they've been replaced by the corresponding HPET functions, which is great. However, hpet_register() always returns -16 (EBUSY). This could be because I lack the correct hardware (I'm running 32-bit Linux on a Athlon64 with an NVIDIA chipset) or some other reason.

I'm looking for any help here. The RTC version of the code can be viewed at:
http://osgps.cvs.sourceforge.net/osgps/osgps/linuxmod.c?revision=1.12&view=markup

Can device drivers still use the real-time clock at all? Does the tickless kernel effect this at all?

Thanks for any help you can lend,
Rick Niles.

#1 lore raw
Quoted 4 lines · Rick Niles

I've been trying to make the driver work with
Fedora 7 and the 2.6.22 kernel, but the rtc_register() and other RTC functions seems to have been removed.

grep -r rtc_device_register drivers/rtc/

Does that help?

Quoted 4 lines

I see they've been replaced by the corresponding
HPET functions, which is great. However, hpet_register() always returns -16 (EBUSY). This could be because I lack the correct hardware (I'm running 32-bit Linux on a Athlon64 with an NVIDIA chipset) or some other reason.

author
#2 lore raw

Maybe I'm way off here, but that seems to be the function to register a RTC hardware chip with the kernel. I want to use a real-time clock interrupt to wake up my driver and service the GPS correlator, about every 500ms. Please let me know if I'm misunderstanding.

Quoted 17 lines · Jan Engelhardt
Quoted 4 lines · Rick Niles

I've been trying to make the driver work with
Fedora 7 and the 2.6.22 kernel, but the rtc_register() and other RTC functions seems to have been removed.

grep -r rtc_device_register drivers/rtc/

Does that help?

Quoted 5 lines

I see they've been replaced by the corresponding
HPET functions, which is great. However, hpet_register() always returns -16 (EBUSY). This could be because I lack the correct hardware (I'm running 32-bit Linux on a Athlon64 with an NVIDIA chipset) or some other reason.

#3 lore raw
Quoted 5 lines · Rick Niles

Maybe I'm way off here, but that seems to be the function to register a RTC hardware chip with the kernel. I want to use a real-time clock interrupt to wake up my driver and service the GPS correlator, about every 500ms. Please let me know if I'm misunderstanding.

You register your hardware, and then the userspace program opens /dev/rtc17 or whatever node is assigned to it, and receives periodic interrupts. At least that's the theory for rtc-cmos.

And don't top post.