diff options
Diffstat (limited to 'arch/arm/mach-davinci/clock.c')
-rw-r--r-- | arch/arm/mach-davinci/clock.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/arch/arm/mach-davinci/clock.c b/arch/arm/mach-davinci/clock.c index 058c77f72a07..5de60ae57903 100644 --- a/arch/arm/mach-davinci/clock.c +++ b/arch/arm/mach-davinci/clock.c | |||
@@ -43,7 +43,8 @@ static void __clk_enable(struct clk *clk) | |||
43 | if (clk->parent) | 43 | if (clk->parent) |
44 | __clk_enable(clk->parent); | 44 | __clk_enable(clk->parent); |
45 | if (clk->usecount++ == 0 && (clk->flags & CLK_PSC)) | 45 | if (clk->usecount++ == 0 && (clk->flags & CLK_PSC)) |
46 | davinci_psc_config(psc_domain(clk), clk->gpsc, clk->lpsc, 1); | 46 | davinci_psc_config(psc_domain(clk), clk->gpsc, clk->lpsc, |
47 | PSC_STATE_ENABLE); | ||
47 | } | 48 | } |
48 | 49 | ||
49 | static void __clk_disable(struct clk *clk) | 50 | static void __clk_disable(struct clk *clk) |
@@ -52,7 +53,9 @@ static void __clk_disable(struct clk *clk) | |||
52 | return; | 53 | return; |
53 | if (--clk->usecount == 0 && !(clk->flags & CLK_PLL) && | 54 | if (--clk->usecount == 0 && !(clk->flags & CLK_PLL) && |
54 | (clk->flags & CLK_PSC)) | 55 | (clk->flags & CLK_PSC)) |
55 | davinci_psc_config(psc_domain(clk), clk->gpsc, clk->lpsc, 0); | 56 | davinci_psc_config(psc_domain(clk), clk->gpsc, clk->lpsc, |
57 | (clk->flags & PSC_SWRSTDISABLE) ? | ||
58 | PSC_STATE_SWRSTDISABLE : PSC_STATE_DISABLE); | ||
56 | if (clk->parent) | 59 | if (clk->parent) |
57 | __clk_disable(clk->parent); | 60 | __clk_disable(clk->parent); |
58 | } | 61 | } |
@@ -234,7 +237,10 @@ static int __init clk_disable_unused(void) | |||
234 | continue; | 237 | continue; |
235 | 238 | ||
236 | pr_info("Clocks: disable unused %s\n", ck->name); | 239 | pr_info("Clocks: disable unused %s\n", ck->name); |
237 | davinci_psc_config(psc_domain(ck), ck->gpsc, ck->lpsc, 0); | 240 | |
241 | davinci_psc_config(psc_domain(ck), ck->gpsc, ck->lpsc, | ||
242 | (ck->flags & PSC_SWRSTDISABLE) ? | ||
243 | PSC_STATE_SWRSTDISABLE : PSC_STATE_DISABLE); | ||
238 | } | 244 | } |
239 | spin_unlock_irq(&clockfw_lock); | 245 | spin_unlock_irq(&clockfw_lock); |
240 | 246 | ||