summaryrefslogtreecommitdiff
path: root/src/cpu/samsung/exynos5420/fb.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu/samsung/exynos5420/fb.c')
-rw-r--r--src/cpu/samsung/exynos5420/fb.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/cpu/samsung/exynos5420/fb.c b/src/cpu/samsung/exynos5420/fb.c
index 760f5ee4bf..3724a247c6 100644
--- a/src/cpu/samsung/exynos5420/fb.c
+++ b/src/cpu/samsung/exynos5420/fb.c
@@ -26,7 +26,6 @@
#include <timer.h>
#include <delay.h>
#include <console/console.h>
-#include "timer.h"
#include "cpu.h"
#include "power.h"
#include "sysreg.h"
@@ -411,20 +410,24 @@ static int s5p_dp_hw_link_training(struct s5p_dp_device *dp,
{
int pll_is_locked = 0;
u32 data;
- u32 start;
int lane;
+ struct mono_time current, end;
struct exynos5_dp *base = dp->base;
/* Stop Video */
clrbits_le32(&base->video_ctl_1, VIDEO_EN);
- start = get_timer(0);
+ timer_monotonic_get(&current);
+ end = current;
+ mono_time_add_msecs(&end, PLL_LOCK_TIMEOUT);
+
while ((pll_is_locked = s5p_dp_get_pll_lock_status(dp)) == PLL_UNLOCKED) {
- if (get_timer(start) > PLL_LOCK_TIMEOUT) {
+ if (mono_time_after(&current, &end)) {
/* Ignore this error, and try to continue */
printk(BIOS_ERR, "PLL is not locked yet.\n");
break;
}
+ timer_monotonic_get(&current);
}
printk(BIOS_SPEW, "PLL is %slocked\n",
pll_is_locked == PLL_LOCKED ? "": "not ");