[Sound-open-firmware] [PATCH] hsw: timer: HSW/BDW use DSP core timers and have no ext timer.

Liam Girdwood liam.r.girdwood at linux.intel.com
Mon Mar 12 13:08:54 CET 2018


HSW/BDW both use internal core DSP timers and dont have any external
timer.

Signed-off-by: Liam Girdwood <liam.r.girdwood at linux.intel.com>
---
 src/platform/haswell/timer.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/platform/haswell/timer.c b/src/platform/haswell/timer.c
index bb74330..464b332 100644
--- a/src/platform/haswell/timer.c
+++ b/src/platform/haswell/timer.c
@@ -37,24 +37,27 @@
 
 void platform_timer_start(struct timer *timer)
 {
+	arch_timer_enable(timer);
 }
 
 void platform_timer_stop(struct timer *timer)
 {
+	arch_timer_disable(timer);
 }
 
 int platform_timer_set(struct timer *timer, uint64_t ticks)
 {
-	return 0;
+	return arch_timer_set(timer, ticks);
 }
 
 void platform_timer_clear(struct timer *timer)
 {
+	arch_timer_clear(timer);
 }
 
 uint64_t platform_timer_get(struct timer *timer)
 {
-	return 0;
+	return arch_timer_get_system(timer);
 }
 
 /* get timestamp for host stream DMA position */
-- 
2.14.1



More information about the Sound-open-firmware mailing list