Merge pull request #1255 from masahir0y/int-ll64
Use consistent int-ll64 typedefs for aarch32 and aarch64
diff --git a/plat/rockchip/rk3399/drivers/dram/suspend.c b/plat/rockchip/rk3399/drivers/dram/suspend.c
index f66150a..2a80bcb 100644
--- a/plat/rockchip/rk3399/drivers/dram/suspend.c
+++ b/plat/rockchip/rk3399/drivers/dram/suspend.c
@@ -85,10 +85,11 @@
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 @@
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)