From 5dd120810b1ce8eed227ed0d85f944466ff911f6 Mon Sep 17 00:00:00 2001 From: Christian Marangi Date: Tue, 13 Jun 2023 16:54:54 +0200 Subject: [PATCH] debugcc: support 32 bit systems Unsigned long have a different size in 32 bit system and this cause the malfunction of debugcc returning wrong frequency. Use 64bit unsigned int to correctly support 32 bit system and provide correct frequency. Signed-off-by: Christian Marangi --- debugcc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debugcc.c b/debugcc.c index 047cd6c..e82c841 100644 --- a/debugcc.c +++ b/debugcc.c @@ -116,8 +116,8 @@ void mux_disable(struct debug_mux *mux) unsigned long measure_gcc(const struct measure_clk *clk, const struct debug_mux *mux) { - unsigned long raw_count_short; - unsigned long raw_count_full; + uint64_t raw_count_short; + uint64_t raw_count_full; struct gcc_mux *gcc = container_of(mux, struct gcc_mux, mux); unsigned long xo_div4;