(part of) a patch by Dustin Howett (GSOC) which implements HPET timers. I'm committing this work split in small patches, since HPET timers aren't working correctly yet, and I won't commit the parts which don't work.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27127 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini
2008-08-22 07:57:50 +00:00
parent e51479d912
commit 521a945c90
+9 -5
View File
@@ -37,9 +37,9 @@ extern timer_info gAPICTimer;
extern timer_info gHPETTimer;
static timer_info *sTimers[] = {
&gPITTimer,
// &gHPETTimer,
&gAPICTimer,
&gHPETTimer,
&gPITTimer,
NULL
};
@@ -70,14 +70,18 @@ arch_init_timer(kernel_args *args)
cpu_status state = disable_interrupts();
for (i = 0; (timer = sTimers[i]) != NULL; i++) {
int priority;
int priority = timer->get_priority();
if (priority < bestPriority) {
TRACE(("arch_init_timer: Skipping %s because there is a higher priority timer (%s) initialized.\n", timer->name, sTimer->name));
continue;
}
if (timer->init(args) != B_OK) {
TRACE(("arch_init_timer: %s failed init. Skipping.\n", timer->name));
continue;
}
priority = timer->get_priority();
if (priority > bestPriority) {
bestPriority = priority;
sTimer = timer;