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:
Wayne Ren 2018-11-30 17:24:53 +08:00 committed by Anas Nashif
commit 37b4d2cd06

View file

@ -31,8 +31,7 @@
#define MAX_TICKS ((COUNTER_MAX / CYC_PER_TICK) - 1)
#define MAX_CYCLES (MAX_TICKS * CYC_PER_TICK)
#define TICKLESS (IS_ENABLED(CONFIG_TICKLESS_KERNEL) && \
!IS_ENABLED(CONFIG_QEMU_TICKLESS_WORKAROUND))
#define TICKLESS (IS_ENABLED(CONFIG_TICKLESS_KERNEL))
static struct k_spinlock lock;
@ -193,7 +192,7 @@ void z_clock_set_timeout(s32_t ticks, bool idle)
return;
}
#if defined(CONFIG_TICKLESS_KERNEL) && !defined(CONFIG_QEMU_TICKLESS_WORKAROUND)
#if defined(CONFIG_TICKLESS_KERNEL)
u32_t delay;
ticks = min(MAX_TICKS, max(ticks - 1, 0));
@ -263,5 +262,5 @@ void sys_clock_disable(void)
/* disable interrupt in the interrupt controller */
irq_disable(ARCV2_TIMER0_INT_LVL);
irq_disable(IRQ_TIMER0);
}