Skip to content
Snippets Groups Projects
Commit 59f5717f authored by Stephen Sherratt's avatar Stephen Sherratt
Browse files

Fix: In exynos timer driver, declaring comparator_value variable at top of...

Fix: In exynos timer driver, declaring comparator_value variable at top of initTimer to comply with C90.
parent 078b961e
No related branches found
No related tags found
No related merge requests found
......@@ -184,6 +184,8 @@ resetTimer(void)
BOOT_CODE void
initTimer(void)
{
uint64_t comparator_value;
/* Clear write status */
mct->global.wstat = mct->global.wstat;
mct->global.cnt_wstat = mct->global.cnt_wstat;
......@@ -191,8 +193,7 @@ initTimer(void)
/* Configure the comparator */
mct->global.comp0_add_inc = TIMER_TICKS;
const uint64_t comparator_value =
((((uint64_t) mct->global.cnth) << 32) | mct->global.cntl) + TIMER_TICKS;
comparator_value = ((((uint64_t) mct->global.cnth) << 32) | mct->global.cntl) + TIMER_TICKS;
mct->global.comp0h = (uint32_t)(comparator_value >> 32);
mct->global.comp0l = (uint32_t)comparator_value;
/* Enable interrupts */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment