summaryrefslogtreecommitdiff
path: root/src/soc/samsung/exynos5250/clock.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/samsung/exynos5250/clock.c')
-rw-r--r--src/soc/samsung/exynos5250/clock.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/soc/samsung/exynos5250/clock.c b/src/soc/samsung/exynos5250/clock.c
index a00af0232a..246b9dc8e2 100644
--- a/src/soc/samsung/exynos5250/clock.c
+++ b/src/soc/samsung/exynos5250/clock.c
@@ -597,7 +597,7 @@ int clock_epll_set_rate(unsigned long rate)
unsigned int epll_con, epll_con_k;
unsigned int i;
unsigned int lockcnt;
- struct mono_time current, end;
+ struct stopwatch sw;
epll_con = readl(&exynos_clock->epll_con0);
epll_con &= ~((EPLL_CON0_LOCK_DET_EN_MASK <<
@@ -631,17 +631,16 @@ int clock_epll_set_rate(unsigned long rate)
writel(epll_con, &exynos_clock->epll_con0);
writel(epll_con_k, &exynos_clock->epll_con1);
- timer_monotonic_get(&current);
- end = current;
- mono_time_add_msecs(&end, TIMEOUT_EPLL_LOCK);
+ stopwatch_init_msecs_expire(&sw, TIMEOUT_EPLL_LOCK);
while (!(readl(&exynos_clock->epll_con0) &
(0x1 << EXYNOS5_EPLLCON0_LOCKED_SHIFT))) {
- if (mono_time_after(&current, &end)) {
- printk(BIOS_DEBUG, "%s: Timeout waiting for EPLL lock\n", __func__);
+ if (stopwatch_expired(&sw)) {
+ printk(BIOS_DEBUG,
+ "%s: Timeout waiting for EPLL lock\n",
+ __func__);
return -1;
}
- timer_monotonic_get(&current);
}
return 0;