diff --git a/plat/rockchip/rk3399/drivers/dram/suspend.c b/plat/rockchip/rk3399/drivers/dram/suspend.c
index f66150ae898acea304316b3fb5f4ff630c34932c..2a80bcb31b585b4818929845bb3f3021bbf68c60 100644
--- a/plat/rockchip/rk3399/drivers/dram/suspend.c
+++ b/plat/rockchip/rk3399/drivers/dram/suspend.c
@@ -85,10 +85,11 @@ static __pmusramfunc uint32_t sram_get_timer_value(void)
 
 static __pmusramfunc void sram_udelay(uint32_t usec)
 {
-	uint32_t start, cnt, delta, delta_us;
+	uint32_t start, cnt, delta, total_ticks;
 
 	/* counter is decreasing */
 	start = sram_get_timer_value();
+	total_ticks = usec * SYS_COUNTER_FREQ_IN_MHZ;
 	do {
 		cnt = sram_get_timer_value();
 		if (cnt > start) {
@@ -96,8 +97,7 @@ static __pmusramfunc void sram_udelay(uint32_t usec)
 			delta += start;
 		} else
 			delta = start - cnt;
-		delta_us = (delta * SYS_COUNTER_FREQ_IN_MHZ);
-	} while (delta_us < usec);
+	} while (delta <= total_ticks);
 }
 
 static __pmusramfunc void configure_sgrf(void)