aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/clockdomain.c
diff options
context:
space:
mode:
authorPaul Walmsley <paul@pwsan.com>2008-08-19 04:08:44 -0400
committerTony Lindgren <tony@atomide.com>2008-08-19 04:08:44 -0400
commit8420bb13630032097be911a039cb64b5f62c01da (patch)
treeefd387d9fec6d82dbec44e8d296ddf7fa5ed86c1 /arch/arm/mach-omap2/clockdomain.c
parentd459bfe01f523983a822de8c2d3fe0bd2f2c194e (diff)
ARM: OMAP2: Clockdomain: Connect clockdomain code to powerdomain code
Thie patch adds code to the powerdomain layer to track the clockdomains associated with each powerdomain. It also modifies the clockdomain code to register clockdomains with their corresponding powerdomain when the clockdomain is registered. Signed-off-by: Paul Walmsley <paul@pwsan.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/clockdomain.c')
-rw-r--r--arch/arm/mach-omap2/clockdomain.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/clockdomain.c b/arch/arm/mach-omap2/clockdomain.c
index f867d8f1d0e9..b6ff5aa4726e 100644
--- a/arch/arm/mach-omap2/clockdomain.c
+++ b/arch/arm/mach-omap2/clockdomain.c
@@ -219,6 +219,8 @@ int clkdm_register(struct clockdomain *clkdm)
219 219
220 list_add(&clkdm->node, &clkdm_list); 220 list_add(&clkdm->node, &clkdm_list);
221 221
222 pwrdm_add_clkdm(pwrdm, clkdm);
223
222 pr_debug("clockdomain: registered %s\n", clkdm->name); 224 pr_debug("clockdomain: registered %s\n", clkdm->name);
223 ret = 0; 225 ret = 0;
224 226
@@ -240,6 +242,8 @@ int clkdm_unregister(struct clockdomain *clkdm)
240 if (!clkdm) 242 if (!clkdm)
241 return -EINVAL; 243 return -EINVAL;
242 244
245 pwrdm_del_clkdm(clkdm->pwrdm, clkdm);
246
243 mutex_lock(&clkdm_mutex); 247 mutex_lock(&clkdm_mutex);
244 list_del(&clkdm->node); 248 list_del(&clkdm->node);
245 mutex_unlock(&clkdm_mutex); 249 mutex_unlock(&clkdm_mutex);