1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/firmware/target/arm/rk27xx/system-rk27xx.c b/firmware/target/arm/rk27xx/system-rk27xx.c
index 8c75dee..ade686a 100644
--- a/firmware/target/arm/rk27xx/system-rk27xx.c
+++ b/firmware/target/arm/rk27xx/system-rk27xx.c
@@ -235,8 +235,8 @@ void commit_discard_dcache_range (const void *base, unsigned int size)
 #ifdef HAVE_ADJUSTABLE_CPU_FREQ
 static inline void set_sdram_timing(int ahb_freq)
 {
-    MCSDR_T_REF = (125*ahb_freq/1000000) >> 3;
-    MCSDR_T_RFC = (64*ahb_freq/1000000)/1000;
+    MCSDR_T_REF = (125*(ahb_freq/1000000)) >> 3;
+    MCSDR_T_RFC = (64*(ahb_freq/1000000))/1000;
 }
 
 void set_cpu_frequency(long frequency)