From b1d24346961e9f80b24fb48074e170829712b31f Mon Sep 17 00:00:00 2001 From: Liam Girdwood Date: Tue, 28 Feb 2017 12:09:19 +0000 Subject: [PATCH] rmbox: use SSP 19.2M clock for trace Signed-off-by: Liam Girdwood --- rmbox/rmbox.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/rmbox/rmbox.c b/rmbox/rmbox.c index 2e0e118..d2247f7 100644 --- a/rmbox/rmbox.c +++ b/rmbox/rmbox.c @@ -88,11 +88,11 @@ static void usage(char *name) exit(0); } -static inline float to_usecs(uint32_t time) +static inline float clk_to_usecs(uint32_t time) { - /* trace timestamp uses CPU system clock at default 25MHz ticks */ + /* trace timestamp uses SSP system clock at default 19.2MHz ticks */ // TODO: support variable clock rates - return (float)time / 25.0; + return (float)time / 19.2; } static void show_trace(uint32_t val, uint32_t addr, uint32_t *timestamp) @@ -103,8 +103,8 @@ static void show_trace(uint32_t val, uint32_t addr, uint32_t *timestamp) /* timestamp or value ? */ if ((addr % 8) == 0) { printf("trace.io: timestamp 0x%8.8x (%2.2f us) \tdelta 0x%8.8x (%2.2f us)\t", - (uint32_t)val, to_usecs(val), - (uint32_t)val - *timestamp, to_usecs(val - *timestamp)); + (uint32_t)val, clk_to_usecs(val), + (uint32_t)val - *timestamp, clk_to_usecs(val - *timestamp)); *timestamp = val; return; }