Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions libsel4platsupport/src/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ int sel4platsupport_init_default_timer_ops(vka_t *vka, UNUSED vspace_t *vspace,
return EINVAL;
}

#ifndef CONFIG_LIB_PLAT_SUPPORT_NO_PLATFORM_LTIMER
#ifdef CONFIG_LIB_PLAT_SUPPORT_HAVE_TIMER
error = ltimer_default_describe(&timer->ltimer, ops);

if (!error) {
Expand All @@ -165,7 +165,7 @@ int sel4platsupport_init_default_timer_ops(vka_t *vka, UNUSED vspace_t *vspace,
}
#else
error = ENOSYS;
#endif
#endif /* CONFIG_LIB_PLAT_SUPPORT_HAVE_TIMER */

return error;
}
Expand Down Expand Up @@ -214,15 +214,15 @@ int sel4platsupport_init_default_timer_caps(vka_t *vka, vspace_t *vspace, simple

/* Allocate timer irqs. */
ltimer_t ltimer;
#ifndef CONFIG_LIB_PLAT_SUPPORT_NO_PLATFORM_LTIMER
#ifdef CONFIG_LIB_PLAT_SUPPORT_HAVE_TIMER
error = ltimer_default_describe(&ltimer, ops);
if (error) {
ZF_LOGE("Failed to describe default timer");
return error;
}
#else
return ENOSYS;
#endif /* CONFIG_LIB_PLAT_SUPPORT_NO_PLATFORM_LTIMER */
#endif /* CONFIG_LIB_PLAT_SUPPORT_HAVE_TIMER */

/* set up the irq caps the timer needs */
size_t nirqs = get_nirqs(&ltimer);
Expand Down