aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/clockdomain.c
diff options
context:
space:
mode:
authorAbhijit Pagare <abhijitpagare@ti.com>2010-01-26 22:12:53 -0500
committerPaul Walmsley <paul@pwsan.com>2010-01-26 22:12:53 -0500
commit84c0c39aec31a09571fc08a752a2f4da0fe9fcf2 (patch)
treecae08d44938c6df7f7bc740d2feea26086a192f4 /arch/arm/mach-omap2/clockdomain.c
parent3a759f09d7b9c6bbefffadd38fdc116125c49730 (diff)
ARM: OMAP4: PM: Make OMAP3 Clock-domain framework compatible for OMAP4.
Here the ".clkstctrl_reg" field is added to the clockdomain stucture as the module offsets for OMAP4 do not map one to one for powerdomains and clockdomains as it used to for OMAP3. Hence we need to use absolute addresses to access the control registers. Some of the clock domains have modules falling in the address space of PRM partition. Hence necessitating the use of absolute adresses. Signed-off-by: Abhijit Pagare <abhijitpagare@ti.com> Signed-off-by: Paul Walmsley <paul@pwsan.com> Cc: Benoit Cousson <b-cousson@ti.com> Cc: Rajendra Nayak <rnayak@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/clockdomain.c')
-rw-r--r--arch/arm/mach-omap2/clockdomain.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/arch/arm/mach-omap2/clockdomain.c b/arch/arm/mach-omap2/clockdomain.c
index 50c8cd7c7126..52885ac5bb5d 100644
--- a/arch/arm/mach-omap2/clockdomain.c
+++ b/arch/arm/mach-omap2/clockdomain.c
@@ -163,7 +163,7 @@ static void _omap2_clkdm_set_hwsup(struct clockdomain *clkdm, int enable)
163 163
164 cm_rmw_mod_reg_bits(clkdm->clktrctrl_mask, 164 cm_rmw_mod_reg_bits(clkdm->clktrctrl_mask,
165 v << __ffs(clkdm->clktrctrl_mask), 165 v << __ffs(clkdm->clktrctrl_mask),
166 clkdm->pwrdm.ptr->prcm_offs, CM_CLKSTCTRL); 166 clkdm->pwrdm.ptr->prcm_offs, OMAP2_CM_CLKSTCTRL);
167} 167}
168 168
169static struct clockdomain *_clkdm_lookup(const char *name) 169static struct clockdomain *_clkdm_lookup(const char *name)
@@ -371,7 +371,7 @@ struct powerdomain *clkdm_get_pwrdm(struct clockdomain *clkdm)
371 * @clk: struct clk * of a clockdomain 371 * @clk: struct clk * of a clockdomain
372 * 372 *
373 * Return the clockdomain's current state transition mode from the 373 * Return the clockdomain's current state transition mode from the
374 * corresponding domain CM_CLKSTCTRL register. Returns -EINVAL if clk 374 * corresponding domain OMAP2_CM_CLKSTCTRL register. Returns -EINVAL if clk
375 * is NULL or the current mode upon success. 375 * is NULL or the current mode upon success.
376 */ 376 */
377static int omap2_clkdm_clktrctrl_read(struct clockdomain *clkdm) 377static int omap2_clkdm_clktrctrl_read(struct clockdomain *clkdm)
@@ -381,7 +381,7 @@ static int omap2_clkdm_clktrctrl_read(struct clockdomain *clkdm)
381 if (!clkdm) 381 if (!clkdm)
382 return -EINVAL; 382 return -EINVAL;
383 383
384 v = cm_read_mod_reg(clkdm->pwrdm.ptr->prcm_offs, CM_CLKSTCTRL); 384 v = cm_read_mod_reg(clkdm->pwrdm.ptr->prcm_offs, OMAP2_CM_CLKSTCTRL);
385 v &= clkdm->clktrctrl_mask; 385 v &= clkdm->clktrctrl_mask;
386 v >>= __ffs(clkdm->clktrctrl_mask); 386 v >>= __ffs(clkdm->clktrctrl_mask);
387 387
@@ -421,7 +421,8 @@ int omap2_clkdm_sleep(struct clockdomain *clkdm)
421 __ffs(clkdm->clktrctrl_mask)); 421 __ffs(clkdm->clktrctrl_mask));
422 422
423 cm_rmw_mod_reg_bits(clkdm->clktrctrl_mask, v, 423 cm_rmw_mod_reg_bits(clkdm->clktrctrl_mask, v,
424 clkdm->pwrdm.ptr->prcm_offs, CM_CLKSTCTRL); 424 clkdm->pwrdm.ptr->prcm_offs,
425 OMAP2_CM_CLKSTCTRL);
425 426
426 } else { 427 } else {
427 BUG(); 428 BUG();
@@ -463,7 +464,8 @@ int omap2_clkdm_wakeup(struct clockdomain *clkdm)
463 __ffs(clkdm->clktrctrl_mask)); 464 __ffs(clkdm->clktrctrl_mask));
464 465
465 cm_rmw_mod_reg_bits(clkdm->clktrctrl_mask, v, 466 cm_rmw_mod_reg_bits(clkdm->clktrctrl_mask, v,
466 clkdm->pwrdm.ptr->prcm_offs, CM_CLKSTCTRL); 467 clkdm->pwrdm.ptr->prcm_offs,
468 OMAP2_CM_CLKSTCTRL);
467 469
468 } else { 470 } else {
469 BUG(); 471 BUG();