aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-davinci/clock.c
diff options
context:
space:
mode:
authorSekhar Nori <nsekhar@ti.com>2011-07-06 02:01:21 -0400
committerSekhar Nori <nsekhar@ti.com>2011-07-08 01:21:40 -0400
commita51ca38b6330e463cc1a7adf64502ff735452915 (patch)
tree26c708d7e6cdeea454af2d730e4dd57e46e6c774 /arch/arm/mach-davinci/clock.c
parent8d54297b90831b6e87e62ad910f833b8666094c8 (diff)
davinci: pass clock flags to davinci_psc_config()
Enabling or disabling a PSC can take certain modifiers like "disable with reset", "force enable/disable" and "enable/disable with local reset" apart from the regular clock gating functionality. Pass a flags argument to davinci_psc_config() so these variations can be supported there. At this time only "disable with reset" is supported, but other functionality will be added in subsequent patches. Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Diffstat (limited to 'arch/arm/mach-davinci/clock.c')
-rw-r--r--arch/arm/mach-davinci/clock.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/arch/arm/mach-davinci/clock.c b/arch/arm/mach-davinci/clock.c
index e4e3af179f02..d0450ac2c00e 100644
--- a/arch/arm/mach-davinci/clock.c
+++ b/arch/arm/mach-davinci/clock.c
@@ -44,7 +44,7 @@ static void __clk_enable(struct clk *clk)
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, 46 davinci_psc_config(psc_domain(clk), clk->gpsc, clk->lpsc,
47 PSC_STATE_ENABLE); 47 true, clk->flags);
48} 48}
49 49
50static void __clk_disable(struct clk *clk) 50static void __clk_disable(struct clk *clk)
@@ -54,8 +54,7 @@ static void __clk_disable(struct clk *clk)
54 if (--clk->usecount == 0 && !(clk->flags & CLK_PLL) && 54 if (--clk->usecount == 0 && !(clk->flags & CLK_PLL) &&
55 (clk->flags & CLK_PSC)) 55 (clk->flags & CLK_PSC))
56 davinci_psc_config(psc_domain(clk), clk->gpsc, clk->lpsc, 56 davinci_psc_config(psc_domain(clk), clk->gpsc, clk->lpsc,
57 (clk->flags & PSC_SWRSTDISABLE) ? 57 false, clk->flags);
58 PSC_STATE_SWRSTDISABLE : PSC_STATE_DISABLE);
59 if (clk->parent) 58 if (clk->parent)
60 __clk_disable(clk->parent); 59 __clk_disable(clk->parent);
61} 60}
@@ -239,8 +238,7 @@ static int __init clk_disable_unused(void)
239 pr_debug("Clocks: disable unused %s\n", ck->name); 238 pr_debug("Clocks: disable unused %s\n", ck->name);
240 239
241 davinci_psc_config(psc_domain(ck), ck->gpsc, ck->lpsc, 240 davinci_psc_config(psc_domain(ck), ck->gpsc, ck->lpsc,
242 (ck->flags & PSC_SWRSTDISABLE) ? 241 false, ck->flags);
243 PSC_STATE_SWRSTDISABLE : PSC_STATE_DISABLE);
244 } 242 }
245 spin_unlock_irq(&clockfw_lock); 243 spin_unlock_irq(&clockfw_lock);
246 244