diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2014-12-31 07:22:42 -0500 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2015-02-04 05:32:03 -0500 |
commit | eb30199b46e3d4ed73d2ad0b7f4da418d7da1da8 (patch) | |
tree | 5282e74fb52c39f4c2b8b5694c9401f1ab57dd92 /drivers/video | |
parent | 64e22ffdabeb9391f576bedbed03c480a1ecd593 (diff) |
OMAPDSS: PLL: add dss_pll_wait_reset_done()
Add a helper function to wait until the PLL's reset is done.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/fbdev/omap2/dss/dss.h | 1 | ||||
-rw-r--r-- | drivers/video/fbdev/omap2/dss/pll.c | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/drivers/video/fbdev/omap2/dss/dss.h b/drivers/video/fbdev/omap2/dss/dss.h index 1826ee96265b..d6c9c3d3db14 100644 --- a/drivers/video/fbdev/omap2/dss/dss.h +++ b/drivers/video/fbdev/omap2/dss/dss.h | |||
@@ -453,5 +453,6 @@ int dss_pll_write_config_type_a(struct dss_pll *pll, | |||
453 | const struct dss_pll_clock_info *cinfo); | 453 | const struct dss_pll_clock_info *cinfo); |
454 | int dss_pll_write_config_type_b(struct dss_pll *pll, | 454 | int dss_pll_write_config_type_b(struct dss_pll *pll, |
455 | const struct dss_pll_clock_info *cinfo); | 455 | const struct dss_pll_clock_info *cinfo); |
456 | int dss_pll_wait_reset_done(struct dss_pll *pll); | ||
456 | 457 | ||
457 | #endif | 458 | #endif |
diff --git a/drivers/video/fbdev/omap2/dss/pll.c b/drivers/video/fbdev/omap2/dss/pll.c index 335ffac224b9..f974ddcd3b6e 100644 --- a/drivers/video/fbdev/omap2/dss/pll.c +++ b/drivers/video/fbdev/omap2/dss/pll.c | |||
@@ -222,6 +222,16 @@ static int wait_for_bit_change(void __iomem *reg, int bitnum, int value) | |||
222 | return !value; | 222 | return !value; |
223 | } | 223 | } |
224 | 224 | ||
225 | int dss_pll_wait_reset_done(struct dss_pll *pll) | ||
226 | { | ||
227 | void __iomem *base = pll->base; | ||
228 | |||
229 | if (wait_for_bit_change(base + PLL_STATUS, 0, 1) != 1) | ||
230 | return -ETIMEDOUT; | ||
231 | else | ||
232 | return 0; | ||
233 | } | ||
234 | |||
225 | static int dss_wait_hsdiv_ack(struct dss_pll *pll, u32 hsdiv_ack_mask) | 235 | static int dss_wait_hsdiv_ack(struct dss_pll *pll, u32 hsdiv_ack_mask) |
226 | { | 236 | { |
227 | int t = 100; | 237 | int t = 100; |