[Sound-open-firmware] [PATCH 1/2] xtensa: arch: fix 64bit timer.
Timer would miss overflow condition, now logic same as BYT 64 bit timer.
Signed-off-by: Liam Girdwood liam.r.girdwood@linux.intel.com --- src/arch/xtensa/timer.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/src/arch/xtensa/timer.c b/src/arch/xtensa/timer.c index ee01d083..1da503fd 100644 --- a/src/arch/xtensa/timer.c +++ b/src/arch/xtensa/timer.c @@ -80,7 +80,7 @@ void timer_64_handler(void *arg) }
/* get next timeout value */ - if (timer->hitimeout > 0 && timer->hitimeout == timer->hitime) { + if (timer->hitimeout == timer->hitime) { /* timeout is in this 32 bit period */ ccompare = timer->lowtimeout; } else { @@ -185,17 +185,13 @@ int arch_timer_set(struct timer *timer, uint64_t ticks) flags = arch_interrupt_global_disable();
/* same hi 64 bit context as ticks ? */ - if (hitimeout == timer->hitime) { - /* yes, then set the value for next timeout */ - time = ticks; - timer->lowtimeout = 0; - timer->hitimeout = 0; - } else if (hitimeout < timer->hitime) { + if (hitimeout < timer->hitime) { /* cant be in the past */ arch_interrupt_global_enable(flags); return -EINVAL; } else { /* set for checking at next timeout */ + time = ticks; timer->hitimeout = hitimeout; timer->lowtimeout = ticks; }
Fix it.
Signed-off-by: Liam Girdwood liam.r.girdwood@linux.intel.com --- src/ipc/intel-ipc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/ipc/intel-ipc.c b/src/ipc/intel-ipc.c index a9398229..fbe0b6ef 100644 --- a/src/ipc/intel-ipc.c +++ b/src/ipc/intel-ipc.c @@ -650,7 +650,8 @@ static int ipc_dma_trace_config(uint32_t header) struct sof_ipc_reply reply; int err;
- trace_ipc_error("DA1"); + trace_ipc("DA1"); + #ifdef CONFIG_HOST_PTABLE
list_init(&elem_list);
participants (1)
-
Liam Girdwood