diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-08-17 22:13:22 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-08-17 22:15:09 +0100 |
commit | 99c796df94afca5256860dd4760017f1dbb3480c (patch) | |
tree | 73347ec30626e2ebdf95f64d1cd195b11baa794e /drivers | |
parent | 41e2e8fd34fff909a0e40129f6ac4233ecfa67a9 (diff) |
VIDEO: amba clcd: don't disable an already disabled clock
Fix the clock enable/disable tracking in the AMBA CLCD driver so
that the driver doesn't try to disable an already disabled clock,
thereby causing the clock (if shared) to become unbalanced.
This resolves a problem with CLCD on LPC32xx ARM platforms.
Reported-by: Kevin Wells <wellsk40@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/amba-clcd.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/video/amba-clcd.c b/drivers/video/amba-clcd.c index afe21e6eb54..1c2c68356ea 100644 --- a/drivers/video/amba-clcd.c +++ b/drivers/video/amba-clcd.c @@ -80,7 +80,10 @@ static void clcdfb_disable(struct clcd_fb *fb) /* * Disable CLCD clock source. */ - clk_disable(fb->clk); + if (fb->clk_enabled) { + fb->clk_enabled = false; + clk_disable(fb->clk); + } } static void clcdfb_enable(struct clcd_fb *fb, u32 cntl) @@ -88,7 +91,10 @@ static void clcdfb_enable(struct clcd_fb *fb, u32 cntl) /* * Enable the CLCD clock source. */ - clk_enable(fb->clk); + if (!fb->clk_enabled) { + fb->clk_enabled = true; + clk_enable(fb->clk); + } /* * Bring up by first enabling.. |