drivers: arcv2_timer0: bug fixes
* remove QEMU related definitions * fix the definition of TIMER 0 IRQ Signed-off-by: Wayne Ren <wei.ren@synopsys.com>
This commit is contained in:
parent
f477f564c1
commit
37b4d2cd06
1 changed files with 3 additions and 4 deletions
|
@ -31,8 +31,7 @@
|
||||||
#define MAX_TICKS ((COUNTER_MAX / CYC_PER_TICK) - 1)
|
#define MAX_TICKS ((COUNTER_MAX / CYC_PER_TICK) - 1)
|
||||||
#define MAX_CYCLES (MAX_TICKS * CYC_PER_TICK)
|
#define MAX_CYCLES (MAX_TICKS * CYC_PER_TICK)
|
||||||
|
|
||||||
#define TICKLESS (IS_ENABLED(CONFIG_TICKLESS_KERNEL) && \
|
#define TICKLESS (IS_ENABLED(CONFIG_TICKLESS_KERNEL))
|
||||||
!IS_ENABLED(CONFIG_QEMU_TICKLESS_WORKAROUND))
|
|
||||||
|
|
||||||
static struct k_spinlock lock;
|
static struct k_spinlock lock;
|
||||||
|
|
||||||
|
@ -193,7 +192,7 @@ void z_clock_set_timeout(s32_t ticks, bool idle)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(CONFIG_TICKLESS_KERNEL) && !defined(CONFIG_QEMU_TICKLESS_WORKAROUND)
|
#if defined(CONFIG_TICKLESS_KERNEL)
|
||||||
u32_t delay;
|
u32_t delay;
|
||||||
|
|
||||||
ticks = min(MAX_TICKS, max(ticks - 1, 0));
|
ticks = min(MAX_TICKS, max(ticks - 1, 0));
|
||||||
|
@ -263,5 +262,5 @@ void sys_clock_disable(void)
|
||||||
|
|
||||||
/* disable interrupt in the interrupt controller */
|
/* disable interrupt in the interrupt controller */
|
||||||
|
|
||||||
irq_disable(ARCV2_TIMER0_INT_LVL);
|
irq_disable(IRQ_TIMER0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue