diff options
author | Jingoo Han <jg1.han@samsung.com> | 2012-04-04 02:59:24 -0400 |
---|---|---|
committer | Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | 2012-04-16 00:18:27 -0400 |
commit | b5cfeed6cf90a4bb619b7ac640ba1a6dd002364d (patch) | |
tree | aaa7b327f254febb8b711cef9bcc529e62feccad /drivers/video/exynos | |
parent | 4e0dd49d2c4bc10d56bc536113c16f165c0edeb3 (diff) |
video: exynos_dp: check DP PLL Lock status
DP PLL Lock status should be checked in order to prevent unlocked PLL.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Diffstat (limited to 'drivers/video/exynos')
-rw-r--r-- | drivers/video/exynos/exynos_dp_reg.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/video/exynos/exynos_dp_reg.c b/drivers/video/exynos/exynos_dp_reg.c index 6548afa0e3d2..169d1810d30c 100644 --- a/drivers/video/exynos/exynos_dp_reg.c +++ b/drivers/video/exynos/exynos_dp_reg.c | |||
@@ -271,6 +271,7 @@ void exynos_dp_set_analog_power_down(struct exynos_dp_device *dp, | |||
271 | void exynos_dp_init_analog_func(struct exynos_dp_device *dp) | 271 | void exynos_dp_init_analog_func(struct exynos_dp_device *dp) |
272 | { | 272 | { |
273 | u32 reg; | 273 | u32 reg; |
274 | int timeout_loop = 0; | ||
274 | 275 | ||
275 | exynos_dp_set_analog_power_down(dp, POWER_ALL, 0); | 276 | exynos_dp_set_analog_power_down(dp, POWER_ALL, 0); |
276 | 277 | ||
@@ -282,9 +283,19 @@ void exynos_dp_init_analog_func(struct exynos_dp_device *dp) | |||
282 | writel(reg, dp->reg_base + EXYNOS_DP_DEBUG_CTL); | 283 | writel(reg, dp->reg_base + EXYNOS_DP_DEBUG_CTL); |
283 | 284 | ||
284 | /* Power up PLL */ | 285 | /* Power up PLL */ |
285 | if (exynos_dp_get_pll_lock_status(dp) == PLL_UNLOCKED) | 286 | if (exynos_dp_get_pll_lock_status(dp) == PLL_UNLOCKED) { |
286 | exynos_dp_set_pll_power_down(dp, 0); | 287 | exynos_dp_set_pll_power_down(dp, 0); |
287 | 288 | ||
289 | while (exynos_dp_get_pll_lock_status(dp) == PLL_UNLOCKED) { | ||
290 | timeout_loop++; | ||
291 | if (DP_TIMEOUT_LOOP_COUNT < timeout_loop) { | ||
292 | dev_err(dp->dev, "failed to get pll lock status\n"); | ||
293 | return; | ||
294 | } | ||
295 | usleep_range(10, 20); | ||
296 | } | ||
297 | } | ||
298 | |||
288 | /* Enable Serdes FIFO function and Link symbol clock domain module */ | 299 | /* Enable Serdes FIFO function and Link symbol clock domain module */ |
289 | reg = readl(dp->reg_base + EXYNOS_DP_FUNC_EN_2); | 300 | reg = readl(dp->reg_base + EXYNOS_DP_FUNC_EN_2); |
290 | reg &= ~(SERDES_FIFO_FUNC_EN_N | LS_CLK_DOMAIN_FUNC_EN_N | 301 | reg &= ~(SERDES_FIFO_FUNC_EN_N | LS_CLK_DOMAIN_FUNC_EN_N |